OKEX Calendar-Spread Hedging with a Difference Grid
Summary
This teaching example sets up a long and short hedge across two OKEX futures contracts: quarterly and current-week. It builds a grid of spread thresholds, each with an opening level and a lower closing level. When the quarterly contract’s bid minus the current-week contract’s ask exceeds an unoccupied opening threshold, the system sells the quarterly contract and buys the weekly contract. It closes that paired position when the spread, measured using the opposite sides of the quotes, falls below the corresponding closing threshold. The threshold spacing, grid size, contract quantity, and target spread difference are configurable.
The example also applies a fixed price adjustment to order levels and tracks whether each grid node is occupied. It is presented as a simplified educational implementation, with an explicit caution against treating it as ready for live trading. No backtest configuration, execution analysis, or profitability evidence is provided. Practical evaluation would need to account for fees, slippage, liquidity, funding or contract basis behavior, and the risks of asynchronous or partially filled legs; these safeguards are not developed in the example.
Key ideas
- The method pairs a short quarterly futures position with a long current-week futures position.
- A spread grid opens hedges above configured thresholds and closes them after the spread contracts by a target amount.
- Each grid node tracks whether it currently has an open hedge, with configurable spacing and contract size.
- The document describes a teaching implementation and gives no performance evidence or execution safeguards.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.