Record Class DrawdownAnalytics.Result
java.lang.Object
java.lang.Record
com.quantfinlib.backtest.DrawdownAnalytics.Result
- Record Components:
maxDepth- deepest episode's depth (0 if equity never dips)maxDuration- longest episode duration in periodstimeUnderWater- fraction of periods below the running peakepisodes- chronological drawdown episodes
- Enclosing class:
DrawdownAnalytics
public static record DrawdownAnalytics.Result(double maxDepth, int maxDuration, double timeUnderWater, List<DrawdownAnalytics.Drawdown> episodes)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionResult(double maxDepth, int maxDuration, double timeUnderWater, List<DrawdownAnalytics.Drawdown> episodes) Creates an instance of aResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionepisodes()Returns the value of theepisodesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.doublemaxDepth()Returns the value of themaxDepthrecord component.intReturns the value of themaxDurationrecord component.doubleReturns the value of thetimeUnderWaterrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Result
public Result(double maxDepth, int maxDuration, double timeUnderWater, List<DrawdownAnalytics.Drawdown> episodes) Creates an instance of aResultrecord class.- Parameters:
maxDepth- the value for themaxDepthrecord componentmaxDuration- the value for themaxDurationrecord componenttimeUnderWater- the value for thetimeUnderWaterrecord componentepisodes- the value for theepisodesrecord 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. -
maxDepth
-
maxDuration
public int maxDuration()Returns the value of themaxDurationrecord component.- Returns:
- the value of the
maxDurationrecord component
-
timeUnderWater
public double timeUnderWater()Returns the value of thetimeUnderWaterrecord component.- Returns:
- the value of the
timeUnderWaterrecord component
-
episodes
-