Premiss tested a long/cash SPY rule on daily bars from 2022 through 2025. The rule finished at $10,613.21 from $10,000, a 6.13% return. The matched price-only buy-and-hold baseline finished at $14,323.87, a 43.24% return. The record contains 21 execution fills. This is one historical illustration of an inspectable research workflow.
| Metric | 20/50 SMA rule | Buy and hold |
|---|---|---|
| Final simulated equity | $10,613.21 | $14,323.87 |
| Total return | 6.13% | 43.24% |
| Annualized return | 1.50% | 9.39% |
| Maximum drawdown | 28.63% | 25.30% |
| Time exposed | 65.03% | 99.91% |
| Execution fills | 21 | 1 |
What did the strategy actually do?
After a completed daily bar, calculate the mean of the latest 20 closes and the mean of the latest 50 closes. Target 100% long exposure when the shorter average is above the longer average. Otherwise target cash. Orders fill at the next eligible bar open.
This is a state rule: the first eligible decision can enter if the fast average is already above the slow average. It does not require a fresh crossover before opening the first position. The selected template requests a 51-bar history window; its source checks for at least 50 closes. There are no shorts, leverage or stop orders in this test.
The first recorded buy was on 3 January 2022 at $476.68. The next sell was on 24 January at $439.80, with a recorded realized loss of $773.68. Inspecting those rows connects the written rule with the simulated executions. Twenty-one fills count individual buys and sells, rather than 21 completed round trips.
Keep the test specification beside the result.
The chosen market was SPY, quoted in USD, using Premiss daily bars. The requested period was 1 January 2022 through 31 December 2025 inclusive. Starting capital was $10,000. The saved settings used zero basis points for both fees and slippage, producing $0 recorded fees.
Prices are raw and unadjusted, with no dividend reinvestment. Daily UTC buckets can include extended-session data and need not match a regular-session adjusted chart. The benchmark is therefore the matched price-only simulation from this run, rather than a published total-return index. Spreads, market impact and taxes are outside the selected assumptions.
We ran one selected 20/50 specification for this case study. We did not search other moving-average windows or select a more favorable result afterward. Under these settings, buy and hold returned more and had a smaller maximum drawdown. The useful artifact is the complete record of what the tested rule did.
Open the code, trades and equity.
All 1,078 equity observations for each curve and all 21 fills are available below. The published return and maximum drawdown were independently recalculated from the exported equity observations and matched the recorded report. Download the files to inspect the exact values behind the rounded table.
- Settings, results and recorded run IDs — JSON
- Tested Python strategy
- Every recorded fill — CSV
- Strategy and benchmark equity — CSV
- Equity chart — PNG
The exports describe the completed historical simulation. They do not create a live order or start a paper bot. Historical and paper results are hypothetical; this example is a research method, not a forecast or a recommendation to trade SPY.
Take this specification into Premiss.
Copy the published settings, check market coverage and inspect the generated Python before testing. Compare the new record with its matched baseline and open at least one entry and exit.
Backtest SPY on daily bars from 2022-01-01 through 2025-12-31 inclusive, starting with $10,000. After each completed bar, target 100% long when the 20-bar SMA is above the 50-bar SMA; target cash otherwise. Fill at the next eligible bar open. Use zero fees and zero slippage to reproduce the published assumptions. No shorts, leverage or stops. Confirm supported market coverage, show the exact Python and settings, then compare with the matched buy-and-hold baseline and provide all recorded fills and equity observations. Explain the price-adjustment and session basis.
Copying stays on your device. Opening Premiss does not submit the prompt or start a test.
Check signal and fill timing ↗Sources and related reading
- The recorded Premiss case-study export
- The tested strategy source
- Premiss — official product
- How to read backtesting metrics
- How trading costs affect a backtest
Published by Premiss, a LoraLabs product. The same publisher operates this reference and the application used for the test.