Overview
Real-time market data tick produced by MarketDataFeedHandler and published to the EventBus. Consumed by StrategyEngine. Defined in src/domain/__init__.py.
Contract
Consumers
- MarketDataFeedHandler
- StrategyEngine
- RiskManagementEngine
- ExecutionSimulator
Types
| Name | Base | Constraints / Values | Description |
|---|---|---|---|
| MarketTick | dataclass | — | Real-time market data tick published by MarketDataFeedHandler on every price update. |
Documents
MarketTick Data Contract
Real-time market data tick produced by MarketDataFeedHandler and published to the EventBus.
Consumed by StrategyEngine and BacktestingEngine.
Source: src/domain/__init__.py — @dataclass class MarketTick
Fields
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
symbol |
str |
✓ | — | Ticker symbol (e.g. AAPL, MSFT) |
bid |
float |
✓ | — | Best bid price |
ask |
float |
✓ | — | Best ask price |
last |
float |
✓ | — | Last traded price |
volume |
float |
✓ | — | Volume at last trade |
timestamp |
datetime |
now() |
UTC timestamp of tick | |
tick_id |
str |
uuid4() |
Unique tick identifier |
Consumers
| Component | Usage |
|---|---|
StrategyEngine |
Evaluates tick against strategy rules to produce a Signal |
BacktestingEngine |
Replays historical ticks for strategy validation |
Notes
tick_idis referenced bySignal.tick_refto trace which tick triggered a signal- Spread =
ask - bid; mid =(bid + ask) / 2