Create python code that tests pairs trading strategy