AI For Trading: Variations of Pairs Trading and Mean Reversion Trading (30)
Variations of Pairs Trading or Mean Reversion Trading
Note that it’s also possible to extend pairs trading to more than two stocks. We can identify multiple pairs and include these pairs in the same portfolio. We can also analyze stocks that are in the same industry. If we grouped the stocks within the same industry into a virtual portfolio and calculated the return of that industry, this portfolio return would represent the general expected movement of all stocks within the industry. Then, for each individual stock series, we can calculate the spread between its return and the portfolio return. We can assume that stocks within the same industry may revert towards the industry average. So when the spread between the single stock and the industry changes significantly, we can use that as a signal to buy or sell.
Cointegration with 2 or more stocks
Generalizing the 2-stock pairs trading method
We can extend cointegration from two stocks to three stocks using a method called the Johansen test. First let’s see an example of how this works with two stocks.
The Johansen test gives us coefficients that we can multiply to each of the two stock series, so that a linear combination produces a number, and we can use it the same way we used the spread in the prior pairs trading method.

In other words, if the first stock series moves up significantly relative to the second stock, we can see this by an increase in the “spread” beyond its historical average. We will assume that the spread will revert down towards its historical average, so we’ll short the first stock that is relatively high, and long the second stock that is relatively low.
换句话说,如果第一只股票系列相对于第二只股票大幅上涨,我们可以通过“差价”增加超过其历史平均值来看出这一点。
我们将假设价差将回落至其历史平均水平,因此我们将卖空相对较高的第一只股票,并将第二只股票做空相对较低。
So far, this looks pretty much like what you did before, except instead of computing a hedge ratio to multiply to one stock, the Johansen test gives you one coefficient to multiply to each of the two stock series.
到目前为止,这看起来非常像您之前所做的,除了计算套期保值比率乘以一个股票,Johansen测试给出一个系数乘以两个股票系列中的每一个。
为者常成,行者常至
自由转载-非商用-非衍生-保持署名(创意共享3.0许可证)