Running a backtest
How to run a backtest, what scenarios are available, and how to read the results.
Running a backtest takes a few clicks from a strategy's detail page. This article covers the steps to launch one, the three preset market scenarios available in the current beta, and a reference for each result metric shown in the output panel.
Admin beta
Backtesting is currently in admin-controlled beta. Access is enabled per-account. See Backtesting overview.
Running a backtest
- Open a strategy's detail page.
- Click Backtest (visible only if you have backtesting access).
- Choose a scenario (see below).
- The backtest runs and results appear inline.
Scenarios
Three fixed scenario presets are available:
| Scenario | Historical period |
|---|---|
| Bull market | A sustained uptrend period for the strategy's base asset |
| Bear market | A sustained downtrend period |
| Sideways market | A range-bound, low-directional period |
The Coinrule team configures which historical date ranges map to each scenario. Custom date ranges and walk-forward analysis are not available in the current beta.
Result metrics
| Metric | Description |
|---|---|
| Total P&L (USD) | Sum of all realized P&L from closes |
| Win rate | Percentage of closed positions that were profitable |
| Max drawdown | Largest peak-to-trough decline in the equity curve |
| Total trades | Number of entries (open events) |
| Average hold time | Average time between open and close |
Equity curve
The equity chart shows cumulative USD P&L over the backtest period. Each trade is a point on the curve.