Attached is my current revision of a pairs trading algorithm that uses the following tests to test whether a pair is cointegrated:
-Augmented Dickey–Fuller (ADF) unit root test to see if the spread is stationary/mean reverting
-Hurst exponent to see if the spread is also stationary/mean reverting
-Half life to see whether the pair will revert back to the mean in a relatively short period of time
And uses a softmax function to create orders.
I was looking to see what you think. One thing I know I need to do is bring that beta down if I do want to be able to start entering competitions.