Mixed

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.

One historical comparison, not a forecastThe result describes these exact SPY/BIL rules, data and execution assumptions. It does not show that BIL will outperform cash in future risk-off periods and is not investment advice.

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

Controlled Agent Lab comparison — risk-off destination is the only changed variable
BaselineVariant
Decision signalSPY Close > 200-session simple moving averageSame
Risk-on target100% SPY100% SPY
Risk-off destinationResidual cash at 0% return100% BIL as an actual ETF
Target cadenceDynamic target changes; frequency noneSame
UniverseSPY + BIL available to both configsSame
Capital / gross exposure$100,000 / 1.0$100,000 / 1.0
Commission$0$0
Dates2010-01-01 → 2026-05-01Same
Warm-up / evaluation2010-01-04 → 2010-12-31 / 2011-01-03 → 2026-05-01Same

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.

CAGR
+9.8% → +10.0%
Max drawdown
-19.1% → -19.1%
Volatility
+11.7% → +11.7%
Sharpe
0.859 → 0.875
Calmar
0.510 → 0.520
Avg cash
+16.1% → +0.8%
Full metric comparison, evaluation window 2011-01-03 → 2026-05-01
MetricMA200 gate → cashMA200 gate → BIL
CAGR+9.8%+10.0%
Maximum drawdown-19.1%-19.1%
Annualized volatility+11.7%+11.7%
Sharpe ratio0.8590.875
Calmar0.5100.520
Final value of $100,000$417,838$430,249
Executed fill records78157
Trades per year5.110.2
Dollar turnover (% of avg. AUM / yr)+243.6%+479.0%
Average cash (% of portfolio)+16.1%+0.8%
Lab summary completed trades4895
Annual returns (%) — MA200 gate → cash vs MA200 gate → BIL
YearMA200 gate → cashMA200 gate → BILDifference
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
02.552011-01-032026-05-01
MA200 gate → cash
MA200 gate → BIL
Equity curve — net value, start = 1
-20%-15%-10%-5%0%2011-01-032026-05-01
MA200 gate → cash
MA200 gate → BIL
Drawdown path (%)
-40%-20%0%20%40%11121314151617181920212223242526
MA200 gate → cash
MA200 gate → BIL
Annual returns (%)
0%25%50%75%100%11121314151617181920212223242526
MA200 gate → cash
MA200 gate → BIL
Average cash exposure by year (%) — daily sampled

Where BIL helped — and where it did not

A modest lift during the 2022 defensive stretchThe 2022 calendar-year return improved from −12.80% to −11.73% while the shared SPY gate was frequently risk-off. This is consistent with BIL adding some return when the alternative is zero-yield cash. It did not materially reduce the maximum drawdown, which remained around −19% in both runs.
  • 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

Verdict: mixed, with a near-null risk changeBIL modestly improved full-window growth and the 2022 result, but barely changed maximum drawdown or volatility and nearly doubled one-way turnover. In this implementation, the fallback changes some cash drag; it does not change the main risk profile of the SPY trend gate.

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.

Reproducibility record
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.

MA200 gate → cash (W2-1 baseline — SPY MA200 with cash fallback)
Exact baseline configuration recorded in study provenance.
{
  "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"
}
MA200 gate → BIL (W2-1 variant — SPY MA200 with BIL fallback)
Exact variant configuration recorded in study provenance.
{
  "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.

© 2023–2026 Chat2Invest — evidence-first ETF strategy research.