I'm excited to ask my first question here! I'll try to describe the mean-reversion strategy with some background, then explain what I couldn't understand.
The strategy is described in Earnest Chan's Algorithmic Trading, chapter 5, page 123.
Earlier in the chapter the author proposes a constant roll return pricing model for futures: $F(t, T) = S(t)e^{\gamma(t-T)}$, where S(t) is the spot price, t is current time, T is maturity time and $\gamma$ is the (annualized) roll return. Based on this model he observes that,
the log market value of a calendar spread portfolio with a long far contract and a short near contract is $\gamma(T_1 - T_2)$, where $T_1<T_2$.
This is because the log market value of a {-T1, T2} portfolio is $logF_2-logF_1 = \gamma(t-T_2) - \gamma(t-T_1) = \gamma(T_1 - T_2)$. For future reference a {T1, -T2} portfolio has the market value $\gamma(T_2 - T_1)$.
Now comes the strategy! It uses daily crude oil futures data from ~2004 to 2012. The roll return $\gamma$ was computed at each time using the first 5 contracts ($\frac{\partial log(F)}{\partial T} = -\gamma$). It's stationary from the ADF test (details omitted). Here's a time series of $\gamma(t)$:
Using $\gamma(t)$, the author computes the z-score using some lookback window:
MA=gamma.rolling(lookback).mean()
MSTD=gamma.rolling(lookback).std()
zScore=(gamma-MA)/MSTD
He then picks a pair of contracts (far and near) on each day based on:
- The holding period for each pair of contracts is 3 months
- Roll forward to the next pair of contracts 10 days before the near contract expires
- The far and near contracts are 1 year apart
These rules aren't relevant to my question, I've included them for completeness' sake.
Finally, the position size of the near/far contracts is determined as follows:
On days when the zscore > 0, hold a {$T_1, -T_2$} portfolio (i.e. long near, short far).
On days when the zscore < 0, hold a {$-T_1,T_2$} portfolio (i.e. short near, long far).
I'm confused about this rule. I thought when the zscore < 0, $\gamma$ will increase to revert to the mean. So this is when we want the portfolio market value to be $\gamma(T_2 - T_1)$, or $\gamma$ * (some positive number), so it can increase. This corresponds to a {$T_1,-T_2$} portfolio.
Any help in making sense of how he determines the position based on the zscore of $\gamma(t)$ is appreciated!