Class Auction
java.lang.Object
com.quantfinlib.microstructure.Auction
A call auction (open/close/volatility uncross): orders accumulate without
trading, then a single clearing price executes the maximum matchable
volume — the mechanism behind exchange opens, the close every
benchmark-tracking strategy trades, and LULD/volatility-halt reopenings.
Price discovery follows the standard exchange rulebook hierarchy:
- Maximum executable volume — the price(s) where cumulative eligible buys meet cumulative eligible sells;
- Minimum surplus — among volume ties, the price leaving the smallest unfilled imbalance;
- Reference proximity — among remaining ties, closest to the reference price (typically the last traded price).
Market orders are always eligible on their side. The indicative price /
volume / imbalance triple — what venues disseminate during the call phase
— is exposed via indicative(double), and uncross(double) additionally
reports the surplus side. Not thread-safe; an auction is single-threaded
by nature (one uncross event).
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordAuction outcome: clearing price, matched volume, and leftover imbalance. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddBuy(double limitPrice, long quantity) Adds a buy limit order to the call book.addMarketBuy(long quantity) Adds a market-on-auction buy (eligible at any clearing price).addMarketSell(long quantity) Adds a market-on-auction sell.addSell(double limitPrice, long quantity) Adds a sell limit order to the call book.indicative(double referencePrice) The indicative uncross the venue would disseminate right now, ornullwhen no price can match any volume (crossed side empty or book entirely uncrossed).uncross(double referencePrice) Runs the auction: the indicative at this instant becomes the print.
-
Constructor Details
-
Auction
public Auction()
-
-
Method Details
-
addBuy
Adds a buy limit order to the call book. -
addSell
Adds a sell limit order to the call book. -
addMarketBuy
Adds a market-on-auction buy (eligible at any clearing price). -
addMarketSell
Adds a market-on-auction sell. -
indicative
The indicative uncross the venue would disseminate right now, ornullwhen no price can match any volume (crossed side empty or book entirely uncrossed). -
uncross
Runs the auction: the indicative at this instant becomes the print. The book is left untouched (venues re-open continuous trading with residuals; callers can rebuild as needed).
-