
Metin A. answered 05/25/19
PhD in Economics currently working as a Data Scientiest
I would propose to use some statistical package or programming language, many of which will already have the necessary libraries made available to you so you don't have to reinvent the wheel but rather just upload your 2 stock price series and run the tests. This link will give you an easy to follow example in Python but you can find similar instructions in any language or package that you are familiar with:
https://medium.com/bluekiri/cointegration-tests-on-time-series-88702ea9c492
i hope this helps.