Mode B is the single-symbol execution path, activated by passingDocumentation 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 without --entry. When --entry is absent, packages/main/src/main/backtest.ts hits its first guard (if (!values.entry) return) and exits immediately, handing full control to the @backtest-kit/cli bundled runner. The CLI loads the strategy file you supply as the positional argument, calls the schemas registered inside it, and runs a backtest for whatever symbol the strategy itself declares. There is no iteration over CC_SYMBOL_LIST — one file, one symbol, one run.
The Mode B Command
--entry. This is the only difference from the Mode A command that changes the entire execution path.
Flag Reference
| Flag | Parsed by | Purpose |
|---|---|---|
--backtest | getArgs() | Activates the second guard in backtest.ts; without --entry the file early-returns, leaving @backtest-kit/cli in control |
--ui | @backtest-kit/cli | Starts the @backtest-kit/ui web interface on :60050 — forwarded to the CLI runner, not parsed by getArgs() |
--ui and other @backtest-kit/cli flags are not parsed by getArgs() in packages/main/src/helpers/getArgs.ts. They are passed through to the CLI runner via strict: false / allowPositionals: true in parseArgs. To omit the UI, simply leave --ui out of the command — there is no --noCache flag defined in getArgs().How Mode B Differs from Mode A
The gate pattern inbacktest.ts makes the split explicit:
main() returns before reaching waitForReady, before iterating CC_SYMBOL_LIST, and before calling Backtest.background(). The @backtest-kit/cli runner is already running alongside this file — it simply takes the strategy path from the positional argument, evaluates it, and executes whatever schemas are registered inside.
The Strategy File Controls the Symbol
In Mode B the symbol is not determined byCC_SYMBOL_LIST or any environment variable. It is determined by the addStrategySchema() call inside the strategy file itself. The strategy author registers the symbol (and exchange, and time frame) directly:
modules/backtest.module.ts file in the strategy directory is where the exchange schema (including the symbol) and frame schema are registered. @backtest-kit/cli evaluates those module registrations when it loads the strategy file, giving it everything it needs to run exactly one backtest context.
When to Use Mode B vs Mode A
Use Mode B when...
- You are developing or debugging a new strategy
- You want fast iteration on a single symbol without waiting for 8 other symbols to complete
- You are tuning indicator parameters and need a tight edit → run → inspect cycle
- You want to verify that a strategy file loads and runs without errors before committing to a full portfolio run
Use Mode A when...
- You want a realistic portfolio-level view across all 9 symbols simultaneously
- You are benchmarking overall system throughput
- You are validating that a strategy behaves consistently across correlated and uncorrelated assets
- You are preparing results for comparison against live or paper performance
Typical Workflow
Write the strategy file
Create a new directory under
./content/<name>.strategy/ and add a .strategy.ts file that calls addStrategySchema(). Add a sibling modules/backtest.module.ts that registers the exchange schema (with the symbol you want to test) and the frame schema.Run Mode B for rapid iteration
@backtest-kit/ui dashboard at http://localhost:60050 (add --ui to open the web UI). Adjust strategy parameters and re-run.