Quant · Systematic strategy

Leveraged-ETF regime strategy

Four configurations, one engine, one backtest methodology — directly comparable, each one re-runnable on demand.

A systematic strategy that shifts exposure across leveraged ETFs based on a hidden-Markov regime signal: leveraged products are punishing in choppy, mean-reverting markets and generous in trending ones, so most of the edge lives in knowing which regime you're standing in, not in the entry rule. Every configuration below shares the same regime detector, the same weekly-Friday rebalance, and the same performance methodology — the only thing that differs is each config's own risk-sizing and gating logic, so the numbers are directly comparable rather than four separate stories.

Backtest, not live Every figure on this page is a backtest result. None of these configurations are trading real capital. The code and market data behind them are private — this page and the four backtest pages it links to show computed performance only.

The engine

All four configurations run on the same regime detector, the same weekly-Friday rebalance loop, and the same fee/slippage model. What actually differs between them is layered on top of that shared core — not a uniform five-layer stack, but two genuinely different approaches to risk sizing and drawdown protection that this page's numbers let you compare directly.

Shared · Layer 01

Regime & signal

  • Macro score reads SPY/QQQ/DIA trend, semiconductor leadership, EM stress, dollar strength, rate direction, credit spread, and choppiness into one of six regimes (RISK_ON, RISK_ON_EXTENDED, NEUTRAL, RISK_OFF, CRISIS, OVERSOLD_REBOUND)
  • Per-ticker score: trend + volume-weighted momentum + intraday momentum + relative strength vs SPY/QQQ − a volatility penalty, then regime-adjusted
  • 3-state Gaussian HMM on rolling SPY returns feeds a confidence read into position sizing
  • Alpha 2 adds one thing on top: when SPY is above its 200-day average, a would-be risk-off read floors to neutral instead — the only config with this context filter
Differs · Layer 02

Risk sizing

  • RiskBalance & Conservative size the entire book off one global risk number — a single risk posture chosen from 10 discrete states, applied across every position at once
  • Alpha 1 & Alpha 2 replace that with a per-group engine: aggressive leverage, sector leverage, commodities, and defensive income each get their own independently-computed budget
  • The practical difference: a global budget can't send commodities to full deployment while aggressive leverage sits at zero — they're fighting over the same number. A per-group budget can do exactly that
Differs · Layer 03

Drawdown protection

  • RiskBalance & Conservative hard-block all trading past a drawdown threshold, then reanchor the peak-equity high-water mark once de-risked — without this they can lock into cash permanently, since a 100%-cash book never moves and drawdown-from-peak never shrinks
  • Alpha 1 & Alpha 2 never built this failure mode in the first place — a per-group budget can independently de-risk one group without forcing the whole book to zero, so there's nothing to get stuck in

Backtests

Pick one to see how it's built and its full result — including a button to re-run it fresh, right now.

Side by side

Highlighted cells mark the best result for that metric across all four configurations. * 2026 figure is partial-year, through this page's backtest window end date above.

The development arc

RiskBalance and Conservative are two parallel experiments on the same global-budget architecture, not early steps in a straight improvement chain. Alpha 1 is the real architectural break from both of them, and Alpha 2 is one further refinement on Alpha 1.

The architecture leap RiskBalance and Conservative both size the entire book off one global risk number — a single group can't be at full deployment while another sits at zero, because they're fighting over the same budget. Alpha 1 replaces that with a per-group engine: aggressive leverage, sector leverage, commodities, and defensive income each get their own independently-sized budget. The clearest evidence it works isn't the raw Sharpe ratio — RiskBalance's is respectable once its own drawdown-recovery bug is fixed — it's everything downstream of risk quality: Alpha 1 recovers from a drawdown in about half the time (364 days vs. 637-644), wins on roughly 74% of trades instead of ~55%, and gets there with almost half as many trades.

A note on methodology

These four numbers are directly comparable because they're computed the same way: same offline weekly-rebalance harness, same Sharpe/Sortino/Calmar formulas, same fee and slippage model, same 2022-to-present window. That wasn't always true of this project's earlier public materials, which mixed a QuantConnect daily-resolution backtester (for the earlier configurations) with this offline weekly-resolution one (for Alpha 1/2) — a real methodology difference that inflated the apparent gap between generations. Recomputing everything on one methodology also surfaced a real bug: an earlier version of this page's RiskBalance/Conservative numbers reflected a permanent cash-lockout state that the original strategy code had actually already fixed historically. Both are corrected here.

Backtest disclaimer All figures on this page are backtest results computed on historical market data through the window end date above, not live trading performance. None of these configurations are trading real capital. Leveraged ETFs (3× daily rebalancing) carry real volatility drag in non-trending markets, which these backtests capture through weekly rebalancing, transaction costs, and slippage modelling — not live execution frictions, which can differ. Past simulated performance does not guarantee future results. This page and the four backtest pages it links to are for informational purposes only.
Python · hmmlearn · pandas · vectorised backtesting · re-run on demand via GitHub Actions