TheDocumentation 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.
@backtest-kit/sidekick package scaffolds a backtest-kit project where all wiring is visible and editable in your own project files. Think of it as the eject path from @backtest-kit/cli --init: instead of infrastructure being hidden inside the CLI package, the exchange adapter, frame definitions, risk rules, strategy logic, and the runner script all live as editable TypeScript source files directly inside your project. You own every line.
Sidekick vs CLI
@backtest-kit/cli | @backtest-kit/sidekick | |
|---|---|---|
| Infrastructure location | Hidden inside CLI package | In your project files |
| Customisation | Config flags only | Full source-level control |
| Best for | Fast startup, standard setups | Custom adapters, advanced control |
| Entry point | npm start via CLI binary | Your own runner.ts |
If you later find the CLI too restrictive, Sidekick gives you the equivalent starting point with all wiring exposed — a clean eject without starting from scratch.
Key Features
Zero Config Startup
One command scaffolds a complete, working project. No manual dependency wiring or configuration required.
Complete Template
Includes a backtest strategy, risk management rules, frame definitions, exchange adapter, and a runner script — all as editable source files.
AI-Powered
Pre-configured with a DeepSeek → Claude → GPT-5 fallback chain so LLM-powered strategies work out of the box.
Technical Analysis
Built-in 50+ indicators via
@backtest-kit/signals are included in the template with multi-timeframe support.Environment Setup
Auto-generates a
.env file with all API key placeholders for every supported exchange and LLM provider.Best Practices
Production-ready code structure with examples for signal validation, risk rules, and LLM context injection.
Getting Started
Configure your environment
Open the generated
.env file and fill in your exchange API keys and LLM provider tokens. All placeholders are pre-labelled.What Gets Generated
Sidekick creates a fully working project with the following structure:| File | Purpose |
|---|---|
exchange.ts | Exchange adapter wired to CCXT with getCandles and price formatting |
frames.ts | Frame definitions — start/end dates and candle intervals for backtesting |
risk.ts | Risk rules — TP distance checks, R/R ratio validation, position limits |
strategy.ts | LLM-powered getSignal function with multi-timeframe candle fetch |
runner.ts | Entry point that registers all schemas and starts Backtest.background |
.env | API key placeholders for exchange, OpenAI, Claude, DeepSeek, and more |
Because every file lives in your project, you can modify the exchange adapter to connect to a private data feed, rewrite the risk rules for your specific requirements, or swap out the LLM provider — none of these changes require forking or patching any package.
When to Use Sidekick
Use@backtest-kit/sidekick when:
- You need a custom exchange adapter beyond what the CLI flags expose
- Your risk rules are complex enough to require full TypeScript logic
- You want to inspect, version-control, and code-review every piece of the setup
- You are building a team project where the infrastructure must be auditable
- You need to integrate backtest-kit into an existing monorepo with shared utilities