Scheduling
A trading session should run when its market is open and stop when it closes. Holdout Lab is market-hours aware so you can automate start/stop instead of babysitting it.
Market hours
Section titled “Market hours”The system knows each instrument’s trading calendar (via exchange-calendars), so a daily strategy
acts on the right sessions and an intraday strategy is flat by the close. Crypto trades 24/7 and is
scheduled accordingly.
Automating with cron
Section titled “Automating with cron”Add --until 16:05 (Eastern) to a paper/live runner and the session stops itself cleanly at that
time — the same code path as the kill switch, so positions flatten on stop. To start sessions
automatically on weekday mornings, cron the supervised wrapper scripts/run-paper.sh (it relaunches
after crashes but respects intentional stops):
# m h dom mon dow command 25 9 * * 1-5 cd /path/to/holdout-lab && ./scripts/run-paper.sh \ --strategy ibs_reversion --instrument QQQ.NASDAQ --until 16:05 >> .run/scheduled.log 2>&1(macOS alternative: a launchd plist with StartCalendarInterval. Times are local — keep the clock on
Eastern or adjust.) Crypto trades 24/7, so there’s no market-hours gating for crypto sessions. See
paper trading for the runner flags.
Built-in nightly jobs
Section titled “Built-in nightly jobs”Two worker crons run without any setup: the nightly catalog refresh at 08:45 UTC (tops up every free-vendor dataset to yesterday’s close — see ingestion; billed Databento data is never auto-pulled), and the fidelity scorecard at 09:30 UTC. The refresh is hard-bounded to finish before the fidelity run so the worker stays the catalog’s single writer.
Gateway restarts
Section titled “Gateway restarts”The IB Gateway needs periodic restarts; in the Dockerized setup, IBC handles the nightly/weekly gateway restart on its own, and the gateway monitor alerts you if a gateway goes unhealthy between restarts.
Related
Section titled “Related”- Paper trading · Live trading.
- Deployment — running the processes.