Record Class PortfolioBacktester.Result
java.lang.Object
java.lang.Record
com.quantfinlib.backtest.portfolio.PortfolioBacktester.Result
- Enclosing class:
PortfolioBacktester
public static record PortfolioBacktester.Result(double[] equityCurve, PerformanceMetrics metrics, double totalCosts, double totalTurnoverNotional, Map<String,Double> finalPositions, double dividendCashCredited, int lifecycleEventsApplied)
extends Record
dividendCashCredited and lifecycleEventsApplied are
populated by the survivorship-aware overload (zero otherwise).-
Constructor Summary
ConstructorsConstructorDescriptionResult(double[] equityCurve, PerformanceMetrics metrics, double totalCosts, double totalTurnoverNotional, Map<String, Double> finalPositions, double dividendCashCredited, int lifecycleEventsApplied) Creates an instance of aResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the value of thedividendCashCreditedrecord component.final booleanIndicates whether some other object is "equal to" this one.double[]Returns the value of theequityCurverecord component.Returns the value of thefinalPositionsrecord component.final inthashCode()Returns a hash code value for this object.intReturns the value of thelifecycleEventsAppliedrecord component.metrics()Returns the value of themetricsrecord component.final StringtoString()Returns a string representation of this record class.doubleReturns the value of thetotalCostsrecord component.doubleReturns the value of thetotalTurnoverNotionalrecord component.
-
Constructor Details
-
Result
public Result(double[] equityCurve, PerformanceMetrics metrics, double totalCosts, double totalTurnoverNotional, Map<String, Double> finalPositions, double dividendCashCredited, int lifecycleEventsApplied) Creates an instance of aResultrecord class.- Parameters:
equityCurve- the value for theequityCurverecord componentmetrics- the value for themetricsrecord componenttotalCosts- the value for thetotalCostsrecord componenttotalTurnoverNotional- the value for thetotalTurnoverNotionalrecord componentfinalPositions- the value for thefinalPositionsrecord componentdividendCashCredited- the value for thedividendCashCreditedrecord componentlifecycleEventsApplied- the value for thelifecycleEventsAppliedrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
equityCurve
public double[] equityCurve()Returns the value of theequityCurverecord component.- Returns:
- the value of the
equityCurverecord component
-
metrics
Returns the value of themetricsrecord component.- Returns:
- the value of the
metricsrecord component
-
totalCosts
public double totalCosts()Returns the value of thetotalCostsrecord component.- Returns:
- the value of the
totalCostsrecord component
-
totalTurnoverNotional
public double totalTurnoverNotional()Returns the value of thetotalTurnoverNotionalrecord component.- Returns:
- the value of the
totalTurnoverNotionalrecord component
-
finalPositions
-
dividendCashCredited
public double dividendCashCredited()Returns the value of thedividendCashCreditedrecord component.- Returns:
- the value of the
dividendCashCreditedrecord component
-
lifecycleEventsApplied
public int lifecycleEventsApplied()Returns the value of thelifecycleEventsAppliedrecord component.- Returns:
- the value of the
lifecycleEventsAppliedrecord component
-