Handling Spread Tick Data in VeighNa Strategies
Summary
This forum exchange clarifies how VeighNa’s spread trading callbacks relate. For live operation, the strategy receives a complete spread data structure through `on_spread_data`; that structure can be converted into a tick before the tick-handling logic is used. Calling `on_spread_tick` by itself does not make the live spread data available, which explains why the questioner’s code was not behaving as expected.
The reply distinguishes this live workflow from backtesting: the backtest engine can push previously recorded spread tick data through `on_spread_tick`. The discussion therefore gives a practical guide to choosing the callback path based on the data source. It is a short troubleshooting exchange rather than a full API reference, and it does not cover spread construction, timing, or the effects of missing or delayed market data. Users still need to check the relevant framework version and surrounding strategy setup.
Key ideas
- Live spread handling begins with the full spread data structure delivered through `on_spread_data`.
- The live data structure must be converted to tick form before tick-based handling is used.
- Backtests can deliver previously recorded spread ticks through `on_spread_tick`.
- The appropriate callback depends on whether spread data comes from live operation or historical replay.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.