Moved pair of stocks dataFrame to a function.