Skip to content
All library documents

Event Types and Message Flow in an Event-Driven Backtester

Article QuantStart

Summary

The document explains how an event queue can pass information among the components of an event-driven trading system. A market event marks a new data update and prompts strategy evaluation. Strategies emit signal events with a symbol, time, and direction; the portfolio considers those signals alongside risk and position sizing before creating orders. An execution handler processes orders and returns fill events describing the transaction.

The article outlines the fields carried by signal, order, and fill events, and shows how fill records can include quantity, exchange, fill value, and commission. Its commission example follows a specified Interactive Brokers US API fee schedule, with a minimum charge, quantity-based rates, and a cap tied to trade value; it excludes exchange and ECN fees. These are software design examples, not evidence of strategy performance. The event classes are intentionally simple, and the described fee assumptions are specific to the brokerage schedule cited in the article rather than universal execution costs.

Key ideas

  • An event queue lets backtester components communicate through typed messages.
  • Market events trigger strategy evaluation after new market data arrives.
  • Signal events carry instrument, timestamp, and direction information to the portfolio.
  • The portfolio converts signals into orders while applying portfolio risk and sizing constraints.
  • Fill events record execution details and may include estimated commissions based on a brokerage fee schedule.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.