Course: Pairs Trading Strategy in Python
I have created my own Jupyter notebook from the existing example in the course in order to find cointegration between two assets. In my example, I import the assets data from Yahoo finance rather than using a .csv
Assets are DGR.AX and ENR.AX (Australian stock exchange)
I am getting different results using the macros file named "ADF Test" and using the jupyter notebook to find out what days the two assets are cointegrated.
Files in Google Drive:
- 'ADF Test' (Macro) with data already loaded and calculated
- Quantra 1st Course Notebook = Jupyter notebook downloaded in Python
- exportedFile.xlsx = result of the notebook where i compare both datas (see columns in red) and manually calculate the spread, average, std etc to see if that's correct (and it was!)
note that the only difference between what you guys trying to do in your notebook and mine is that i use the average of the 30d spread in the day 31st, rather than in the day 30, so i just have to move one cell down.
let me know if you have issues opening the jupyter notebook or if i should export it in other format