Event-driven core and replayable determinism
vn.py uses an event-driven design because trading state changes are naturally discrete: ticks, order updates, fills, and account/position changes can be serialized into a single input stream. The event bus converts coupling from direct calls to publish/subscribe, so strategies don’t need to manage reconnect logic, rate limits, or an order state machine. Concurrency and I/O complexity stay in the engine and gateways, keeping strategy code focused, testable, and auditable. Most importantly, recorded event streams can be replayed to drive backtests, reproduce incidents, and run regression comparisons consistently.
