Calculating Synthetic Spread Prices, Quotes, and Positions Across Legs
Summary
This document describes the data model and calculations behind a synthetic multi-leg spread. Each leg stores its market quotes, contract details, and position state. Configurable price multipliers define the spread price, while trading multipliers define how leg quantities map to spread units. For a quote, the code combines bid and ask prices with sign-aware handling, rounds to a tick increment, and estimates executable spread volume from the limiting leg.
Position calculations convert leg exposure into spread units and account for inverse contracts by translating contract volume using price and contract size. The code also builds spread bars from synchronized leg closes and can emit a synthetic tick. These are implementation mechanics rather than evidence of a profitable spread strategy. Missing leg quotes or bars suppress usable aggregate data, and the calculations depend on correct multipliers, contract specifications, and time alignment.
Key ideas
- Price multipliers combine leg quotes into a synthetic spread bid and ask.
- Trading multipliers convert individual leg quantities into spread units.
- Spread quote volume is constrained by the least available adjusted leg volume.
- Inverse contract exposure is converted using contract size and price.
- Spread bars are formed only when data for every leg is available at a timestamp.
Tags
From a private course collection; the original is not published.