# Mechanics of mean reversion strategy for more than a pair

Inspired by recent posts on pairs trading I started digging into statistical arbitrage. There are numerous examples of mean reversion strategies based for pair trading, including classics such as the ones from Ernie Chan's book. I am having a tough time finding a nice example that utilizes larger number of instruments (any number >2 will work), where the hedge ratios from Johansen test are utilized to generate signals. Getting the hedge ratios is fairly obvious, and figuring out whether to go long or short on the spread is something that is obviously significant part of someones algo, but lets say that we use the typical z-score and bands and find some periods when we need to long the spread and others when we need to short the spread. How do you generate signals and calc returns using vectors of log returns (not doing full backtest) while taking into account the hedge ratios? Do they need to add up to 1 and then multiply log returns with corresponding weights? This gets confusing fast once you go beyond a pair because for a pair you can just long one, short the other, since you use log returns ratios don't even come in play as the relative price of the stock doesn't matter (it is done per unit).

Submitted September 27, 2020 at 12:32PM by czluv
via https://ift.tt/36aJFSX