Skip to main content

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.

The strategies below are real, production-grade implementations from the Backtest Kit example directory. Each one has been backtested against historical data with documented results, and the source code is publicly available. They cover a wide spectrum of approaches — from classical machine learning and Pine Script indicators, to AI-driven news sentiment and dollar-cost averaging ladders — making them a practical starting point for building your own strategies.

Built-In Strategies

🧠 Neural Network Strategy

October 2021 — Trains a feed-forward TensorFlow neural network with an 8→6→4→1 architecture every 8 hours to predict where the next candle will close within its high-low range. When the current price is below the predicted close, the strategy opens a LONG position with a 1% trailing take-profit.The model is retrained from scratch on each 8-hour boundary using the most recent OHLCV history, so it continuously adapts to changing market conditions without stale weights.

🌲 Pine Script Range Breakout

December 2025 — Runs btc_dec2025_range.pine on 1h candles via @backtest-kit/pinets, extracting Bollinger Bands, range boundaries, and volume spikes. Signals fire only on confirmed breakouts when price hasn’t already moved past the signal close.This strategy demonstrates how to port an existing TradingView indicator to Backtest Kit with zero Pine Script rewrites.

🔪 Signal Inversion Strategy

January 2026 — Takes published signals from a real Telegram crypto channel (Crypto Yoda), enters at the same price zone and timestamp, but inverts the direction. The strategy harvests liquidity from the crowd that blindly follows the recommendation regardless of order book conditions.This is a live demonstration of the second-order chaos effect: when enough bots follow the same signal, the counterplay becomes the edge.

📰 AI News Sentiment

February 2026 — Every 4–8 hours, fetches live crypto and macro news via Tavily, passes headlines to a local Ollama LLM, and opens positions based on bullish / bearish / wait forecasts. Conflicting signals flip positions mid-trade.Result: +16.99% during a −16.4% market month. This strategy is the reference implementation featured in the AI trading signals article.

🪂 SHORT DCA Ladder

March 2026 — Opens a SHORT on every pending signal, then adds rungs (up to 10) whenever price spikes upward outside a ±1–5% band around the last entry. Closes the position when the blended average reaches 0.5% profit.The tight 0.5% target combined with high trade frequency produces a compounding effect even in choppy conditions.

🧗 LONG DCA Ladder

April 2026 — Same mechanics as the SHORT version but LONG-biased with a 3% profit target. Deployed 2.4 entries per trade on average, achieved +67.85% PNL on deployed capital with improved percentage drawdown (−2.59% vs −3.99% without DCA).This strategy illustrates how commitAverageBuy with overlap detection can significantly reduce average entry cost over time.

🐍 Python EMA Crossover

February 2021 — A Python (WASI) strategy executed via WebAssembly that computes EMA(9) and EMA(21) crossover signals. Trades trigger when the fast EMA crosses the slow EMA, confirmed by the 4h range midpoint.This example demonstrates that Backtest Kit is not limited to TypeScript logic — any language that compiles to WASI can provide the getSignal implementation.

Community Repositories

The Backtest Kit community has published several open-source repositories that extend the core framework. These are production-tested references for common deployment patterns.

backtest-monorepo-parallel

Runs 9 symbols in parallel in a single Node.js process on shared MongoDB + Redis infrastructure. Achieves ~6,300× real-time aggregate speed (~703× per-symbol replay on a commodity i5-13420H laptop). Use this as a starting point for multi-asset backtesting without subprocesses or IPC overhead.

backtest-ollama-crontab

Wires a local or cloud Ollama LLM as a risk filter, combined with a 15-minute crontab ingesting signals from any public Telegram channel. The LLM gate improved a reference strategy from +52.22% → +68.90% PNL, Sharpe +0.309 → +0.512, and winrate 68% → 82%.

backtest-kit-redis-mongo-docker

Production MongoDB + Redis + Docker stack that replaces the default file-based ./dump/ persistence. Implements all 15 IPersist*Instance contracts with atomic findOneAndUpdate writes and O(1) Redis key lookups. Drop-in upgrade for any Backtest Kit project.

backtest-kit-skills

A Claude Code skill installed under ~/.claude/skills/backtest-kit/ that enables AI-assisted strategy writing, debugging, and API reference lookup. Describe what you want in plain language and receive complete, working TypeScript strategy files with all schema registrations.

uzse-backtest-app

Reference implementation for running Pine Script strategies on regional stock exchanges not available on TradingView — including UZSE, MSE, and DSE. Downloads raw trade history, builds Japanese candlestick data, and feeds it to Backtest Kit via a custom MongoDB exchange adapter.

Build docs developers (and LLMs) love