Skip to content
All library documents

Spread Trading: Rounding Errors in Traded-Volume Calculations

Article vn.py community

Summary

This brief forum exchange raises a calculation issue in spread trading. A participant describes a spread with a leg ratio of one to three and argues that rounding a leg fill of two contracts after division by three can make the system treat that leg as complete prematurely.

A second participant acknowledges the report and points to a proposed code change for reference. The exchange offers a concrete example of how rounding can distort leg-completion tracking, but it does not explain the underlying calculation, show the proposed fix, or report whether the change resolved the issue. It is therefore useful as a narrow implementation caution rather than a complete guide to spread execution.

Key ideas

  • Spread systems may use leg ratios to determine whether a combination has been filled.
  • Rounding a partial leg quantity can make a leg appear complete too soon.
  • The example involves a one-to-three ratio and a fill of two contracts.
  • The discussion points to a proposed change but gives no details about its final outcome.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.