Sixian-Li/plain-backtest

Say It Simply, Test It Properly. Agent-powered strategy research with independent ledger checks and reproducible reports.

What it solves

PlainBacktest addresses the difficulty of translating trading strategies into reliable, reproducible backtesting code. It allows users to describe trading strategies in natural language and uses AI agents to convert those descriptions into explicit, executable rules, ensuring that the resulting backtest is transparent, verifiable, and documented.

How it works

The project provides a framework that integrates with coding agents via specialized "Skills." A user provides a strategy description (e.g., "hold QQQ when SMA20 is above SMA100"), and the agent uses the project's tools to define the experiment, execute it using the PyBroker engine, and perform an independent ledger reconciliation. Each run creates a self-contained directory containing the frozen rules, data hashes, order history, and a detailed HTML report, ensuring the experiment is reproducible and open to inspection.

Who it’s for

This tool is designed for quantitative researchers and traders who use AI coding agents to assist in strategy development and want a rigorous, audit-ready environment for testing their hypotheses without relying on opaque "black box" backtesting systems.

Highlights

  • Uses natural language to define trading strategies, which agents then translate into formal code.
  • Includes an independent ledger system to reconcile orders and account balances for accuracy.
  • Generates reproducible, self-contained reports that include code and data hashes.
  • Comes with pre-built "Skills" for agents to manage experiments, data updates, and workspace organization.
  • Includes 83 experiment definitions and a curated set of local historical market data to get started immediately.

Related

  • Project
  • Project
  • Project
  • Project