Backtest your strategy¶
A backtest helps you check how your rules behave on historical data. Inspect the trades before interpreting the performance summary.
Prepare the strategy¶
Save your draft in the editor. Resolve errors and review warnings before opening the backtest flow.
Choose a supported instrument, timeframe, period, and capital settings. Keep them consistent when comparing two versions. Provide enough history for the longest indicator lookback.
Inspect an entry and an exit¶
For the first strategy, compare a trade's timing with the RSI and moving-average conditions. Check the exit against its rule too.
Rule evaluation and confirmed execution are different observations. Do not assume a fill at the exact closing price used in the signal.
If there are no trades¶
| Check | Why |
|---|---|
| Editor or backtest errors | A failed run differs from a valid run without entries. |
| Instrument history | Missing history cannot demonstrate the rule. |
| Indicator lookback | A 200-period EMA needs suitable history. |
| Entry conditions | Restrictive or contradictory tests may never enter. |
| Capital and quantity | Capacity and minimum quantities can block entries. |
| Exact-time conditions | The schedule and data must contain the eligible bar. |
Compare like with like¶
Change one rule at a time. Read costs, drawdown, open positions, and trade count alongside return. Historical simulation does not guarantee future fills or returns.
Use SharkSigma's historical backtest flow here. The developer's local synthetic runner is a separate shape check, not performance evidence.
Separate a signal from an executed trade¶
For one trade, check the following chain:
- The instrument has valid data at the signal interval and enough earlier history.
- The schedule permits that observation.
- The entry condition matches and the position state permits the intended action.
- Sizing produces a venue-valid target within the known limits.
- The submitted action results in execution under the backtest's rules.
A crossing-only signal exists on its transition bar. If capacity blocks it then, later bars above the threshold do not recreate that crossing. A state comparison can remain true later. Independent entries do not automatically top up a continuing position.
Inspect portfolio strategies differently¶
For hold:, inspect a rebalance rather than looking for an entry: condition. Check the eligible names, scores, selected membership, allocation weights and resulting target amounts. Equal weighting across four names differs from equal weighting across the selected top two.
Make a useful comparison¶
Record the instrument list, interval, date range, funding, costs and rule version. Change one meaningful variable and compare trade timing as well as the summary. If two runs use different history or capital, the difference cannot be attributed to the edited threshold alone.
A provider-dependent rule needs its actual historical inputs. Missing factor/event data and a valid price-only strategy are different cases; confirm data availability before interpreting a run.
Continue learning Conditions and indicators →
A compiled example is not proof that its host supplies every required capability. The maintained example checks use bounded synthetic bars and assert fills or a declared negative outcome. Real indicator checks require TAP; a missing-provider skip is not a successful execution. An earnings-event schedule, custom Alpha providers, Forex dealing terms and sizing-history calendars still require their corresponding supported host integrations. The cash-equity demo does not infer those capabilities from a ticker name.