Time-Series Momentum in Python: Replicating Moskowitz-Ooi-Pedersen on ETFs

Time-Series Momentum in Python: Replicating Moskowitz-Ooi-Pedersen on ETFs
In this ETF replication, the apparent edge is concentrated before 2015: the 12-month strategy’s Sharpe falls from 0.97 to 0.16 across the two subperiods. Overall, its Sharpe of 0.46 is only modestly above an expanding-sample-mean benchmark at 0.39, and below always-long volatility scaling at 0.50. The results reproduce positive returns, but not a stable, clearly isolated predictability edge.
Data and verification. The inputs are yfinance daily adjusted closes for eight ETFs and the ^IRX 13-week T-bill yield as the cash proxy. The measured sample is 238 months, 2007-01 to 2026-10; the script was run on public data on 2026-11-23. I read the Moskowitz, Ooi & Pedersen paper in its open-access PDF. This is a public-data replication: there was no live trading, and no broker fills were verified.
What did Moskowitz, Ooi and Pedersen specify?
Moskowitz, Ooi & Pedersen (2012) study 58 liquid futures from January 1985 to December 2009, finding return persistence over one to 12 months that partially reverses over longer horizons. Their focal strategy uses a 12-month lookback and one-month holding period, with positions scaled by ex-ante volatility estimated from lagged squared returns.
Their Eq. 5 is:
r_TSMOM(t, t+1) = sign( r(t-12, t) ) x ( 0.40 / sigma_t ) x r(t, t+1)
Here, returns are excess returns over the risk-free rate. The volatility estimate uses an exponentially weighted average with a center of mass of 60 days; 40% is the annualized volatility target for each long or short position. MOP report positive TSMOM returns for all 58 contracts, with 52 statistically different from zero at the 5% level. Their equal-weighted portfolio has 12% annualized volatility over the sample. They say “the choice of 40% is inconsequential,” report little exposure to standard asset-pricing factors, and say the strategy performs best during extreme markets. Those are findings about their futures sample, not this ETF replication.
How does this ETF replication differ?
This implementation uses SPY, EFA, EEM, IEF, TLT, GLD, DBC and VNQ, with monthly rebalancing and a 3x per-asset leverage cap. It has 238 months of data from 2007-01 to 2026-10, not MOP’s 1985–2009 futures history. ETFs are not futures: they have no futures expiry or roll yield and carry fund expenses.
The data are yfinance daily adjusted closes, fetched 2026-11-23; ^IRX is the 13-week T-bill yield cash proxy. The results below are from a public-data script, not live trading. The only modeled trading-friction sensitivity is the stated charge per unit of traded notional: borrow and financing costs on short positions are not included.
How does the Python implementation work?
The implementation estimates volatility from lagged daily returns, forms a monthly sign signal from trailing excess returns, and caps signed positions at 3x per asset. It then applies each month-end position to the following month’s excess returns, adds the cash return, and subtracts turnover costs when requested.
import numpy as np
import pandas as pd
def ewma_vol(daily_returns):
variance = daily_returns.pow(2).ewm(com=60, adjust=False).mean().shift(1)
return np.sqrt(variance) * np.sqrt(252)
def tsmom_signal(monthly_excess, monthly_vol, k=12,
target_vol=0.40, cap=3.0):
trailing = monthly_excess.rolling(k).sum()
direction = np.sign(trailing)
position = direction * target_vol / monthly_vol
return position.clip(lower=-cap, upper=cap)
def backtest_tsmom(monthly_excess, bill_monthly, weights, cost_bp=0):
# Month-end weights are held over the following month's returns.
target = weights.fillna(0.0)
held = target.shift(1).fillna(0.0)
# Charge one side per unit of traded notional.
turnover_at_rebalance = target.diff().abs().sum(axis=1).fillna(0.0)
turnover_held = turnover_at_rebalance.shift(1).fillna(0.0)
cost = turnover_held * cost_bp / 10_000
# Equal weight across the eight assets: average the per-asset P&L.
excess_pnl = (held * monthly_excess).mean(axis=1)
return bill_monthly + excess_pnl - cost
# prices and irx are daily adjusted-close series for the stated universe
# and ^IRX, respectively.
daily_returns = prices.pct_change()
monthly_prices = prices.resample("ME").last()
monthly_returns = monthly_prices.pct_change()
bill_monthly = (irx.resample("ME").last() / 100 / 12)
bill_monthly = bill_monthly.reindex(monthly_returns.index)
monthly_excess = monthly_returns.sub(bill_monthly, axis=0)
daily_sigma = ewma_vol(daily_returns)
monthly_sigma = daily_sigma.resample("ME").last()
monthly_sigma = monthly_sigma.reindex(monthly_excess.index)
weights_12 = tsmom_signal(monthly_excess, monthly_sigma, k=12)
returns_12 = backtest_tsmom(monthly_excess, bill_monthly, weights_12)
The daily volatility series is shifted before it is sampled at month-end, so the position sizing uses lagged information. To evaluate the cost sensitivity, pass the corresponding cost_bp value to backtest_tsmom; the reported charges are per unit of traded notional, one side.
What did the measured backtest return?
The script’s 12-month strategy returned 7.80% annualized, with 16.93% annualized volatility and a 0.46 Sharpe. The full lookback grid shows weaker Sharpe for the shorter and longer alternatives listed here; benchmarks put the result in context. These are measured outputs for this ETF sample, not estimates from MOP’s futures universe.
Only the k=12 row reports drawdown, t-stat and hit rate; the other rows report the three return metrics.
| Strategy | Annualized return | Annualized volatility | Sharpe | Max drawdown | t-stat | Monthly hit rate |
|---|---|---|---|---|---|---|
| TSMOM, k=1 | 2.52% | 18.73% | 0.14 | — | — | — |
| TSMOM, k=3 | 7.84% | 18.65% | 0.42 | — | — | — |
| TSMOM, k=6 | 7.24% | 16.79% | 0.43 | — | — | — |
| TSMOM, k=9 | 5.84% | 15.75% | 0.37 | — | — | — |
| TSMOM, k=12 | 7.80% | 16.93% | 0.46 | -34.8% | 2.36 | 57% |
| 60/40 SPY-IEF | 8.06% | 9.41% | 0.86 | -29.5% | — | — |
| Equal-weight buy-and-hold, 8 ETFs | 6.29% | 10.90% | 0.58 | — | — | — |
| SPY buy-and-hold | 10.80% | 15.34% | 0.70 | -50.8% | — | — |
The 12-month result is not the best return in the lookback grid: k=3 returned 7.84%, with a 0.42 Sharpe. The 60/40 SPY-IEF benchmark has a higher Sharpe and lower volatility in this sample; SPY buy-and-hold has higher annualized return, volatility and maximum drawdown. The figures do not support a blanket claim that TSMOM beats these benchmarks.
How much of the result survives the subperiod and Huang tests?
The split changes the interpretation: the 12-month strategy’s Sharpe was 0.97 in 2007–2014 and 0.16 in 2015–2026. An expanding-sample-mean sign strategy has a 0.39 Sharpe against TSMOM’s 0.46. These are stress tests of the measured ETF result, not proof of a regime change or of predictability.
| TSMOM k=12 subperiod | Annualized return | Annualized volatility | Sharpe | Max drawdown | t-stat |
|---|---|---|---|---|---|
| 2007–2014 | 15.59% | 16.07% | 0.97 | -22.1% | 2.79 |
| 2015–2026 | 2.84% | 17.42% | 0.16 | -34.8% | 0.85 |
The shift is substantial in this sample, but the split alone cannot establish its cause. Baltas & Kosowski (CME working paper, May 2017) link TSMOM’s post-2008 underperformance in their futures study to a rise in pairwise correlations among portfolio constituents. That is a possible explanation to examine, not a proven explanation for these ETFs.
Huang, Li, Wang & Zhou (2020) provide a more direct challenge to a predictability interpretation. In their 1985:01–2015:12 in-sample period and 2000:01–2015:12 out-of-sample period, they report little evidence of asset-by-asset TSM in- or out-of-sample. They also find that a large pooled-regression t-statistic is not statistically reliable because it falls below parametric and nonparametric bootstrap critical values. Their strategy is profitable, but performs virtually the same as a historical-sample-mean strategy that does not require predictability.
The matching ETF stress test here is an expanding-sample-mean sign strategy with the same sizing: it returned 7.53% annually, with 19.26% volatility, a 0.39 Sharpe, -40.7% maximum drawdown and a t-stat of 2.06. That is close to TSMOM’s 0.46 Sharpe. The TSMOM t-stat of 2.36 is not decisive: no bootstrap test is reported for this ETF replication, and Huang et al.’s bootstrap critique is a reason not to treat a conventional t-stat alone as evidence of a robust edge.
Is the result coming from the sign signal or volatility scaling?
The always-long volatility-scaled version returns 10.46% annually with a 0.50 Sharpe, versus 7.80% and 0.46 for signed TSMOM. In this sample, adding the sign rule does not improve those headline measures over always-long sizing. That echoes, without establishing the same result, the papers’ cautions about how much performance requires predictability.
| Strategy | Annualized return | Annualized volatility | Sharpe | Max drawdown | t-stat |
|---|---|---|---|---|---|
| Volatility-scaled always-long, no sign | 10.46% | 20.76% | 0.50 | — | — |
| Expanding-sample-mean sign, same sizing | 7.53% | 19.26% | 0.39 | -40.7% | 2.06 |
| TSMOM k=12 | 7.80% | 16.93% | 0.46 | -34.8% | 2.36 |
MOP describe 40% as an inconsequential choice for their futures strategy; that does not mean the target or the sign rule is immaterial in this ETF implementation. The result is consistent with Huang et al.’s finding that a profitable TSM strategy can perform virtually the same as a no-predictability historical-mean alternative. The comparison does not isolate a causal contribution from any single component.
What diversification, positions and the equity curve show?
TSMOM’s monthly return correlation with the 60/40 benchmark is -0.069 in this replication. Annualized per-asset contributions vary widely, including a negative contribution from VNQ. These portfolio summaries describe diversification in this sample; they do not establish that the strategy’s return comes from a stable predictive effect.
| Asset | Annualized contribution |
|---|---|
| SPY | +14.98% |
| GLD | +13.51% |
| DBC | +13.19% |
| EEM | +9.91% |
| IEF | +7.62% |
| TLT | +5.48% |
| EFA | +1.55% |
| VNQ | -6.45% |
MOP’s statement that their futures portfolio performs best during extreme markets is a claim to check against an equity curve, not a conclusion to transfer to this ETF sample. The stronger 2007–2014 subperiod includes the crisis era, but the aggregate subperiod figures do not isolate crisis-specific performance. Any visual comparison should be read alongside the later weak subperiod rather than as confirmation of MOP’s futures result.
The final signal formed at the 2026-10-31 month-end and held through November 2026 is a mechanical output of the stated functions, not a trade suggestion:
| ETF | Position weight |
|---|---|
| SPY | -2.28 |
| EFA | +2.34 |
| EEM | -1.36 |
| IEF | -3.00 |
| TLT | -3.00 |
| GLD | -1.48 |
| DBC | +1.96 |
| VNQ | +2.55 |
The -3.00 weights in IEF and TLT show the 3x per-asset cap binding in this snapshot. These weights are model outputs for the stated date, not recommendations.
How sensitive is the strategy to costs, turnover and leverage?
The measured strategy has mean monthly turnover equal to 27.7% of gross exposure, while mean gross exposure is 18.37x NAV and reaches 24.0x. The stated cost sensitivity reduces the Sharpe as the per-side charge increases. This is not a fully financed or fully costed simulation: borrow and margin costs at that gross exposure are unmodelled.
| Cost per unit traded notional, one side | Sharpe | Annualized return |
|---|---|---|
| 0bp | 0.46 | — |
| 2bp | 0.45 | — |
| 5bp | 0.43 | — |
| 10bp | 0.41 | 6.94% |
The 0/2/5/10bp values are the only modeled friction sensitivity. No borrow or financing cost on short legs is included, and the results do not model broker fills. The 18.37x mean gross exposure is a real consequence of applying the per-position volatility target across eight assets, subject to the 3x cap; it should not be mistaken for a modest-leverage portfolio.
Baltas & Kosowski report that, in their 67-futures study from 1984 to 2013, a range-based volatility estimator reduced turnover by 17%, while a continuum-valued alternative trading rule reduced it by roughly 24% (t-statistic 8.49). Together, the changes reduced turnover by 36.23% (t-statistic 13.19) without a statistically strong performance penalty. Those are results from their study, not outcomes tested in this ETF replication.
What is the verdict?
The replication produces positive returns and low correlation with the 60/40 benchmark, while the subperiod split shows stronger performance in 2007–2014 than in 2015–2026. But the thin Sharpe gap over the expanding-mean benchmark and the stronger always-long result leave a stable predictability edge unestablished. The next experiments are turnover reduction and a lower volatility target.
What replicated is a profitable, diversified strategy in this measured sample, with a stronger early subperiod and behavior worth comparing with MOP’s extreme-markets claim. What did not replicate is a clean, stable separation between momentum predictability and simpler alternatives. A careful next step is to test the Baltas–Kosowski turnover reductions and a lower target volatility, while keeping the sample, costs and leverage limitations explicit.
FAQ
The practical answers are conditional on this ETF replication, not universal claims about futures or other periods. Lookback choice, return construction and sizing all matter to interpretation; the measured results favor neither a universal momentum rule nor a conclusion that the strategy has no value.
Is time-series momentum the same as trend following?
They are closely related in this implementation: the sign of a trailing return determines the position direction. The tested strategy is specifically a 12-month lookback with monthly holding and volatility-scaled sizing; results for this specification should not be assumed to describe every trend-following rule.
Why does the 12-month lookback beat 1-month?
In this sample, k=12 has a 0.46 Sharpe compared with 0.14 for k=1. The grid is not uniformly better at longer horizons: k=3 has a 0.42 Sharpe, k=6 a 0.43, and k=9 a 0.37. These measured comparisons do not establish why the results differ.
Does TSMOM still work after 2015?
The strategy remained positive in the 2015–2026 subperiod, with 2.84% annualized return, but its Sharpe was 0.16 and its t-stat was 0.85. That is weak evidence for a robust post-2015 edge in this sample, not proof that TSMOM cannot work in other markets or periods.
Closing perspective
This is a methodology replication, not a ticker-level analysis or investment recommendation. Its measured returns are positive, but the comparison with the expanding-mean and always-long benchmarks, the later subperiod and the unmodeled financing costs all limit what can be concluded from this ETF sample.
← Back to all posts

