Class CircuitBreakers.MarketWide
java.lang.Object
com.quantfinlib.microstructure.CircuitBreakers.MarketWide
- Enclosing class:
CircuitBreakers
Market-wide circuit-breaker day state: feed it the S&P 500 decline
from the prior close and the time of day; it applies the once-per-day
and not-after-15:25 rules for Levels 1 and 2. Reset it each session.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanbooleanonDecline(double declineFromPriorClose, int minutesSinceMidnight)
-
Field Details
-
LEVEL_1
public static final double LEVEL_1- See Also:
-
LEVEL_2
public static final double LEVEL_2- See Also:
-
LEVEL_3
public static final double LEVEL_3- See Also:
-
-
Constructor Details
-
MarketWide
public MarketWide()
-
-
Method Details
-
onDecline
- Parameters:
declineFromPriorClose- e.g. 0.08 = the index is down 8%minutesSinceMidnight- local exchange time in MINUTES, e.g. 14:30 = 870 (validated to 0..1440 so a seconds/nanos unit mistake fails loudly instead of suppressing halts)
-
level1Used
public boolean level1Used() -
level2Used
public boolean level2Used() -
level3Used
public boolean level3Used()
-