Record Class AlphaBacktester.Result
java.lang.Object
java.lang.Record
com.quantfinlib.alpha.AlphaBacktester.Result
- Enclosing class:
AlphaBacktester
public static record AlphaBacktester.Result(double[] netEquity, double[] grossEquity, PerformanceMetrics netMetrics, PerformanceMetrics grossMetrics, double commissionDrag, double spreadDrag, double slippageDrag, double impactDrag, double meanTurnover)
extends Record
Net/gross curves plus the cumulative fraction of equity each cost
component consumed — the cost autopsy.
-
Constructor Summary
ConstructorsConstructorDescriptionResult(double[] netEquity, double[] grossEquity, PerformanceMetrics netMetrics, PerformanceMetrics grossMetrics, double commissionDrag, double spreadDrag, double slippageDrag, double impactDrag, double meanTurnover) Creates an instance of aResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the value of thecommissionDragrecord component.final booleanIndicates whether some other object is "equal to" this one.double[]Returns the value of thegrossEquityrecord component.Returns the value of thegrossMetricsrecord component.final inthashCode()Returns a hash code value for this object.doubleReturns the value of theimpactDragrecord component.doubleReturns the value of themeanTurnoverrecord component.double[]Returns the value of thenetEquityrecord component.Returns the value of thenetMetricsrecord component.doubleReturns the value of theslippageDragrecord component.doubleReturns the value of thespreadDragrecord component.final StringtoString()Returns a string representation of this record class.doubleTotal cost drag: gross minus net, decomposed.
-
Constructor Details
-
Result
public Result(double[] netEquity, double[] grossEquity, PerformanceMetrics netMetrics, PerformanceMetrics grossMetrics, double commissionDrag, double spreadDrag, double slippageDrag, double impactDrag, double meanTurnover) Creates an instance of aResultrecord class.- Parameters:
netEquity- the value for thenetEquityrecord componentgrossEquity- the value for thegrossEquityrecord componentnetMetrics- the value for thenetMetricsrecord componentgrossMetrics- the value for thegrossMetricsrecord componentcommissionDrag- the value for thecommissionDragrecord componentspreadDrag- the value for thespreadDragrecord componentslippageDrag- the value for theslippageDragrecord componentimpactDrag- the value for theimpactDragrecord componentmeanTurnover- the value for themeanTurnoverrecord component
-
-
Method Details
-
totalCostDrag
public double totalCostDrag()Total cost drag: gross minus net, decomposed. -
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. -
netEquity
public double[] netEquity()Returns the value of thenetEquityrecord component.- Returns:
- the value of the
netEquityrecord component
-
grossEquity
public double[] grossEquity()Returns the value of thegrossEquityrecord component.- Returns:
- the value of the
grossEquityrecord component
-
netMetrics
Returns the value of thenetMetricsrecord component.- Returns:
- the value of the
netMetricsrecord component
-
grossMetrics
Returns the value of thegrossMetricsrecord component.- Returns:
- the value of the
grossMetricsrecord component
-
commissionDrag
public double commissionDrag()Returns the value of thecommissionDragrecord component.- Returns:
- the value of the
commissionDragrecord component
-
spreadDrag
public double spreadDrag()Returns the value of thespreadDragrecord component.- Returns:
- the value of the
spreadDragrecord component
-
slippageDrag
public double slippageDrag()Returns the value of theslippageDragrecord component.- Returns:
- the value of the
slippageDragrecord component
-
impactDrag
public double impactDrag()Returns the value of theimpactDragrecord component.- Returns:
- the value of the
impactDragrecord component
-
meanTurnover
public double meanTurnover()Returns the value of themeanTurnoverrecord component.- Returns:
- the value of the
meanTurnoverrecord component
-