Core
The core of the system is the run() function, which connects all components in a streaming event loop. At a high level, the run loop looks like this:
Each of these five components has its own responsibilities (clean separation of concerns):
| Component | Responsibility |
|---|---|
| Feed | Provides (market) data events |
| Strategy | Generates trading signals from events |
| Trader | Converts signals into orders (risk/sizing) |
| Broker | Executes orders, maintains account state |
| Journal | Logs/tracks every step (read-only) |
Each component is implemented an abstract base class with pluggable implementations, making every part of the pipeline independently swappable.