Cash or BIL When a SPY Trend Filter Turns Off?
When a 200-session SPY moving-average gate turns risk-off, does holding BIL instead of zero-yield cash materially change the result?
From 2011 through 2026-05, replacing residual cash with BIL nudged CAGR from 9.78% to 9.99% and barely changed maximum drawdown (−19.11% to −19.05%). The 2022 loss was 1.07 percentage points smaller, but annualized one-way turnover nearly doubled. The fallback helped modestly in some long risk-off periods and hurt slightly in others; it did not transform the gate.
- Strategy family
- SPY trend gate with cash / Treasury-bill ETF fallback
- Universe
- SPY, BIL
- Data window
- 2011-01-03 → 2026-05-01 (evaluation window; 2010-01-04 → 2010-12-31 is the 200-session SMA warm-up)
- Data cutoff
- 2026-05-01
- Methodology
- c2i-research-1.2 (Agent Lab TargetAllocation; dynamic target signals)
- Last reviewed
- 2026-10-09
Short answer
Using BIL instead of residual cash made a small difference in this run. CAGR rose from 9.78% to 9.99%, while maximum drawdown moved only from −19.11% to −19.05% and volatility remained 11.69%. BIL improved the 2022 calendar-year return by 1.07 percentage points, but annualized one-way turnover nearly doubled. That is a modest carry benefit with more ETF trading, not a different outcome for the underlying trend gate.
Why this question matters
A trend filter can leave a portfolio defensive for weeks or months. Investors often ask whether that capital should remain idle or hold a short Treasury-bill ETF. Comparing cash with BIL after the same gate separates the fallback decision from the signal that decides when SPY exposure turns off.
Hypothesis
BIL may reduce the opportunity cost of sitting in zero-yield cash during long defensive stretches. Counter-evidence is that short Treasury prices can move during rapid rate changes, brief risk-off episodes may not earn much carry, and an ETF fallback creates extra entries and exits. The key question is whether any return difference is large enough to matter after the gate’s drawdowns and trading activity are considered together.
Baseline and changed variable
| Baseline | Variant | |
|---|---|---|
| Decision signal | SPY Close > 200-session simple moving average | Same |
| Risk-on target | 100% SPY | 100% SPY |
| Risk-off destination | Residual cash at 0% return | 100% BIL as an actual ETF |
| Target cadence | Dynamic target changes; frequency none | Same |
| Universe | SPY + BIL available to both configs | Same |
| Capital / gross exposure | $100,000 / 1.0 | $100,000 / 1.0 |
| Commission | $0 | $0 |
| Dates | 2010-01-01 → 2026-05-01 | Same |
| Warm-up / evaluation | 2010-01-04 → 2010-12-31 / 2011-01-03 → 2026-05-01 | Same |
Both configs use the same external SPY Close and 200-session simple moving average. A ConditionalWeight output sets SPY to 100% above the average and 0% otherwise. The baseline has no second allocation, so the unused exposure remains residual cash. The variant adds an inverse BIL ConditionalWeight and a BIL TargetAllocation leg: when SPY is below its average, BIL receives a 100% target. This uses the canonical dynamic-target path rather than two static 100% weights.
The indicator uses the decision session’s close; orders execute on the next executable trading session under canonical Engine timing. Both runs start at the shared US daily-data lower bound to provide the same moving-average warm-up. The approved evaluation window begins after that warm-up, and each NAV path is normalized to 1.0 at the first evaluation observation.
Rules and assumptions
- Universe: SPY and BIL are both included in each resolved run configuration. The baseline holds SPY or cash; the variant holds SPY or BIL.
- Gate: SPY adjusted Close above its 200-session simple moving average targets SPY; otherwise SPY target weight is zero. The variant’s BIL target is the inverse of that same Boolean signal.
- The target-allocation frequency is `none`: the capital strategy acts on a change in the dynamic target rather than on a separate calendar rebalance.
- Initial capital is $100,000; gross exposure is 1.0; long-only; no leverage. The baseline’s residual cash earns 0% in the engine.
- The signal is decided after the session close and the resulting order fills on the next executable session. There is no same-session fill or look-ahead.
- The run sets commission to $0. No spread, slippage, tax, cash interest or separately modeled ETF expense ratio is added.
- The shared data source begins in 2010. State Street lists BIL inception on 2007-05-25, so BIL does not shorten the common window. The 2026 calendar return is partial through the 2026-05-01 cutoff.
Results and evidence
The 2011-01-03 to 2026-05-01 evaluation ended at $417,838 for the cash baseline and $430,249 for the BIL variant from the same $100,000 starting NAV. The annualized return difference was 0.21 percentage points. BIL reduced average portfolio cash exposure from 16.09% to 0.85%; the cash chart below is computed from each exact run’s daily account records. The variant recorded 157 evaluation-window fill rows versus 78 for the baseline, and one-way annualized dollar turnover rose from 243.6% to 479.0% of average account value.
The metric grid, calendar returns, normalized NAV, drawdown path, cash exposure and transaction evidence are rendered from the exact-run evidence artifact. Lab summary meta.total_trades is preserved separately from portfolio.db fill-row counts because those fields have different semantics.
| Metric | MA200 gate → cash | MA200 gate → BIL |
|---|---|---|
| CAGR | +9.8% | +10.0% |
| Maximum drawdown | -19.1% | -19.1% |
| Annualized volatility | +11.7% | +11.7% |
| Sharpe ratio | 0.859 | 0.875 |
| Calmar | 0.510 | 0.520 |
| Final value of $100,000 | $417,838 | $430,249 |
| Executed fill records | 78 | 157 |
| Trades per year | 5.1 | 10.2 |
| Dollar turnover (% of avg. AUM / yr) | +243.6% | +479.0% |
| Average cash (% of portfolio) | +16.1% | +0.8% |
| Lab summary completed trades | 48 | 95 |
| Year | MA200 gate → cash | MA200 gate → BIL | Difference |
|---|---|---|---|
| 2011 | -6.1% | -6.1% | -0.1 |
| 2012 | +13.3% | +13.4% | +0.0 |
| 2013 | +31.9% | +31.9% | +0.0 |
| 2014 | +11.4% | +11.5% | +0.0 |
| 2015 | -7.0% | -7.0% | -0.1 |
| 2016 | +9.3% | +9.3% | +0.0 |
| 2017 | +21.6% | +21.6% | +0.0 |
| 2018 | -2.0% | -1.7% | +0.3 |
| 2019 | +14.6% | +14.9% | +0.3 |
| 2020 | +7.1% | +7.1% | +0.0 |
| 2021 | +28.6% | +28.7% | +0.0 |
| 2022 | -12.8% | -11.7% | +1.1 |
| 2023 | +13.0% | +13.2% | +0.3 |
| 2024 | +24.9% | +24.9% | -0.0 |
| 2025 | +10.9% | +11.6% | +0.7 |
| 2026 (YTD) | +3.3% | +3.4% | +0.1 |
Where BIL helped — and where it did not
- The return benefit was not uniform. In 2015, the BIL variant’s calendar-year loss was slightly larger than the cash baseline’s; brief defensive intervals can leave little time for BIL carry to accumulate.
- The largest drawdown in both portfolios occurred in 2020 around the gate’s exit and later re-entry path. Replacing cash with BIL barely changed its depth, so the fallback did not repair the signal’s timing risk.
- The 2022 calendar-year improvement did not produce a similar-sized change in the full-window risk profile: volatility rounded to the same value and maximum drawdown improved by only about 0.06 percentage points.
- The BIL arm generated about twice the filled transaction rows and one-way turnover. The experiment assumes zero commission and does not separately model spread or slippage, so the observed return difference is before those possible implementation costs.
Limitations and counter-evidence
- This is one historical window and one fallback asset. It does not establish that BIL will improve future defensive returns or that cash is inferior in every rate regime.
- BIL predates the chosen 2010 shared-data start. The study does not synthesize a Treasury-bill yield series or splice any pre-inception data.
- The result uses the Agent Lab canonical adjusted daily OHLC path. The artifact does not separately report a distribution attribution; no extra ETF expense ratio is modeled outside the returned price path.
- Both arms use $0 commission. The much higher BIL-variant turnover could matter under real transaction costs; this study does not add spread, slippage, tax or fee assumptions.
- The 200-session gate is held fixed. This comparison says nothing about whether the gate itself is useful, whether another lookback would work better, or whether a different risk-off asset is preferable.
- Backtest ≠ proof. Validation establishes that the configs were accepted for execution, not predictive power or suitability. This is not investment advice.
Verdict
Reproducibility & assumptions
The rules, evidence and failure analysis above are the reader-facing research. This section preserves the audit trail needed to reproduce the experiment without making engine implementation details part of the main argument.
c2i-research-1.2
MyInvestPilot Agent Lab canonical adjusted daily OHLC path; daily NAV, positions, cash, capital requests and filled transactions extracted read-only from each exact run portfolio.db artifact; data cutoff 2026-05-01.
- Warm-up: run start 2010-01-01; observed price history begins 2010-01-04; 2010-01-04 through 2010-12-31 is the MA(200) warm-up.
- Evaluation: 2011-01-03 through 2026-05-01 (3,855 daily observations), identical for both runs; evaluation NAV is normalized to 1.0 at the first observation.
- A close-based signal is evaluated for the decision session and resulting trades execute on the next executable session. Dynamic TargetAllocation uses the same frequency=none setting in both configs.
- Long-only; $100,000 initial capital; gross exposure 1.0; commission 0. The baseline has zero-yield residual cash; the variant holds BIL as an actual ETF when the SPY gate is off.
- No synthetic bill yield, pre-inception data, added spread, slippage, tax or separately modeled ETF expense ratio is included.
- Metrics use all evaluation-window daily rows. Annual calendar returns use the Lab summary series with the 2010 warm-up year omitted. NAV/drawdown samples preserve endpoints and the actual maximum-drawdown trough.
- Trade counts are exact-run portfolio.db fill rows; Lab summary meta.total_trades is recorded separately because it reports a different count.
- Exact canonical run configs, identifiers, idempotency keys and hashes are in the evidence provenance. Historical results are not a forecast or investment advice.
Advanced: exact engine configurations
These JSON configs are preserved for auditability and Agent re-runs. Most readers do not need them to understand the study.
{
"name": "W2-1 baseline — SPY MA200 with cash fallback",
"description": "When SPY closes above its 200-session simple moving average, target 100% SPY; otherwise remain in zero-yield residual cash.",
"strategy_definition": {
"market_indicators": {
"indicators": [
{
"code": "SPY"
}
],
"transformers": [
{
"name": "spy_close",
"type": "IdentityTransformer",
"params": {
"indicator": "SPY",
"field": "Close"
}
},
{
"name": "spy_ma200",
"type": "MovingAverageTransformer",
"params": {
"indicator": "SPY",
"window": 200,
"method": "simple",
"field": "Close"
}
}
]
},
"trade_strategy": {
"indicators": [],
"signals": [
{
"id": "spy_above_ma200",
"type": "GreaterThan",
"inputs": [
{
"market": "SPY",
"transformer": "spy_close"
},
{
"market": "SPY",
"transformer": "spy_ma200"
}
],
"params": {}
},
{
"id": "spy_target_weight",
"type": "ConditionalWeight",
"inputs": [
{
"ref": "spy_above_ma200"
}
],
"params": {
"true_weight": 1,
"false_weight": 0
}
}
],
"outputs": {}
},
"portfolio_construction": {
"type": "TargetAllocation",
"allocations": [
{
"symbol": "SPY",
"target_signal": "spy_target_weight"
}
],
"rebalance": {
"frequency": "none"
}
},
"capital_strategy": {
"name": "RebalancingCapitalStrategy",
"params": {
"initial_capital": 100000,
"gross_exposure": 1
}
}
},
"symbols": [
{
"symbol": "SPY",
"name": "SPY"
},
{
"symbol": "BIL",
"name": "BIL"
}
],
"start_date": "2010-01-01",
"end_date": "2026-05-01",
"currency": "USD",
"market": "US",
"commission": 0,
"update_time": "00:00"
}{
"name": "W2-1 variant — SPY MA200 with BIL fallback",
"description": "When SPY closes above its 200-session simple moving average, target 100% SPY; otherwise target 100% BIL as an actual ETF.",
"strategy_definition": {
"market_indicators": {
"indicators": [
{
"code": "SPY"
}
],
"transformers": [
{
"name": "spy_close",
"type": "IdentityTransformer",
"params": {
"indicator": "SPY",
"field": "Close"
}
},
{
"name": "spy_ma200",
"type": "MovingAverageTransformer",
"params": {
"indicator": "SPY",
"window": 200,
"method": "simple",
"field": "Close"
}
}
]
},
"trade_strategy": {
"indicators": [],
"signals": [
{
"id": "spy_above_ma200",
"type": "GreaterThan",
"inputs": [
{
"market": "SPY",
"transformer": "spy_close"
},
{
"market": "SPY",
"transformer": "spy_ma200"
}
],
"params": {}
},
{
"id": "spy_target_weight",
"type": "ConditionalWeight",
"inputs": [
{
"ref": "spy_above_ma200"
}
],
"params": {
"true_weight": 1,
"false_weight": 0
}
},
{
"id": "bil_target_weight",
"type": "ConditionalWeight",
"inputs": [
{
"ref": "spy_above_ma200"
}
],
"params": {
"true_weight": 0,
"false_weight": 1
}
}
],
"outputs": {}
},
"portfolio_construction": {
"type": "TargetAllocation",
"allocations": [
{
"symbol": "SPY",
"target_signal": "spy_target_weight"
},
{
"symbol": "BIL",
"target_signal": "bil_target_weight"
}
],
"rebalance": {
"frequency": "none"
}
},
"capital_strategy": {
"name": "RebalancingCapitalStrategy",
"params": {
"initial_capital": 100000,
"gross_exposure": 1
}
}
},
"symbols": [
{
"symbol": "SPY",
"name": "SPY"
},
{
"symbol": "BIL",
"name": "BIL"
}
],
"start_date": "2010-01-01",
"end_date": "2026-05-01",
"currency": "USD",
"market": "US",
"commission": 0,
"update_time": "00:00"
}I want to test a variation
Custom experiments are not open yet. If you understand this study and want to change one thing, choosing below helps us decide what to build next.