Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
@backtest-kit

Backtest Kit

Production-grade algorithmic trading infrastructure for Node.js — backtest, paper, and live trading from a single codebase. Telegram, UI, PineScript GUI, Runner

🧿 backtest-kit

Production-grade algorithmic trading infrastructure for Node.js — from Pine Script execution and LLM signal generation to live exchange connectivity and interactive dashboards. One codebase for backtest, paper, and live trading.

screenshot

Ask DeepWiki npm TypeScript License


🚀 Quick Start

Start here: Clone the reference implementation — a fully working news-sentiment AI trading system with LLM forecasting, multi-timeframe data, and a documented February 2026 backtest.

# Scaffold a new AI agent trading project
npx -y @backtest-kit/cli --init --output my-trading-bot
cd my-trading-bot
npm start

🧩 Ecosystem

Package Description
backtest-kit Core engine — temporal context via AsyncLocalStorage, exchange adapters, risk management, signal lifecycle
@backtest-kit/ui Full-stack dashboard — candlestick charts, signal tracking, PnL analytics, trailing stops visualization
@backtest-kit/signals 50+ technical indicators across 4 timeframes, order book depth, AI-ready markdown reports
@backtest-kit/ollama Multi-provider LLM wrapper (OpenAI, Claude, DeepSeek, Grok, Mistral, Ollama, 10+) with structured output
@backtest-kit/pinets Run TradingView Pine Script v5/v6 locally — 1:1 syntax, 60+ built-in indicators
@backtest-kit/graph Typed DAG execution for multi-timeframe strategies — parallel source nodes, serializable to DB
@backtest-kit/cli CLI for scaffolding AI agent trading projects with CLAUDE.md skill contracts

✨ Core Design Principles

Look-Ahead Bias is Architecturally Impossible

Temporal context flows automatically through AsyncLocalStorage — every getCandles() call is implicitly bounded to the current backtest tick. No timestamp parameters to pass, no future data to accidentally leak.

Same Code, Backtest → Paper → Live

Strategy functions are unaware of execution mode. Switch from historical simulation to real exchange connectivity by changing one flag.

LLM as Signal Generator

The framework provides structured pipelines for injecting multi-timeframe technical analysis, order book data, and news sentiment into LLM context — while keeping temporal isolation and validation invariants intact.

Pine Script indicators if you want to

Port your existing TradingView strategies to Node.js without rewriting a single line — @backtest-kit/pinets executes Pine Script v5/v6 locally via the PineTS runtime, extracts plot values into typed objects, and feeds them directly into the signal pipeline alongside LLM-generated signals.


📚 Articles

A series of in-depth articles documenting the engineering decisions behind the framework:

  1. Look-Ahead Bias — How AsyncLocalStorage makes temporal contamination architecturally impossible
  2. Second-Order Chaos — Why thousands of identical bots trade against themselves at a loss
  3. Claude Trader — How AI gets hands for autonomous strategy iteration via Claude Code
  4. Option Hedging — Why the price drops in a single candle and how to adapt
  5. AI Strategy Workflow — AI workflow for identifying and updating liquidation cascade criteria
  6. AI Strategy Blueprint — ReAct-pattern LLM trading agent with live test results
  7. AI News Trading Signals — News sentiment analysis as a trading signal: methodology and backtest
  8. AI Liquidity Harvesting — How to detect and invert manipulative Telegram signal channels
  9. Pine Script Local Markets — Running Pine Script on exchanges not available in TradingView
  10. DCA Averaging Strategy — Asset price averaging mechanics, drawdown reality, and broker deception

🔗 Links


MIT © tripolskypetr

Pinned Loading

  1. uzse-backtest-app uzse-backtest-app Public

    A toolkit for collecting trade data from UZSE (Uzbekistan Stock Exchange), building OHLCV candlesticks, and running Pine Script technical analysis indicators on exchanges not supported by TradingView.

    TypeScript

  2. backtest-kit.github.io backtest-kit.github.io Public

    The backtest-kit onboarding guide. Includes technical details and articles required to bootstrap your project

    HTML

  3. QFChart QFChart Public

    QuantForgeOrg chart source code dumped before PineTS has been acquired by LuxAlgo

    TypeScript 3

  4. PineTS PineTS Public

    Forked from LuxAlgo/PineTS

    Run Pine Script anywhere. PineTS is an open-source transpiler and runtime that brings Pine Script logic to Node.js and the browser with 1:1 syntax compatibility. Reliably write, port, and run indic…

    TypeScript

  5. quantforge-indicators quantforge-indicators Public

    QuantForgeOrg technical indicators dumped before PineTS has been acquired by LuxAlgo

    TypeScript 1

  6. backtest-kit-skills backtest-kit-skills Public

    Claude Code skill and Mintlify documentation source for the backtest-kit framework — AI-assisted strategy writing, debugging help, and full API reference in one place.

    MDX

Repositories

Loading
Type
Select type
Language
Select language
Sort
Select order
Showing 7 of 7 repositories

Top languages

Loading…

Most used topics

Loading…

Morty Proxy This is a proxified and sanitized view of the page, visit original site.