Wrote more of pairs trade implementation