How the trading cycle works
mainThe system operates via a single pipeline called run_cycle. This pipeline is identical across all modes (Backtest, Paper, Live), ensuring that research and production code do not diverge. A single cycle follows this sequence:
- Point-in-time data: Fetches only data that was publicly available at the specific timestamp (prevents lookahead bias).
- Analysts emit Signals: Analysts (LLM or Quant) provide a conviction score
[-1, +1]and a thesis. - Portfolio construction: Blends the various analyst views into target weights.
- Risk model: Applies hard caps and vetoes to ensure positions stay within defined limits.
- Execution: Translates target weights vs. current broker reality into specific orders.
- Ledger: Persists the decision, the written thesis, the fills, and the updated Net Asset Value (NAV).