Record Class BestExecutionAnalyzer.ShortfallDecomposition
java.lang.Object
java.lang.Record
com.quantfinlib.regulatory.BestExecutionAnalyzer.ShortfallDecomposition
- Enclosing class:
BestExecutionAnalyzer
public static record BestExecutionAnalyzer.ShortfallDecomposition(double delayCost, double executionCost, double opportunityCost, double total)
extends Record
Perold (1988) implementation shortfall of one order, in currency:
delay = side · (arrival − decision) · executedQty execution = side · Σ q_i · (p_i − arrival) opportunity = side · (close − decision) · unfilledQty total = delay + execution + opportunitywith side +1 for a buy and −1 for a sell. Total equals the paper portfolio's P&L (full size at the decision price) minus the real one.
-
Constructor Summary
ConstructorsConstructorDescriptionShortfallDecomposition(double delayCost, double executionCost, double opportunityCost, double total) Creates an instance of aShortfallDecompositionrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the value of thedelayCostrecord component.final booleanIndicates whether some other object is "equal to" this one.doubleReturns the value of theexecutionCostrecord component.final inthashCode()Returns a hash code value for this object.doubleReturns the value of theopportunityCostrecord component.final StringtoString()Returns a string representation of this record class.doubletotal()Returns the value of thetotalrecord component.
-
Constructor Details
-
ShortfallDecomposition
public ShortfallDecomposition(double delayCost, double executionCost, double opportunityCost, double total) Creates an instance of aShortfallDecompositionrecord class.- Parameters:
delayCost- the value for thedelayCostrecord componentexecutionCost- the value for theexecutionCostrecord componentopportunityCost- the value for theopportunityCostrecord componenttotal- the value for thetotalrecord component
-
-
Method Details
-
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. -
delayCost
public double delayCost()Returns the value of thedelayCostrecord component.- Returns:
- the value of the
delayCostrecord component
-
executionCost
public double executionCost()Returns the value of theexecutionCostrecord component.- Returns:
- the value of the
executionCostrecord component
-
opportunityCost
public double opportunityCost()Returns the value of theopportunityCostrecord component.- Returns:
- the value of the
opportunityCostrecord component
-
total
public double total()Returns the value of thetotalrecord component.- Returns:
- the value of the
totalrecord component
-