clause

Start from this strategy

Sign up to remix

Once you have an account, this opens in your Terminal as a draft of your own.

CLAUSE · BACKTEST REPORT · HYPOTHETICAL PERFORMANCE

Gold vs SPY switch on Oil 100-day MA

“buy gold when oil is above its 100 day moving avg otherwise buy spy”

Tested over January 2025 to September 2026. On data sealed Sep 3, 2026. Published 3 September 2026.

The contract

  1. 1. Universe. Trade only GLD, SPY, USO.
  2. 2. Signal. Each trading day at 09:35 ET, read USO’s close price.
  3. 3. Signal. Also read USO’s 100-day simple moving average.
  4. 4. Exit. If USO’s close price exceeds USO’s 100-day average, set the target allocation of GLD to 100% and sell all SPY.
  5. 5. Exit. Otherwise, set the target allocation of SPY to 100% and sell all GLD.

Equity vs SPY buy-and-hold

STRATEGYSPY BUY-AND-HOLD▲▽ FILLSlinear scale
+0%+20%+40%+60%20252026

Tear sheet

TOTAL

+28.2%

CAGR

+16.9%

VOL

25.1%

SHARPE

0.75

SPY SHARPE

–

BUY-AND-HOLD SHARPE

–

SORTINO

1.06

MAX DD

−26.6%

LONGEST DD

–

BETA

0.02

GROSS

–

GROSS MAX

–

NET

–

LONG

–

SHORT

–

TRADES

81

TURNOVER

–

COST DRAG

–

CAPACITY

–

FINAL VALUE

$128,186 from $100,000

MARGIN NOTES

most of the return came from 2025-10-03 to 2026-01-29 — one stretch carries the result

Per-clause attribution

Each number re-runs the backtest with that clause removed and shows what it contributed, so they do not add up to the total.

Clause 4
+1.4%
Clause 5
−28.4%

About these numbers

Window

Tested from Jan 28, 2025 to Sep 1, 2026. On a copy of the market sealed Sep 3, 2026.

Costs

Every fill pays spread and slippage. This run predates the written cost model; run it again to see the assumptions key by key.

Attribution

Each clause's share of the result is measured by re-running the backtest without it.

Hypothetical performance on historical data. The same contract on the same data and cost model reproduces this number exactly. Backtests are not indicative of future results.

Share this strategy

A strategy that reads a whole index can take a few minutes the first time.

Gold vs SPY switch on Oil 100-day MA · Clause