Spread Taker Execution and Passive-Leg Hedging
Summary
This algorithm takes liquidity in the active leg of a multi-leg spread when the quoted spread price reaches a configured limit. For a long spread, it acts when the ask is at or below that limit; for a short spread, it acts when the bid is at or above it. It sizes each active-leg order using available spread volume and the remaining target quantity, then converts that quantity into the leg’s contract volume.
After active-leg fills, the algorithm calculates the corresponding hedge target for each passive leg and submits orders for any remaining difference. It uses each leg’s best quote and a configurable number of price increments to set limit prices. Existing orders and incomplete hedges gate further action, while an interval callback cancels outstanding orders. The excerpt describes execution mechanics, but gives no evidence on slippage, fill quality, risk during partial hedges, or performance across market conditions.
Key ideas
- The algorithm takes the active spread leg when the quoted spread reaches its limit price.
- It caps each new active-leg order by displayed spread volume and remaining target size.
- Passive-leg hedge quantities are derived from active-leg trades and spread ratios.
- Hedge orders use each leg’s best quote adjusted by a configurable price increment.
- Outstanding orders and incomplete hedges prevent the next active-leg action.
Tags
From a private course collection; the original is not published.