quantecho

Self-hosted full-stack platform with a Python backtest lab.

quantecho is a self-hosted web platform I built from scratch in 2026: a Next.js front end and Python sidecars behind one gateway, on Docker Compose with encrypted backups. Its centrepiece is a backtest lab: the entry signal is a short Python function typed into the browser; everything else (universes, exits, price adjustment, caching) is fixed, explicit and tested.

Why

A notebook backtest is easy to write and easy to fool yourself with: the fill rule is implicit, the price series is adjusted differently from the one you looked at, the A-share settlement rule is forgotten. Here the only thing you write is the signal; the questionable decisions are made once, in tested code.

How

Backtest pipeline: an entry-signal script runs over a universe, the data layer serves adjusted prices from a parquet cache, the engine applies exit rules and T+1, results are archived; a job registry streams progress to the browser over SSE Entry signalUniverseData layerEngineResults Job registry → SSE log stream Python, Monaco editorMETA → form · entries() → bools S&P 500 · CSI 300 · CSI 5001,303 symbols one parquet file per symboladjusted prices · retry · breaker three exit rules · stop fills firstT+1 applied for A-shares trade stats · distributionper-trade chart · JSON archive progress · log lines · cooperative cancel back to the browser
Scans run as jobs the browser follows over server-sent events and can cancel.

A pattern is a Python file with a small META block, which drives the parameter form, and an entries() function returning a boolean series per symbol, written in an embedded Monaco editor. A scan runs it across the S&P 500, CSI 300 (HS300) or CSI 500 and resolves each entry with one of three exit rules: hold N days, target or timeout, stop or target; when one bar touches both, the stop fills first. T+1 for A-shares is applied inside the engine, so pattern code never knows which market it is in. Prices are cached one parquet file per symbol, back-adjusted so ratios are consistent and re-adjusted for display; the sync layer retries through rate limits, trips a circuit breaker on repeated failures and can be cancelled. Every scan is archived as replayable JSON.

What holds it up

What I did. Everything: design documents, code, tests, deployment, incident write-ups. The platform is private, with no public demo; the backtest lab is the part I can talk about.

Counts from the repositories, August 2026. Signals, scans and results are not published.