hkorange2007

trading YM based on pair trading

This is inspired by some online free webinars. Didn't pay for the strategy/ course. I just figured it out myself. So there might be problem with this strategy.

Theory: It is based on something called cointegrated. Cointegration means the difference between 2 securities are stable in long term. When the difference is bigger / smaller than normal, then there is space to make profit. You can use some tests to check if they are cointegration. I don't think YM and NQ are strictly cointegrated. I used other platform to test the cointegration. They are not cointegrated. There are multiple ways to do pair trading. I use "Y = A - B * (A /B)" to do this. The back test on tradingview can only trade one security. This is not pair trading in this backtest. But only do long and short based on the theory of pair trading. The max drawdown is huge. You should be careful before doing anything with this strategy.

Welcome to give some advice on improvement.



Açık kaynak kodlu komut dosyası

Gerçek TradingView ruhuyla, bu betiğin yazarı, yatırımcının anlayabilmesi ve doğrulayabilmesi için onu açık kaynak olarak yayınladı. Yazarın eline sağlık! Bunu ücretsiz olarak kullanabilirsiniz, ancak bu kodun bir yayında yeniden kullanımı Kullanım Koşulları ile yönetilir. Bir grafikte kullanmak için favorilere ekleyebilirsiniz.

Feragatname

Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.

Bu komut dosyasını bir grafikte kullanmak ister misiniz?