Why Spread Position and Algo Leg Volumes Use Different Rounding
Summary
The post asks why VeighNa’s spread position calculation divides net position by a trading multiplier and rounds down, while an algo’s leg-traded calculation also rounds to the spread’s minimum volume before rounding down. It presents the two code snippets as evidence of the difference, but does not provide an answer or explain the design rationale.
The question points to a practical distinction between calculating a combined spread position and tracking quantities traded by an execution algorithm. The extra adjustment may relate to keeping algo leg quantities aligned with the spread’s allowed volume increments, but that explanation is not established in the post. Readers would need to inspect the surrounding implementation or obtain a maintainer’s clarification; the snippets alone do not show when the calculations diverge or what behavior the adjustment is intended to ensure.
Key ideas
- The post compares spread position calculation with algo leg-traded quantity calculation.
- The spread calculation divides by the trading multiplier and rounds down.
- The algo calculation additionally rounds to the spread’s minimum volume before rounding down.
- The author asks why the two calculations treat rounding differently, but the post gives no answer.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.