Expand description
Data feed abstraction for backtesting.
A DataFeed produces a time-ordered sequence of MarketEvents that the
backtest runner consumes. Two built-in implementations are provided:
VecFeed— wraps a pre-loadedVec<MarketEvent>(useful for tests and any data source you can materialise up-front).- Conversion helpers from
qs-data-preprocesstypes (Tick,Bar) so you can query DuckDB, convert the results, and feed them straight in.
Structs§
- BarExecution
Prices - Prices a FutureQuote replay executes a bar against, read as midpoints with a symmetric half spread.
- Event
Batch Feed - Groups a fallible event cursor into complete timestamp batches.
- Event
Metadata - Deterministic identity and ordering metadata for one market event.
- Feed
Event - A market event paired with non-persisted feed metadata.
- KWay
Merge Feed - Streaming deterministic merge over multiple fallible timestamp batch feeds.
- Sequenced
Market Event - A streaming event paired with its physical source-row ordinal.
- Series
Roles - Roles a feed event serves in a multi-series backtest.
- Timestamp
Batch - A contiguous batch of events with the same timestamp.
- VecFeed
- In-memory data feed backed by metadata-bearing market events.
Enums§
- Event
Batch Feed Error - Errors produced while grouping a fallible event source into timestamp batches.
- KWay
Merge Error - Errors produced while deterministically merging timestamp batch feeds.
- Market
Event - A single market data event consumed by the backtest runner.
Traits§
- Data
Feed - Sequential source of market events for backtesting.
- Event
Source Item - Converts an event source item into an event and optional physical ordinal.
- Fallible
Batch Feed - Fallible source of complete timestamp batches.
Functions§
- bars_
to_ feed - Convert bars into a primary-series feed.
- bars_
to_ feed_ with_ metadata - Convert bars into a deterministically ranked feed.
- merge_
feeds - Merge feeds using input position as
series_rank. - ticks_
to_ feed - Convert ticks into a primary-series feed.
- ticks_
to_ feed_ with_ metadata - Convert ticks into a deterministically ranked feed.