Objective
This project implements systematic futures trading strategies inspired by Robert Carver's framework. The goal was not simply to maximize backtest return. The goal was to understand how data construction, volatility estimation, position sizing, diversification, leverage, and trend filters interact to shape Sharpe ratio, drawdowns, tail behavior, and robustness across regimes.
Data construction and futures adjustment
A key implementation issue is that roll gaps must not be booked as P&L. The data are Yahoo Finance front-month series, which jump when one contract expires and the next takes over. I built an exchange roll calendar (first-notice and last-trade dates for every contract) and neutralised the return on each roll day, so the backtest measures the economic return from holding the futures, not artificial jumps caused by contract rolls. True Panama back-adjustment would need individual contract prices, which this data source does not provide.
I also treated instrument-specific contract mechanics as part of the risk system. Riskier futures generally have higher initial margin requirements, require more cash to start trading, and can create larger variation margin calls once held. This matters because position sizing cannot be separated from contract notional, capital, margin, and leverage.
Risk metrics and evaluation principles
I evaluated strategies using both Sharpe and Sortino ratios. Sharpe uses a 0% risk-free rate: futures prices already embed the financing cost, so futures P&L is an excess return, and the cash posted as margin earns the risk-free rate on top. Sharpe divides by total volatility, so it penalizes both upside and downside volatility. Sortino is useful as a complement because it focuses on downside volatility and helps detect negative skew.
I treated drawdown analysis as central. Maximum drawdown is useful, but for fat-tailed returns, average drawdown and tail metrics are often more informative than one realized worst event. Since strategy returns are fat-tailed, lower- and upper-percentile ratios are more useful than relying on kurtosis alone.
Volatility estimation
Equal-weighted rolling standard deviation can create fake volatility jumps. If a large return occurred 28 days ago, volatility can suddenly fall or jump when that observation exits the rolling window, even though the current risk environment has not changed. To avoid this artifact, I used exponentially weighted volatility estimates.
The logic is that volatility clusters in the short run but mean reverts over longer horizons. For forecasting future volatility, I therefore blend short-run and long-run volatility estimates. The short-run estimate reacts to current market stress; the long-run estimate prevents the strategy from taking excessively large positions just because the recent window is quiet.
Position sizing and leverage
Position sizing is based on volatility, not raw confidence scores. The core idea is to size contracts so that each position contributes a controlled amount of risk. This improves Sharpe and reduces the chance that a high-confidence but high-volatility signal dominates the portfolio.
leverage ratio = total risk appetite / risk of one contract
contract leverage ratio = notional exposure per contract / capital
I treated the theoretical Kelly-optimal risk as approximately related to the strategy Sharpe ratio, but used the practical rule that target risk should be closer to half-Kelly. This is more robust because estimation error, tail risk, and regime changes make full-Kelly sizing too aggressive.
Portfolio construction and covariance
The portfolio stage volatility-scales individual instruments and then accounts for correlations across contracts. Long-term covariance estimates are preferred because correlations are noisy and unstable over very short windows. Efficient portfolio optimization is less necessary when leverage is available because portfolio risk can be adjusted through position scaling rather than requiring fully optimized static weights.
A major practical risk is that volatility targeting can create very large positions during quiet periods immediately before crises. Blending volatility and covariance horizons is therefore not just a smoothing choice; it is a crisis-risk control.
Trend overlay
The trend overlay uses a slow exponentially weighted moving average crossover (64/256 days), divided by price volatility so trend strength is comparable across markets, scaled and capped at ±20. Each portfolio position is multiplied by this forecast, so strong trends get more risk and weak trends less. My interpretation is that these indicators work better for sizing longs than for shorting: the forecast is floored at zero, so a long fades out as its trend dies instead of flipping into a short.
Signal strength can be used for sizing, but extreme indicator values need caps or scaling. Capping prevents blow-ups near reversal points, while min-max scaling can preserve relative signal strength when extreme values are not obviously nonsensical. Reversal probabilities could also be incorporated into the sizing logic to reduce account-level damage from sharp reversals.
Empirical observations from the implementation
- Risk management and position sizing drove performance more than raw signal accuracy.
- Higher Sharpe is more useful than higher raw return because high-Sharpe strategies can be levered more safely.
- Annualization of daily volatility assumes low autocorrelation; it is usable but should not be treated mechanically.
- Equities and commodities often bounce sharply after strong negative trends, while the reverse is less reliable.
- VIX tends to fall sharply after strong positive trends, while the reverse is less reliable.
- Initial weights or no-trade warmup periods are important before lookback windows are populated, otherwise early trades can be oversized.
From one book to two
The final system holds two books at equal risk, scaled together to 10% volatility, from 2005 to November 2026, after a 5 bp cost on every position change. All settings were fixed on 2005–2015; 2016–2026 was run once as the out-of-sample check.
- Book 1, trend: risk parity on 27 futures in five classes, with long-only trend-strength sizing. Energy was dropped: it carries no holding premium.
- Book 2, risk premia: 30 S&P 500 stocks, the US index futures and broad equity and credit ETFs, held by risk parity and hedged by a long-memory regime signal.
Book 1: what each layer contributes
| Strategy | Measured as | Sharpe | Out of sample 2016–26 | CAGR | Volatility | Max Drawdown |
|---|---|---|---|---|---|---|
| Buy & hold | average single market | 0.32 | 0.30 | 4.5% | 22.1% | -60% |
| Equal-weight buy & hold | portfolio, same volatility | 0.76 | 0.86 | 8.2% | 11.2% | -36.7% |
| Portfolio risk parity | portfolio, same volatility | 0.80 | 0.80 | 8.7% | 11.2% | -28.1% |
| Risk parity + trend-strength sizing | portfolio (final) | 1.11 | 1.14 | 12.6% | 11.2% | -22.6% |
A single market earns a Sharpe ratio of about 0.3. Holding all 27 equally lifts it to 0.76; correlation-aware risk parity then cuts the worst drawdown from -37% to -28% at the same volatility. Sizing each long by the strength of its trend lifts Sharpe to 1.11: risk goes to markets that are trending, and a position fades towards zero as its trend dies, so the book steps out of falling markets without ever shorting them.
Does trend sizing add value?
Regressing monthly returns of the trend book on the risk-parity portfolio at the same volatility (HAC standard errors) gives an alpha of 0.46% a month, t = 3.24, beta 0.78: about 6% a year. Out of sample (2016–2026) the alpha is 0.44% a month, t = 2.73. A binary trend mask, by contrast, was statistically indistinguishable from the plain portfolio, and letting the same signal go short lowered Sharpe in every test. Trend works here as a way to size longs, not as a reason to short.
Regime behavior: why a second book
| Episode | Trend book return |
|---|---|
| GFC (2008 to March 2009) | +3.1% |
| Euro crisis (H2 2011) | -5.0% |
| Commodity bust (July 2014 to February 2016) | -5.1% |
| COVID crash (February to April 2020) | -9.6% |
| Reflation (2021) | +27.7% |
| Rate hikes (2022) | +11.1% |
The trend book steps aside in slow bear markets (2008: +4.4% while the S&P 500 fell 37%), but sudden crashes hit before a slow trend signal can react. That gap is what Book 2 is for: it holds assets that pay a premium for bearing risk, and cuts them when the risk is likely to persist.
Book 2: long memory as a hedge timer
My long-memory estimator measures how persistent each asset's moves are, here on 5-minute intraday bars and re-estimated daily. Memory is a state that moves with the macro regime: it falls in crises and rebuilds in calm, trending markets. In Book 2 it is used only for timing: when an asset's price shows stress and its own memory says the move is likely to persist, its position is cut. Why this works, with volatility controls, placebos and out-of-sample tests: Long Memory and Crash Risk.
The rule. Each asset's memory is estimated on its last 2,789 five-minute bars (about 36 trading days of regular US hours), re-estimated every day. The hedge switches on for an asset when, as of the previous close, both hold:
- Memory is high: the asset's memory is in the top third of its own trailing 252 days.
- Price shows stress, defined by how each class sells off.
Once on, the position is cut by 50% and held there for 15 trading days. Index futures (ES, NQ, YM) follow the S&P 500's state; every other asset follows its own.
| Class | Members | Stress that confirms the hedge | Why |
|---|---|---|---|
| US equities | 30 S&P 500 stocks, SPY, IWM, IJH, ES/NQ/YM | Price below its 50-day mean, or 21-day volatility above 63-day volatility | Slow grinds show in the trend, sudden shocks in volatility |
| High yield | HYG, JNK | 21-day volatility above 63-day volatility | Spread shocks show up as volatility; the 50-day trend mostly tracks interest rates |
Outside the fund, the same memory rule held up on Japan out of sample (EWJ and Nikkei futures), with stress defined as the yen above its 50-day mean: the yen is a safe haven that rises in sell-offs and hits Japan's exporters. Stress definitions were chosen on 2004–2015 data only.
| 2006–Nov 2026, 10% vol, after T-bills | Sharpe | Max Drawdown | CAGR ÷ avg drawdown |
|---|---|---|---|
| Book 2, no hedge | 0.71 | -20.6% | 1.70 |
| Book 2, memory hedge | 0.73 | -15.1% | 1.95 |
| Book 1 (trend) alone | 1.09 | -20.0% | 1.57 |
| Fund, both books, no hedge | 0.99 | -17.4% | 1.92 |
| Fund, both books, memory hedge | 1.02 | -14.3% | 2.30 |
| Fund, out of sample 2016–Nov 2026 | Sharpe | Max Drawdown | CAGR ÷ avg drawdown |
|---|---|---|---|
| No hedge | 1.03 | -16.7% | 2.43 |
| Price stress alone (Book 2 hedged 74% of the time) | 1.00 | -15.5% | 2.50 |
| Memory + stress (Book 2 hedged 41% of the time) | 1.06 | -13.8% | 2.91 |
The gain is in drawdowns, not returns: Sharpe moves only from 0.99 to 1.02 over the full period, while the worst drawdown falls by a fifth. Price stress alone hedges three days in four; memory picks the stressed days that carry the risk, hedging half as often with shallower drawdowns.
Is it timing or just hedging?
Three checks separate timing from simply holding less risk:
- Against every constant hedge. A short S&P hedge on Book 2 held every day, from 0% to 60% of its beta: out of sample no constant hedge beats no hedge (2.43), while the memory hedge reaches 2.91. In sample the best constant (2.54) beats the memory hedge (2.18), but the best constant is only known in hindsight; the memory rule was fixed in advance.
- Placebo. The hedge's dates were circularly shifted 2,000 times, keeping its spells and share of days. In the real hedge state a 3% S&P down day is 4× as likely the next day (p < 0.001), and the hedge was on for 88% of 2016–2026 shock days (p < 0.001).
- Memory inside stress. On days when price stress alone would hedge, high memory still separates the dangerous ones: a 3% down day the next day is 3.8× as likely (p = 0.004), and a 10%+ fall within the 15-day hold happens 7.6% of the time vs 2.2% (p = 0.032).
Earlier version: lessons that still hold
From the earlier 31-market, single-book version (2005–2025):
| Volatility Target | CAGR | Volatility | Sharpe | Max Drawdown |
|---|---|---|---|---|
| 20% | 11.8% | 11.3% | 1.04 | -26.9% |
| 40% | 23.3% | 22.6% | 1.04 | -48.0% |
| 60% | 34.2% | 34.0% | 1.04 | -64.0% |
Sharpe is identical at every target: return and drawdown scale together. Sharpe is the quantity to improve; the target is chosen afterwards.
| Universe | Effective bets | Average correlation | Sharpe |
|---|---|---|---|
| 21 markets | 18.1 | 0.08 | 0.88 |
| 31 markets (+10 drift sectors) | 27.7 | 0.07 | 1.04 |
| 35 markets (+ bonds and currencies) | 29.7 | 0.06 | 1.01 |
| 35 markets (+ 8 more commodities) | 33.1 | 0.08 | 1.05 |
Past about 30 markets, more assets added nothing: bonds and currencies lower correlation but carry no edge for a long-biased trend book, and extra commodities are partly near-copies of markets already held. Diversification multiplies an edge; it cannot create one. The same risk machinery, with its futures parameters unchanged, ran on 12 liquid spot coins (January 2023 to November 2025) at a Sharpe ratio of 1.04; the crypto study is written up here.
Limitations
- Futures from Yahoo Finance front-month series, with roll days neutralised from an exchange roll calendar; stocks, ETFs and 1-minute data from paid vendors, validated against separate data sources such as Databento.
- A flat 5 bp cost on every market, with no slippage or capacity model.
- Book 2's stocks are today's S&P 500 members; hedged and unhedged books hold the same stocks, so the hedge comparison is unaffected.
- The hedge does not call the exact start of a crash that comes out of a calm market (the 2025 tariff fall).
Strategy selection lessons
Selecting a strategy because it won a backtest is sample fitting. I treated the more robust approach as starting with a blended strategy, then gradually reducing weight to components that are inefficient or not economically explainable.
If a result cannot be explained logically and financially, it is likely data mining even if it looks statistically significant. To test whether an overlay adds real value, it should be regressed against the baseline strategy to estimate incremental alpha rather than judged only by standalone backtest performance.
Recommendations
- Size longs by trend strength rather than filtering by trend direction, and do not short on the same signal.
- Keep only markets with an economic reason to be held: energy left the trend book for lack of a holding premium.
- Choose the volatility target after optimizing Sharpe: Sharpe was unchanged across targets while drawdowns scaled.
- Smooth the portfolio leverage factor and blend covariance horizons to avoid cutting risk at the bottom of a shock.
- Use long memory to time protection: cutting risk premia when memory confirms price stress lifted return per unit of drawdown out of sample while hedging half as often as stress alone.
- Delay trading or preserve initial weights until lookback windows are properly populated.