Record Class HftQuoter.Config
java.lang.Object
java.lang.Record
com.quantfinlib.trading.HftQuoter.Config
- Enclosing class:
HftQuoter
public static record HftQuoter.Config(long quoteSize, double halfSpread, double skewPerUnit, long minRequoteIntervalNanos, double minMove, TickSizeSchedule tickSchedule)
extends Record
Quoting parameters.
halfSpread/skewPerUnit/minMove
are in price terms (use fx.CurrencyPair#priceFromPips to
convert market conventions); tickSchedule is optional grid
snapping (null = quote raw prices).-
Constructor Summary
ConstructorsConstructorDescriptionConfig(long quoteSize, double halfSpread, double skewPerUnit, long minRequoteIntervalNanos, double minMove, TickSizeSchedule tickSchedule) Creates an instance of aConfigrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.doubleReturns the value of thehalfSpreadrecord component.final inthashCode()Returns a hash code value for this object.doubleminMove()Returns the value of theminMoverecord component.longReturns the value of theminRequoteIntervalNanosrecord component.static HftQuoter.Configof(long quoteSize, double halfSpread) Minimal config: size and half-spread, no skew, no conflation, no grid.longReturns the value of thequoteSizerecord component.doubleReturns the value of theskewPerUnitrecord component.Returns the value of thetickSchedulerecord component.final StringtoString()Returns a string representation of this record class.withConflation(long minIntervalNanos, double minMovePrice) Suppresses a re-quote only when the mid moved less thanminMovePriceAND the last quote is younger thanminIntervalNanos— BOTH gates must pass to suppress.withMinMove(double minMovePrice) Purely move-gated conflation: re-quote only when the mid has moved at leastminMovePrice, regardless of age (the interval gate is set effectively infinite).withSkewPerUnit(double skew) withTickSchedule(TickSizeSchedule schedule)
-
Constructor Details
-
Config
public Config(long quoteSize, double halfSpread, double skewPerUnit, long minRequoteIntervalNanos, double minMove, TickSizeSchedule tickSchedule) Creates an instance of aConfigrecord class.- Parameters:
quoteSize- the value for thequoteSizerecord componenthalfSpread- the value for thehalfSpreadrecord componentskewPerUnit- the value for theskewPerUnitrecord componentminRequoteIntervalNanos- the value for theminRequoteIntervalNanosrecord componentminMove- the value for theminMoverecord componenttickSchedule- the value for thetickSchedulerecord component
-
-
Method Details
-
of
Minimal config: size and half-spread, no skew, no conflation, no grid. -
withSkewPerUnit
-
withConflation
Suppresses a re-quote only when the mid moved less thanminMovePriceAND the last quote is younger thanminIntervalNanos— BOTH gates must pass to suppress.Pitfall:
minIntervalNanos = 0therefore disables conflation entirely (nothing is ever "younger than 0 ns"), it does NOT mean "suppress on move alone". For purely move-gated conflation — the usual choice for derived crosses — usewithMinMove(double). -
withMinMove
Purely move-gated conflation: re-quote only when the mid has moved at leastminMovePrice, regardless of age (the interval gate is set effectively infinite). This is the fan-out control that makes dense synthetic-cross books scale — measured: 10,000 crosses over 200 legs run at ~8× the throughput of quote-everything with a 2-pip gate suppressing ~99% of updates. -
withTickSchedule
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
quoteSize
public long quoteSize()Returns the value of thequoteSizerecord component.- Returns:
- the value of the
quoteSizerecord component
-
halfSpread
public double halfSpread()Returns the value of thehalfSpreadrecord component.- Returns:
- the value of the
halfSpreadrecord component
-
skewPerUnit
public double skewPerUnit()Returns the value of theskewPerUnitrecord component.- Returns:
- the value of the
skewPerUnitrecord component
-
minRequoteIntervalNanos
public long minRequoteIntervalNanos()Returns the value of theminRequoteIntervalNanosrecord component.- Returns:
- the value of the
minRequoteIntervalNanosrecord component
-
minMove
public double minMove()Returns the value of theminMoverecord component.- Returns:
- the value of the
minMoverecord component
-
tickSchedule
Returns the value of thetickSchedulerecord component.- Returns:
- the value of the
tickSchedulerecord component
-