Perfect formulation of the futures opening auction problem

Johannes Müller, Sebastian Pokutta, Alexander Martín, Susanne Pape, Andrea Peter, Thomas Winter

Abstract

In this article we consider combinatorial markets with valuations only for singletons and pairs of buy/sell-orders for swapping two items in equal quantity. We provide an algorithm that permits polynomial time market-clearing and -pricing. The results are presented in the context of our main application: the futures opening auction problem. Futures contracts are an important tool to mitigate market risk and counterparty credit risk. In futures markets these contracts can be traded with varying expiration dates and underlyings. A common hedging strategy is to roll positions forward into the next expiration date, however this strategy comes with significant operational risk. To address this risk, exchanges started to offer so-called futures contract combinations, which allow the traders for swapping two futures contracts with different expiration dates or for swapping two futures contracts with different underlyings. In theory, the price is in both cases the difference of the two involved futures contracts. However, in particular in the opening auctions price inefficiencies often occur due to suboptimal clearing, leading to potential arbitrage opportunities. We present a minimum cost flow formulation of the futures opening auction problem that guarantees consistent prices. The core ideas are to model orders as arcs in a network, to enforce the equilibrium conditions with the help of two hierarchical objectives, and to combine these objectives into a single weighted objective while preserving the price information of dual optimal solutions. The resulting optimization problem can be solved in polynomial time and computational tests establish an empirical performance suitable for production environments.

The Challenge of Opening Auctions

In futures markets, traders frequently need to "roll" their positions—for instance, selling a gold contract expiring in June to buy one expiring in August. To mitigate the risk of one leg of this trade failing (slippage), exchanges offer "combination" or "swap" orders.

The challenge arises during the opening auction, the high-volume period when the market first opens. Current algorithms often clear these auctions by treating individual contracts and swaps separately or using suboptimal heuristics. This leads to price inconsistencies: the price of the swap might not equal the difference between the two individual contracts. These inconsistencies create "crossed order books," where savvy arbitrageurs can make risk-free profits at the expense of market liquidity and stability. Previous attempts to solve this using Integer Programming were too computationally expensive for the millisecond-latency requirements of modern production environments.

A Network Flow Approach

The authors' core innovation is a "perfect formulation" of the problem using Minimum Cost Flow theory. By recognizing that the market clearing problem maps perfectly to a network flow structure, the authors moved the problem from the realm of "hard" Integer Programming (NP-hard) to "easy" Linear Programming (Polynomial time).

Network Modeling

They represent the market as a directed graph where each contract is a node and every buy/sell order is a directed arc. A "super node" (denoted as $\circ$) represents cash, allowing single-contract orders and swap orders to be treated within the same mathematical framework.

Representation of buy/sell orders and combinations as arcs in the network flow model.

As shown in the table above, the model translates financial intent into graph topology. A demand for contract $r$ is an arc from the contract node to the cash node, while an offer is the reverse. Combinations are modeled as arcs between two contract nodes, ensuring that the flow (the trade) respects the relationship between the two products.

Hierarchical and Weighted Objectives

Market rules typically require two hierarchical goals: first, maximize the "economic surplus" (total welfare), and second, maximize the total volume of trades. Instead of solving two separate optimization problems, the authors prove they can combine these into a single Linear Program (LP) using a specific scaling factor ($G$). Crucially, they show that $G$ only needs to be slightly larger than the number of contracts, avoiding the numerical instability common in "Big-M" formulations.

Consistent Pricing

Because the constraint matrix of a network flow problem is totally unimodular, the LP naturally produces integer solutions for trade quantities. Furthermore, the "shadow prices" (dual variables) of the clearing constraints provide the market prices. The authors provide a rounding technique to ensure these prices are perfectly consistent across all products, effectively making the market arbitrage-free by design.

Empirical Performance

The researchers evaluated their algorithms using both synthetic data (3,000 random instances) and real-world data (40 historical instances from the EUREX exchange).

  • Massive Speedup: The proposed algorithm is roughly two orders of magnitude faster than previous Integer Programming approaches. On real-world EUREX data, it solved auctions in approximately 3 milliseconds, compared to nearly a full second for older models.
  • Scalability: In synthetic tests with 10,000 orders, the algorithm cleared the market in under 10 milliseconds.
  • Solver Efficiency: Interestingly, the open-source Lemon network simplex solver outperformed high-end commercial solvers like Gurobi and CPLEX for this specific problem structure.

Conclusion

By leveraging the structural properties of network flows, this research provides a robust solution for one of the most computationally sensitive parts of financial exchange operations. The ability to guarantee consistent, arbitrage-free pricing in milliseconds ensures that opening auctions can remain stable and fair, even under extreme volume. While currently limited to singletons and swaps, the framework offers a promising foundation for more complex combinatorial market designs in derivatives and energy sectors.

Summary updated

BibTeX
@inproceedings{muller2016perfect,
  author = {Johannes Müller and Sebastian Pokutta and Alexander Martín and Susanne Pape and Andrea Peter and Thomas Winter},
  title = {{Perfect formulation of the futures opening auction problem}},
  booktitle = {Math. Methods Oper. Res},
  year = {2016},
  doi = {10.1007/s00186-016-0555-z},
}
Figure