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.



Mã nguồn mở

Với tinh thần TradingView, tác giả của tập lệnh này đã xuất bản nó dưới dạng mã nguồn mở, vì vậy các nhà giao dịch có thể hiểu và xác minh nó. Chúc mừng tác giả! Bạn có thể sử dụng mã này miễn phí, nhưng việc sử dụng lại mã này trong một ấn phẩm chịu sự điều chỉnh của Nội quy nội bộ. Bạn có thể yêu thích nó để sử dụng nó trên biểu đồ.

Thông báo miễn trừ trách nhiệm

Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.

Bạn muốn sử dụng tập lệnh này trên biểu đồ?