Lorentzian Classification: Machine Learning Driven TradingView Indicator

Justin Dehorty
9 Feb 202317:42

Summary

TLDRIn this video, Justin introduces a free, open-source script on TradingView for machine learning classification using Lorenzian distance, which has gained significant attention and topped the platform's trending scripts. The script employs supervised learning and a nearest neighbors algorithm, offering an intuitive approach to trading without complex mathematical knowledge. Justin explains the advantages of Lorenzian distance over Euclidean in financial time series, especially during significant market events. He also guides viewers on optimizing the indicator, adjusting features, and utilizing filters for better performance, concluding with a demonstration on how to backtest the script effectively.

Takeaways

  • 📈 The script discussed is a free, open-source machine learning tool for TradingView, titled 'Machine Learning Lorentzian Distance Classification'.
  • 🌟 It was highlighted as an Editor's Pick Publication and has been trending as the top script among recently published ones on the platform.
  • 🤖 The script utilizes supervised learning with a classification algorithm based on nearest neighbors, which is simple and intuitive compared to other machine learning methods.
  • 🔍 The Lorentzian distance metric is featured as an alternative to the Euclidean distance, offering robust performance across various time series datasets, especially in financial markets.
  • 📊 The Lorentzian distance is particularly useful for handling anomalies in time series data, such as major world events that can distort the Euclidean distance measurements.
  • 📚 The video provides a theoretical background on how the indicator works and offers practical advice on optimization and backtesting within the TradingView framework.
  • 🛠️ The script includes settings for general configuration, feature engineering, and filtering to fine-tune the indicator's performance according to different time frames.
  • 📉 Filters like volatility and regime filters help in preventing false signals, especially in choppy or ranging markets, and ensuring entries align with market trends.
  • 🔧 Kernel settings allow for a tighter fit to market data, revealing patterns that might not be apparent with traditional moving averages.
  • 🔄 The video demonstrates how to adapt the script for backtesting, aligning it with TradingView's native backtesting capabilities for more accurate performance estimation.
  • ❓ The presenter intends to address frequently asked questions and provide further clarifications in the TradingView section for those interested in the script.

Q & A

  • What is the main topic of Justin's video?

    -The main topic of Justin's video is an introduction and explanation of a free, open-source script for TradingView that uses machine learning and Lorenzian distance for classification in trading.

  • Why was the script featured as an editor's pick on TradingView?

    -The script was featured as an editor's pick and has been trending as the number one script on TradingView due to its innovative use of machine learning for trading analysis.

  • What type of machine learning is used in the script?

    -The script uses a type of machine learning known as supervised learning, specifically a form of classification based on a nearest neighbors algorithm.

  • How does the nearest neighbors classification algorithm work?

    -The nearest neighbors classification algorithm works by finding the closest points in the historical data (nearest neighbors) based on a distance metric and using those points to predict future price movements.

  • What is the significance of using Lorenzian distance instead of Euclidean distance in this context?

    -Lorenzian distance is more robust and can better handle anomalies or significant events in time series data, such as financial time series, by accounting for the warping effect that these events can have on the data.

  • How can the Lorenzian distance metric help with trading decisions?

    -The Lorenzian distance metric can provide more accurate nearest neighbors, which can lead to better predictions about future price movements, especially under conditions affected by significant world events.

  • What is the purpose of the feature engineering section in the script?

    -The feature engineering section allows users to fine-tune and select different features used for the model, which can help in calibrating the indicator for different time frames and improving its performance.

  • Can the script be used for backtesting trading strategies?

    -Yes, the script includes a backtest adapter that allows users to perform backtesting using TradingView's native backtesting framework, providing a way to evaluate the performance of trading strategies.

  • What is the importance of having a sufficient amount of historical data for the script to work effectively?

    -Having a sufficient amount of historical data is important because it provides the model with a larger set of 'neighbors' to reference, leading to more accurate predictions and better performance of the script.

  • What are some of the filters and settings available in the script to optimize its performance?

    -The script includes various filters and settings such as volatility filter, regime filter, trend filter, and kernel settings that users can adjust to optimize the indicator's performance according to their trading strategy and time frame.

  • How can users ensure that the backtesting results from the script are in sync with TradingView's native backtester?

    -Users can verify the synchronization by comparing the results from the script's backtest adapter with the native backtester, especially using the worst-case estimates, to ensure that the numbers match and the script is accurately reflecting potential trading outcomes.

Outlines

plate

This section is available to paid users only. Please upgrade to access this part.

Upgrade Now

Mindmap

plate

This section is available to paid users only. Please upgrade to access this part.

Upgrade Now

Keywords

plate

This section is available to paid users only. Please upgrade to access this part.

Upgrade Now

Highlights

plate

This section is available to paid users only. Please upgrade to access this part.

Upgrade Now

Transcripts

plate

This section is available to paid users only. Please upgrade to access this part.

Upgrade Now
Rate This

5.0 / 5 (0 votes)

Related Tags
Machine LearningTrading ViewLorenzian DistanceClassificationSupervised LearningNearest NeighborsAlgorithm OptimizationBacktestingFinancial MarketsTechnical AnalysisEuclidean Distance