Class DarkPoolSimulator
java.lang.Object
com.quantfinlib.execution.DarkPoolSimulator
Midpoint-cross dark pool model: hidden resting orders match at the current
lit-market midpoint, honoring minimum-execution-quantity constraints (a
standard anti-gaming feature). No pre-trade transparency: resting interest
is only observable through fills.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidonQuote(double bid, double ask) Update the lit reference mid.longrestingQty(Side side) Total hidden resting quantity on a side (for simulation introspection only).Submits an order: crosses immediately against resting contra interest at the current mid (time priority), then rests the remainder.
-
Constructor Details
-
DarkPoolSimulator
public DarkPoolSimulator()
-
-
Method Details
-
onQuote
public void onQuote(double bid, double ask) Update the lit reference mid. A LOCKED or CROSSED reference (bid >= ask) or a non-positive/non-finite side invalidates the mid: a real midpoint pool is prohibited from executing during a locked/crossed NBBO, so crossing pauses until a valid two-sided market returns — resting interest stays resting. -
submit
Submits an order: crosses immediately against resting contra interest at the current mid (time priority), then rests the remainder. Returns the fills generated (empty if it fully rested).Minimum-execution-quantity is honored AGGREGATE-first, the common pool semantics: the incoming order's MEQ is checked against the total crossable contra quantity (an order wanting 100 fills against two resting 60s), while each resting order's own MEQ still gates its individual slice.
-
restingQty
Total hidden resting quantity on a side (for simulation introspection only).
-