In the previous pairs trading article I explained two similar but distinct strategies: one uses the absolute closing prices as the criteria to measure the trend and discrepancy of two stocks with on cointegration; the other one uses their moving averages as the measurement to calculate the z-scores and generate the strategy. I have posted the backtesting result using the moving average strategy for two different time frames and one of them may still include the observation dataset so I tried not to make the same mistake in this test. The first backtesting time frame is from 01/06/2015 to 12/01/2015 which is out of sample test and the video is shown above. Here is the picture of the part of final result(risk metrics and accumulative returns) as well as part of the simulation trading details:
Here are some very important measurements that we have to pay attention to when measuring the model(I will show two of them which may look unfamiliar). The sharpe ratio measures how much return you can get for the risk you are taken on so the higher the sharpe ratio the better. As for the max drawdown(MMD) is an indicator of downside risk over a specified time period so it should be as low as possible. They are the goals I am still learning and working on:
This picture shows the result of broader time frame for past 23 months from 01/01/2014 to 12/01/2015:
Also, please feel free to comment on inefficiencies about anything I explained here since I am a beginner for this and I believe the more mistakes I fix the faster I can grow.
Here is the code I used to finish the backtesting and the lookback period I set is 10 days( which is used for the regression):