Monte Carlo simulation engine for LLM routing strategy validation and prediction market alpha evaluation.
Traditional backtesters run a single linear equity curve. They tell you what did happen, not what could happen. This harness uses Numba-accelerated Monte Carlo simulation to generate thousands of parallel equity paths from the same return distribution, answering the questions that matter:
- What's the probability of ruin? Not a guess. A distribution.
- What do P5/P50/P95 equity paths look like after 250 trades?
- Does the edge survive after Kalshi's 7% bounded-profit fee or Polymarket's maker-taker spread?
| Feature | Description |
|---|---|
| Monte Carlo Engine | Numba @njit(parallel=True) for millions of equity paths per second |
| Fee Models | Pluggable FeeModel protocol. Ships with Kalshi bounded-profit and Polymarket flat maker-taker |
| Tearsheet Analytics | Sharpe, Sortino, Calmar, max drawdown, win rate, total return, VaR/CVaR |
| Walk-Forward Validation | Expanding/rolling window with purging/embargoing |
| Edge Mining Integration | Native verdict-edge signal evaluation under friction |
| Reproducible | Deterministic seeds, versioned configs, artifact hashing |
# Install
pipx install verdict-backtest
# Run a quick backtest
verdict-backtest run --config config/kalshi_default.yaml --paths 10000 --seed 42# config/kalshi_default.yaml
engine:
paths: 50000
trades: 250
seed: 42
strategy:
win_rate: 0.58
avg_win: 0.012
avg_loss: -0.008
fee_model: "kalshi_bounded"
validation:
walk_forward:
window: 100
step: 25
purge: 5
embargo: 5- Verdict Core: https://github.com/verdict/verdict-core
- Verdict Edge: https://github.com/verdict/verdict-edge
- Verdict Risk: https://github.com/verdict/verdict-risk
- RuVector: https://github.com/ruvnet/ruvector
MIT — see LICENSE