Record Class OrderPlacementPolicy.PostRegion
java.lang.Object
java.lang.Record
com.quantfinlib.execution.OrderPlacementPolicy.PostRegion
- Enclosing class:
OrderPlacementPolicy
The fill-probability REGION where posting beats crossing. A single
breakeven scalar cannot carry the answer:
postCost(p) =
(h+d) − p·(2h+r+d−a) is linear in p, and when adverse selection
exceeds 2h+r+d the slope flips — posting then pays only
BELOW the threshold, not above. The region says it directly.
Empty (isEmpty()) = never post under these conditions.
Boundaries are indifference points (measure zero; decide
crosses on a tie).-
Constructor Summary
ConstructorsConstructorDescriptionPostRegion(double from, double to) Creates an instance of aPostRegionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleancontains(double fillProbability) final booleanIndicates whether some other object is "equal to" this one.doublefrom()Returns the value of thefromrecord component.final inthashCode()Returns a hash code value for this object.booleanisEmpty()doubleto()Returns the value of thetorecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PostRegion
public PostRegion(double from, double to) Creates an instance of aPostRegionrecord class.- Parameters:
from- the value for thefromrecord componentto- the value for thetorecord component
-
-
Method Details
-
isEmpty
public boolean isEmpty() -
contains
public boolean contains(double fillProbability) -
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. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
from
public double from()Returns the value of thefromrecord component.- Returns:
- the value of the
fromrecord component
-
to
public double to()Returns the value of thetorecord component.- Returns:
- the value of the
torecord component
-