The frame schema defines the time window for a backtest replay. It tells the engine which candle interval to use, where historical time starts, and where it ends. Every candle fetched during a backtest run is bound by these three values, and the frame name is the lookup key that ties the schema to a specificDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/theonetrade/backtest-monorepo-parallel/llms.txt
Use this file to discover all available pages before exploring further.
Backtest.background() call.
Registering a Frame
Field Reference
frameName
Unique string identifier for this time frame. Referenced by
Backtest.background({ frameName }) and retrieved by listFrameSchema() in the runner entry point.interval
Candle granularity string. Determines how many candles are replayed per day and the frequency of
listenActivePing callbacks.startDate
ISO 8601 UTC
Date marking the first candle to replay. Use midnight UTC to align with exchange OHLCV boundaries.endDate
ISO 8601 UTC
Date marking the last candle to replay. The engine stops issuing ticks after this timestamp is reached.Supported Interval Values
The following interval strings are accepted by backtest-kit, matching theINTERVAL_ENUM defined in Candle.schema.ts:
Candle Count Calculation
For theapr_2026_frame, the total replay volume is:
| Dimension | Value |
|---|---|
| Window length | 27 days (2026-04-01 → 2026-04-27) |
| Candles per symbol | 27 × 24 × 60 = 38,880 |
Symbols (CC_SYMBOL_LIST) | 9 (BTC, POL, ZEC, HYPE, XAUT, DOGE, SOL, PENGU, HBAR) |
| Total candle ticks | 38,880 × 9 = ~350,000 |
How the Frame Is Used at Runtime
The frame schema is consumed bypackages/main/src/main/backtest.ts:
Schema validation
After
waitForReady(), the entry point calls listStrategySchema(), listExchangeSchema(), and listFrameSchema() in sequence. If any list is empty, it throws with an explicit message — e.g. "Frame not specified".Optional candle pre-warming
When the
--cache flag is present, cacheCandles() iterates every symbol in CC_SYMBOL_LIST and writes the full OHLCV window into Mongo before the parallel runners start. This prevents any HTTP round-trips during the hot tick loop.All three schemas — strategy, exchange, and frame — must be registered before the runner starts. The
backtest.ts entry point calls listStrategySchema(), listExchangeSchema(), and listFrameSchema() and throws if any is missing. Register them all inside the strategy file and its companion modules/backtest.module.ts.Interval Selection Guide
- Development
- Staging
- Production