Questioning Prior-Position Volume Updates in a Futures Gateway
Summary
This Chinese-language forum post examines how a futures gateway updates a position object’s prior-day volume while processing investor-position responses. The shown handler creates or retrieves a position by instrument and position direction, then applies exchange-specific handling: for SHFE and INE, it assigns the reported total position when there is prior-day position and no today position; in other cases, it assigns total position minus today position.
The author questions whether this value should instead be accumulated across response records. The excerpt identifies a possible aggregation issue but does not establish that the existing logic is wrong, explain the API’s record semantics, or provide a fix or test. Whether assignment or addition is correct depends on whether the callback supplies successive components of one position or repeated snapshots. The discussion is implementation-specific and does not describe a trading signal or strategy.
Key ideas
- The handler keys buffered positions by instrument and position direction.
- It treats SHFE and INE position records differently from other exchanges.
- For other exchanges, prior-day volume is computed as total position less today’s position.
- The post asks whether response records should be accumulated rather than assigned.
- The excerpt does not resolve the issue or document the response-record semantics.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.