Pairs Trading Cointegration: Mathematical Analysis and Implementation Strategy