Ever wondered why stocks prices of competing companies like Exxon and Chevron that belong to same sector move together in a tight range or what dynamics in stock markets ensure the constant spread between these stocks? Often it is seen that factors, external or internal, could drive two or more product prices. In a similar fashion, the prices of two stocks could also change such that there is a constant spread between them. Mathematicians would attribute behavior of such time series that move together with a constant spread between them as ‘Co-intelation’ (Co-Integration and Correlation). Mean Reversion is a pair trading strategy the essence of which is based on the assumption that any two stocks with strong positive correlation tend to move together. Let us take the ratio of the stock prices as an indicator. This strategy uses the premise that even if this indicator diverges locally, will revert to its mean value defined over a period of time.

Correlation is the measure of extent of linear dependence of a time series on the other. If this dependence is strong, correlation will be higher in magnitude and the maximum value it can take is one. Correlation is a necessary condition but not sufficient for profitable mean reversion. Co-integration, on the other hand, is also a necessary condition and can be better explained using the famous drunkard and his dog example. Suppose you see two drunkards walking (two random walks). They are independent of each other because they don't have any memory of their previous positions. But suppose we have drunkards walking together with their dog on a leash. Now there is a connection between them. Even though both of them are following random walk patterns, the position of the drunkard can be predicted fairly accurately using the position of the dog and vice versa. So here the drunkard and his dog form a co-integrating pair.

Correlation and co-integration form the basis for mean reversion in pair trading. Suppose we have two stocks C1 and C2, which are both correlated and co-integrated. This implies that the relationship between the two stocks can be well defined. Let the relationship be P-C=E, where P corresponds to C1 and C corresponds to C2 and E will be a stationary series of zero mean. This means C1 can be priced as high as C2. But the moment it is more than that, we expect it to come down or C2's price to go up. So when P-C>d, where d is some positive threshold, we should sell C1 and buy C2. Similarly when P-C<-d, we should buy C1 and sell C2.

Mean reversion is less risky, however, has its own disadvantages. Especially when there are long-term trends in data, the mean drifts which results in loss-making trades. If you look at several scenarios of mean reversion, many characteristics of profitable trades unveil themselves, one such characteristic is ‘Funnel Phenomenon’. Gyan Data Private Ltd developed funnel phenomenon that proved to be very good at avoiding loss trades in these mean drifting regimes. According to funnel phenomenon, when the trend starts to develop, the standard deviation of the ratio increases, making the standard deviation envelope wider as the trend progresses. Just when the envelope becomes wider, we will know that there is going to be a trend in the near future. The name finds its origins from the shape of the ‘Bollinger band’ during the development of the trend. The strength of this trend is often well dictated by the ratio of standard deviation at the current data points over the standard deviation of previous data points. Let us call this ratio of standard deviations as Volatility.

Volatility is a good way of identifying mean drifting regimes right at the beginning of the trends. Hence, checking for volatility before we conclude a trade is a better way of avoiding loss-making trades during these mean drifting regimes. Generally, the right threshold is equivalent to two standard deviations of this statistic in the local moving window. Volatility, in the local regions can be assumed as normally distributed and hence 2σ works. It efficiently avoids most of the loss making trades that are in mean drifting regions.

Co-intelation needs to be the qualifying criterion for selecting the right pairs. To further reduce the risk, trades can be avoided in trending regimes using funnel phenomenon. On the whole profits will increase and ‘mark-to-market’ losses will decrease. Therefore mean reversion is a win-win strategy when coupled with the aforementioned strategies.