A deterministic, rule-based multi-asset allocation strategy. Three assets (SPY equity, LQD investment-grade bonds, gold), two regimes (normal and defensive), six stress signals deciding which regime is active, plus a dip-buy overlay and a drift-only rebalance rule. No machine learning, no retraining — every decision is reproducible from publicly available data.
Equities deliver the highest long-run real return of any liquid asset class — but they also deliver −56% (2007–09), −34% (Mar 2020), and −25% (2022) drawdowns along the way. Holding through those losses requires more conviction than most investors actually have.
Tactical de-risking can help — but only if the rules are written down, applied unconditionally, and don't depend on a forecaster who happens to feel bearish that week.
This site implements one specific set of those rules and shows the results.
Buy & hold sounds easy until it's down 35%. Most discretionary investors capitulate near the bottom and miss the recovery — the strategy is built to remove that decision.
Backtests packed with parameters always look great in-sample. The strategy was walk-forward-validated across seven non-overlapping folds before we trusted its numbers.
Every rule fits on one page. Inputs come from FRED and yfinance. There are no model artifacts to retrain, no calibrators to maintain, no opaque ensembles.
When the macro environment is calm, the portfolio holds 50% equity, 30% bonds, 20% gold. When any one of six stress signals fires, it flips to 10% equity, 60% bonds, 30% gold. That's it.
Both allocations sit inside the top 3% of a 14,400-strategy grid search on the full 2002–2026 window. The exact pair was not the in-sample optimum — that was deliberately rejected as overfitting. They were chosen for robustness across walk-forward folds.
The signals are independent across six distinct stress axes: price momentum, the yield curve, realised volatility, the dollar, gold, and the sovereign-risk premium. Each is point-in-time — no look-ahead. The composite is a logical OR.
SPY[t] < SPY[t − 189]
The slowest-moving signal. Negative 189-day momentum has preceded every modern bear market.
min(T10Y2Y[t−150 .. t]) < 0
A 6-24 month leading recession indicator. The 150-day window captures the lag from inversion to downturn.
σ_21d × √252 > 0.30
Fast panic-regime detector. Crosses 30% annualised when intraday volatility spikes.
DXY[t] / DXY[t − 21] − 1 > 0.05
Captures global liquidity stress and carry-trade unwinds — when the dollar surges, equity tends to break.
Gold[t] / Gold[t − 63] − 1 > 0.15
Flight-to-quality / fiat-stress indicator. A 63-day gold rally usually coincides with broader risk-off.
z(THREEFYTP10) > 2 (expanding window)
Sovereign risk premium spike. Z-score above 2 captures fiscal/monetary stress on the long end.
When no stress signal is firing AND SPY is between 5% and 10% below its 21-day high, the strategy boosts SPY by +40 ppts (taken proportionally from LQD and gold). The dip-buy overlay disengages strictly below −10% — that cap is essential to avoid the anti-mean-reversion trap that 2008 and March 2020 would otherwise spring.
No monthly calendar trigger. A rebalance fires only when at least one leg drifts more than 10 ppts from its target. In a 23-year backtest that works out to roughly 11–12 rebalances per year on average — about half the count of a 5% drift rule, and worth ~0.67 ppts of CAGR per year net of 5 bps trading costs.
The same six inputs produce the same six signals produce the same regime decision produce the same target weights. The pipeline has no parameters that drift.
SPY · LQD · GLD · DXY from yfinance; T10Y2Y & THREEFYTP10 from FRED.
Compute the six signals, take their OR, set the regime, apply the dip overlay.
Cap-floor renormalise to [10%, 80%]. Publish target weights, regime, signal state.
A GitHub Actions workflow runs the pipeline every weekday. There's no quarterly retrain, no calibration refresh, no model versioning — because there is no model.
See the walk-forward validation, the 14,400-strategy grid, the rebalance-frequency sensitivity study, and the crisis-by-crisis decomposition on the Methodology page.