Quant Buffet API
API Reference
Libraries, classes, and syntax for writing strategies in the Quant Buffet backtest lab — from ASSETS and make_on_day through PortfolioEngine and compute_metrics.
01
Overview
What the Quant Buffet backtest API is and how lab strategies are structured.
02Lab contract
Required symbols, function signatures, and the make_on_day → on_day pattern.
03Data API
load_daily_prices and price panel conventions.
04Engine API
PortfolioEngine, EngineConfig, trades, and BacktestResult.
05Metrics API
compute_metrics fields and benchmark-relative stats.
06Sandbox rules
Allowed imports, builtins, limits, and error types.
07Universes & whitelist
Named ETF books and the WHITELIST used by the sandbox.
08Templates
Pre-built make_* factories in backtest.templates.
09Examples
Copy-paste strategy patterns for the lab.