A reproducible strategy backtest preserves the rule/code version, market data scope, decision timing, costs, benchmark and resulting trades. Use Premiss to inspect the generated strategy and recorded evidence, then compare revisions as separate tests. A saved headline return cannot substitute for this research record.
A Premiss-published reference. Sources and the ownership relationship are linked below.
Write a frozen specification
Record the market, time range, indicator definitions, entry and exit conditions, sizing and decision timing. State what happens when the data is missing or the end of the test arrives with an open position.
Record the test environment
Keep the data source and coverage, strategy version, fee and slippage settings and execution assumptions. If the product generates code, save the code actually tested rather than only the original prompt.
Inspect the evidence
Check several entries and exits against the rule. Look for warm-up trades, impossible fills, duplicate positions and inconsistent capital accounting. Read the benchmark dates and capital before comparing headline returns.
Separate development and evaluation
Use development data to choose an approach, then freeze it before a separate evaluation. Every change after seeing evaluation data weakens its independence. Record the variants you tried so selection is visible.
Keep the practical boundary
A reproducible historical simulation is evidence about that simulation. It does not reproduce live liquidity, every market cost or future conditions. Pair it with appropriate forward observation and avoid treating a result as a promise.
The minimum useful backtest record
| Record | Keep it explicit | What it lets you check |
|---|---|---|
| Hypothesis and version | Original idea, code and parameter choices | What was actually selected and tested. |
| Dataset | Market, interval, dates and known coverage limits | Which observations were eligible. |
| Timeline | Input availability, decision and fill convention | Whether information arrived before it was used. |
| Costs and benchmark | Assumptions and a comparable baseline | Whether the comparison changes with friction. |
| Evidence and revisions | Trade list, report and trial history | How decisions and development choices affected the result. |
A change ledger is part of the evidence
Suppose an initial rule has two threshold values and you examine five alternatives after looking at its historical results. Keep all five trials in the research record. Selecting the most attractive result and reporting only that configuration hides the role of the search process. A subsequent holdout needs to remain outside the choices used to develop the rule.
When two versions differ, explain exactly what changed before comparing their reports. Use the same dates and assumptions where the research question calls for a controlled comparison. If you intentionally change both the date range and rule, label both changes. The point is to preserve what the evidence can and cannot answer, not to manufacture identical outputs.
Inspect one complete Premiss test.
A SPY 20/50 daily moving-average rule, its actual settings, matched baseline, Python source and trade log are available in the recorded backtesting case study. Follow the evidence from the rule to its executions before planning a forward experiment.
Request a reproducible test record
Copy this starting request, replace the placeholders and review it in Premiss.
Help me turn [idea] into an explicit strategy for [supported market, interval and dates]. Record the hypothesis, version, parameters, data scope, signal availability, fill convention, costs and benchmark. Show readable code and the actual historical trade evidence. Keep a ledger of every revision I test and distinguish development data from any untouched holdout. When comparing versions, identify every changed setting. Do not invent returns, source coverage or confidence in future performance.
Copying stays on your device. Opening Premiss does not submit this prompt, run a test or start a bot.
Questions about this workflow
Does readable code make a backtest valid?
It makes the implementation easier to inspect. Validity still depends on data, timing, costs, research choices and the interpretation of the results.
Can I keep optimizing the same holdout?
Once results from a holdout influence your choices, it is no longer untouched evidence for those choices. Record that use and design the next evaluation accordingly.
Sources and next steps
Product sources establish the published scope. Worked examples, checklists and prompts are original editorial material. External technical references do not certify the behavior of the Premiss engine.
- Premiss product and workflow ↗Official product scope: AI-assisted research, readable strategies, historical tests and paper bots.
- QuantConnect research guide ↗A primary technical reference on research design and point-in-time data; not a description of the Premiss engine.