How to Run a Backtest
1
Select a Strategy
Choose which strategy engine you want to test from the Strategy selector:
- Momentum — opens positions on directional price breakouts over a rolling lookback window.
- Grid — places buy-low / sell-high orders across a symmetric grid around the market price.
- RSI Reversion — enters long on oversold RSI readings and short on overbought readings, exiting at the mean.
2
Select a Target Market
Pick the market the backtest will simulate fills against:
Choosing different markets lets you test whether a strategy is robust across asset classes or tuned to a single instrument’s volatility profile.
3
Set Starting Cash
Enter the Starting Cash amount that the simulation will use as the initial portfolio balance. Set this to match the vault size you intend to deploy with on Devnet so the output metrics are directly comparable.
4
Set Trade Size (USD)
Enter the notional Trade Size in USD for each simulated order. This should reflect the position size you plan to use in production. Oversizing relative to starting cash tests margin stress; undersizing reveals fee drag.
5
Adjust Strategy Parameters
Fine-tune the two core strategy parameters before running:
Trend Threshold
The minimum price movement (in basis points) that triggers a Momentum entry or sets a Grid boundary. Default: 50 bps. Lower values increase trade frequency; higher values reduce noise-driven entries.
Lookback Window
The number of ticks used to calculate momentum or RSI signals. Default: 20 ticks. A shorter window reacts faster but amplifies false signals; a longer window smooths signals but delays entries.
6
Choose a Market Regime
Select the synthetic price scenario the backtest will run against. See Market Regimes below for a full description of each option.
7
Click Run Backtest
Click Run Backtest to start the simulation. The engine replays your strategy’s signal logic tick-by-tick against the selected regime’s synthetic price series and returns a full performance summary — including total return, trade count, win rate, and drawdown — once the run completes.
Market Regimes
Each regime is a synthetic price scenario engineered to expose a specific category of strategy weakness. Run all four before committing to a parameter set.🐂 Bull Trend (Upward Drift)
Simulates an upward trending market with standard crypto volatility. Momentum strategies typically excel here; mean-reversion and grid strategies may underperform as price drifts steadily beyond grid boundaries.
🐻 Bear Market (Downward Panic)
Simulates a declining market with higher volatility and sharp panic sell-offs. Tests how well your strategy manages drawdown and whether it exits losing long positions before they compound.
↔️ Rangebound (Choppy Consolidation)
Simulates oscillating price action within support and resistance boundaries. Grid and RSI Reversion strategies tend to thrive here; Momentum strategies may generate frequent false breakout signals and accumulate losses.
⚡ Flash Crash & Recovery
Simulates a stable period followed by a sudden 30% price dump, then a V-shaped recovery. Exposes stop-loss and re-entry logic under extreme conditions — critical for any strategy carrying open positions through high-impact events.
Carrying Results into Deployment
After a backtest run completes, you can carry the best-performing configuration directly to the Agent Deployment page — no manual re-entry of parameters required.1
Identify your best run
Compare results across regimes. Look for configurations with the best combination of total return, low max drawdown, and consistent win rate.
2
Click 'Deploy with This Configuration'
On the backtest results panel, click the one-click Deploy with This Configuration button. ViperX pre-fills the Agent Deployment form with your exact strategy engine, trade size, and parameter values.
3
Review and register
On the Deployment page, confirm the pre-filled values, connect your wallet, and sign the registration transaction to go live on Devnet.