Skip to content

Instantly share code, notes, and snippets.

@benjcal
Created May 28, 2026 13:13
Show Gist options
  • Select an option

  • Save benjcal/aa7d144a328c9178fd8d57a01d9652b3 to your computer and use it in GitHub Desktop.

Select an option

Save benjcal/aa7d144a328c9178fd8d57a01d9652b3 to your computer and use it in GitHub Desktop.

QuantBench — Design Document v2

Status: Draft Date: 2026-05-28


1. Overview

Status: Draft Date: 2026-05-28

QuantBench is a desktop application for discovering trading edges from historical market data. The system ingests market data, executes Lua strategies against it, and produces an observations table. Each row is an observation — an entry event with variables for the market conditions at fill time and the forward price path that followed. Observations can be inspected on an interactive candlestick chart for correctness, then filtered and analyzed to discover the conditions under which an entry might have an edge.

The emphasis is on correctness and speed: the user must be able to verify that imported data is sound, that indicator values are computed faithfully, that entries happen where expected, and that forward measurements are correct — all while routinely processing millions of bars.

1.1 Philosophy

Most backtesting tools optimize for parameters: find the SMA periods, stop-loss distance, or filter threshold that produces the best equity curve. This treats strategy design as a parameter-search problem and risks curve-fitting.

QuantBench asks a different question. Instead of "what are the optimal SMA values for this crossover strategy?" it asks "under what conditions does an SMA crossover have positive expectancy?" The strategy's parameters are incidental — what matters is the rich set of context variables emitted at each entry. Those variables turn every observation into a labeled data point that can be filtered, sliced, and analyzed with statistical tools to discover when an entry works and when it does not.

Traditional backtesting QuantBench
Question What are the optimal parameters? Under what conditions does the strategy have positive expectancy?
Approach Optimize → pick best equity curve Observe → find statistical correlations
Output A single parameter set A dataset of annotated observations
Risk Overfitting / parameter search Discovery / analysis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment