Skip to content
Live Trading

Carry Strategy Logic Into A Real Broker Boundary

The live engine reuses the same strategy contract and event pipeline as backtests, then adds broker adapters, market-data streaming, reconciliation, throttling, risk enforcement, and auditability. This section is where research code meets operational reality.

Shared strategy contract The engine preserves the backtest strategy interface instead of inventing a second runtime model.
Operational guardrails Risk limits, throttles, reconciliation, and audit events are part of the live surface.
Broker boundaries are explicit Capabilities, validation level, and external restrictions are documented instead of implied.

What The Live Engine Is Responsible For

Market Data Intake

Connect to broker streams, normalize updates into engine events, and keep heartbeat expectations visible.

Strategy Dispatch

Run the same callback contract used by backtests so live logic remains behaviorally traceable.

Risk Enforcement

Apply live risk checks, order throttling, and reconciliation before calling the adapter layer production-ready.

Audit And Drift

Track execution reports, account state, and optional backtest-vs-live performance drift.

Entry Point

Primary source-build entry point:

./build/bin/regimeflow_live --config <path>

On Windows, use build\bin\regimeflow_live.exe --config <path>.

The live CLI loads .env automatically if present and merges environment variables with live.broker_config.

Operational Checklist

1. Configure Broker Inputs

Use Live Config to set the adapter surface, symbols, risk limits, and broker-specific options.

2. Validate Broker Boundaries

Use Brokers to confirm what is implemented, paper-validated, or externally restricted.

3. Check Readiness

Use Production Readiness before treating a configuration as deployable.

4. Review Resilience

Use Resilience to understand reconnect, reconciliation, and operational failure handling.

What The Live Engine Does

  • Connects to the broker adapter.
  • Subscribes to market data.
  • Runs strategy callbacks on incoming events.
  • Applies risk limits and order throttling.
  • Emits audit logs and system health events.
  • Optionally tracks live performance drift vs a backtest baseline.

Live Performance Drift Tracking

Enable live drift tracking by setting metrics.live.enable: true. When enabled, the engine writes:

  • live_drift.csv for time-series snapshots.
  • live_performance.json for a summary.

You can also point the tracker at a backtest report JSON via metrics.live.baseline_report.

Read This Section With The Right Mental Model

  • Live execution is not just “backtest with sockets”.
  • Broker capabilities, IP restrictions, venue permissions, and account state remain external constraints.
  • Validation status matters. A working adapter does not automatically imply unrestricted broker access.
  • Operational truth comes from reconciled positions, account state, and audit logs, not from a single green startup message.

Next Steps