How to Run a Backtest
1
Open Backtest
Tap Backtest in the navigation. Available in the web app at app.shekel.xyz/backtest and the mobile app.
2
Choose Your Agent (Optional)
Connect your Shekel API key to load your saved strategy, whitelist, and risk settings automatically. Or configure a custom strategy from scratch.
3
Configure the Run
- Tokens — which assets to simulate trading
- Date Range — the historical period to test (minimum 3 months recommended)
- Interval — how often the AI makes decisions (matches your live agent’s run schedule)
- Model — which AI model makes the decisions
- Capital — starting portfolio value for the simulation
- Data Sources — which data sources to include (same options as live)
4
Review the Credit Estimate
Before running, you’ll see an estimated credit cost. The estimate is conservative — actual cost is settled from real token usage after the run completes, and any over-reservation is refunded automatically.
5
Run
Tap Run Backtest. The engine runs in the cloud — you can close the app and return when it’s complete. Active backtests appear on the dashboard.
What Happens During a Backtest
The engine steps through time at your chosen interval. At each step:- Historical market data is assembled for that exact timestamp (prices, order book, technicals, sentiment, etc.)
- Your custom endpoint is queried for data at that timestamp (if configured)
- The AI model reads the full context and decides: open (LONG/SHORT), add to a position, reduce (partial close), set or re-tune a take-profit ladder, manage exits (trail the stop, re-set targets), flip, close, or wait
- If the decision is actionable, the simulated trade executes at the historical price
- Portfolio state is updated (position sizes, P&L, drawdown)
Tips for Good Backtests
Use at least 3 months of data. Shorter windows may fit noise rather than signal — a strategy that “works” on a 2-week period isn’t meaningful. Test multiple models on the same strategy. Different AI models produce meaningfully different results. Claude Opus and Grok 4.3 may reason differently about the same setup. Watch for overfitting. If a strategy only works on one specific time period, it’s probably not robust. Test across different market regimes (trending, ranging, high-volatility). Compare against your live results. Once you’re live, use the agent chat to compare your live performance against backtest expectations. Divergence is signal — ask your agent why. Match your backtest settings to your live settings. Use the same model, interval, whitelist, and data sources. Differences between backtest and live configurations are a common source of confusion.Rigorous Mode (5× range report)
A normal backtest is one run — but because the AI runs at a temperature above 0, a single run is just one of many possible outcomes (it can look great or poor by luck). Toggle 🎲 Rigorous (5×) on the config to run the exact same test 5 times and see the range of what could happen instead of one number. You get one card (with a live running mean P&L while the 5 run) and, when all finish, a Range Report:- Average and median return, and the full spread (worst → best run)
- How many of the 5 runs were profitable, and the worst-case drawdown
- A plain-English robustness verdict — Robust / Moderate / Fragile / Coin-flip
- A stress floor (your worst run) so you judge the downside, not just the upside