Statistical arbitrage - minimize variance ratio

Since a variance ratio (defined as weighted sum of auto-correlations) can tell if a series is mean reverting, random walk or trending, attempted a minimization of the variance ratio using scipy.optimize for 50 stocks from energy sector to find the weights of the portfolio.

The result shows a nice stationary mean reversion series.

17
Notebook previews are currently unavailable.
7 responses

Similarly maximizing the shape of variance ratio, gives a trending series. so the weights of the portfolio obtained from maximization should be trending.

5
Notebook previews are currently unavailable.

Does it persist out of sample?

Sadly doesn't persist out of sample. I am beginning to think that if co-integration and all these spread trading strategies (pair or basket) don't work out of sample there must be some other statistical relationship other than spread that could be persistent. Just need to find what it is?

i just wondering how it can not persist out of sample.
In terms of trading the mean reversion would you just search for the correct variance to trade.

Andrew

Well, as Aaron alluded to, there almost certainly ARE true co-integrating relationships out there, but if you don't look for them with the thesis first, they are drowned by all the false positives caused by spurious relationships. In the same way that http://rnm.simon.rochester.edu/research/FMFM.pdf points out that momentum might be basically about earnings momentum, perhaps the solution is to choose a narrow basket of stocks with known co-integration to some external/fundamental driver(s), then trade the residuals of those predictions. Instead of trading four refining stocks against each other, trade four refining stocks against their predictions based on their relationships to oil price, oil contango, crack spreads, natural gas, who knows...

I don't know much about the underlying rationale of this model http://www.tradingvolatility.net/p/spy-arbitrage-model.html but the idea is interesting, somewhat unrelated.

I increased length of in sample window and also maximized regression r-squared. It now does well for 55 days out of sample! I would really appreciate if you can play around with different dates and sectors to see if this persistence of out of sample is valid for all of them.

11