Hi,
How did you define the values of input parmeters, especially the thresholds and the duration.
Any systematic approach will be usefull.
For the co-integration output, you choose a lag of 8 which is never used. How did you get this and how benefit is to have this information.
Thank you.
Hello Eric,
These threshold values were set for illustration. You can optimise these threshold values either in python or excel. This can be done by creating a data table and running the strategy for each combination of the stop-loss and profit-taking thresholds.
The lag order is used while calculating the ADF test statistic - which is right above it in the table. The A in ADF means augmented by lag terms in the equation. The selection of the number of lags in ADF can be done in different ways. A common way is to start with a large number of lags selected a priori and reduce the number of lags sequentially until the longest lag is statistically significant. Larger lags are preferred as equations with smaller lag orders are documented to suffer from serial correlation.