Backtest Kit is a production-grade TypeScript framework for building, testing, and deploying trading strategies across crypto, forex, and decentralized exchanges. Write your strategy once — the same code runs in both historical backtest and live real-time modes, with automatic crash recovery, signal validation, and a streaming execution engine designed for large datasets.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/theonetrade/backtest-kit/llms.txt
Use this file to discover all available pages before exploring further.
Quickstart
Get from zero to a running backtest in under five minutes
Core Concepts
Understand schemas, signals, the execution engine, and modes
API Reference
Full reference for Backtest, Live, Cron, Broker, and all functions
Ecosystem
CLI runner, UI dashboard, MongoDB persistence, Pine Script support, and more
Why Backtest Kit?
Backtest Kit treats your strategy as a time execution engine — not a data processing script. The framework streams through historical candles or real-time ticks using the same async generator pipeline, so the exact same strategy code works in both modes without any modification.Crash-Safe
Atomic persistence recovers live bots from crashes with no duplicate trades or lost positions
Signal Validation
Built-in checks for TP/SL direction, R/R ratio, whipsaw protection, and portfolio limits
AI-Ready
LLM strategy generation via Ollama, OpenAI, Claude, DeepSeek, and 10+ providers
Realistic PNL
VWAP-based pricing with configurable slippage and fee calculations
Multi-Symbol
Run parallel backtests across many symbols with coordinated Cron scheduling
Full Reports
Auto-generated Markdown reports with Sharpe, Sortino, Calmar, win rate, and drawdown
Get Started in Minutes
Install the package
The fastest path is the CLI scaffold — zero boilerplate in your project files:Or install the core library directly for full control:
Explore the Documentation
Schema Registration
Learn how to register exchange adapters, strategies, frames, and risk profiles
Signal Lifecycle
Understand how signals move through idle → opened → active → closed states
Broker Adapter
Connect to a real exchange with transactional safety and automatic retry
Cron Scheduler
Schedule jobs in virtual time across parallel backtests without double-firing
Ecosystem Packages
CLI runner, UI dashboard, MongoDB/Redis persistence, Pine Script, and AI inference
Strategy Examples
Real strategy implementations: neural networks, Pine Script, LLM sentiment, DCA ladders