Class CircuitBreakers.Luld

java.lang.Object
com.quantfinlib.microstructure.CircuitBreakers.Luld
Enclosing class:
CircuitBreakers

public static final class CircuitBreakers.Luld extends Object
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 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

      public CircuitBreakers.LuldState onNbbo(double nbb, double nbo, long timestampNanos)
      NBBO update; returns the state after applying it. Prices are in the same units as the reference.
    • state

      public CircuitBreakers.LuldState state(long nowNanos)
      Current state as of nowNanos, 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

      public CircuitBreakers.LuldState state()
      Last observed state WITHOUT pause expiry; prefer state(long) when a paused symbol may be quote-silent.
    • lowerBand

      public double lowerBand()
    • upperBand

      public double upperBand()
    • pauseCount

      public long pauseCount()