Class CircuitBreakers.Luld
java.lang.Object
com.quantfinlib.microstructure.CircuitBreakers.Luld
- Enclosing class:
CircuitBreakers
The LULD limit-state machine for one symbol: enters a limit state when
the inside quote pins a band edge, converts to a 5-minute pause when
the limit state persists 15 seconds, and exits the pause after it
elapses. Single-writer, zero allocation.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoubleonNbbo(double nbb, double nbo, long timestampNanos) NBBO update; returns the state after applying it.longvoidreference(double referencePrice, boolean widened) New reference price (the plan recomputes it as a 5-minute average).state()Last observed state WITHOUT pause expiry; preferstate(long)when a paused symbol may be quote-silent.state(long nowNanos) Current state as ofnowNanos, applying pause expiry — paused symbols are exactly the ones that stop quoting, so expiry must be pollable rather than waiting for the next quote.double
-
Constructor Details
-
Luld
public Luld(boolean tier1)
-
-
Method Details
-
reference
public void reference(double referencePrice, boolean widened) New reference price (the plan recomputes it as a 5-minute average). -
onNbbo
NBBO update; returns the state after applying it. Prices are in the same units as the reference. -
state
Current state as ofnowNanos, applying pause expiry — paused symbols are exactly the ones that stop quoting, so expiry must be pollable rather than waiting for the next quote. -
state
Last observed state WITHOUT pause expiry; preferstate(long)when a paused symbol may be quote-silent. -
lowerBand
public double lowerBand() -
upperBand
public double upperBand() -
pauseCount
public long pauseCount()
-