Record Class WalkForwardAnalyzer.Fold
java.lang.Object
java.lang.Record
com.quantfinlib.backtest.validation.WalkForwardAnalyzer.Fold
- Enclosing class:
WalkForwardAnalyzer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thebestParamsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.doubleReturns the value of theinSampleObjectiverecord component.doubleReturns the value of theoutOfSampleObjectiverecord component.inttestFrom()Returns the value of thetestFromrecord component.inttestTo()Returns the value of thetestTorecord component.final StringtoString()Returns a string representation of this record class.intReturns the value of thetrainFromrecord component.inttrainTo()Returns the value of thetrainTorecord component.
-
Constructor Details
-
Fold
public Fold(int trainFrom, int trainTo, int testFrom, int testTo, Map<String, Double> bestParams, double inSampleObjective, double outOfSampleObjective) Creates an instance of aFoldrecord class.- Parameters:
trainFrom- the value for thetrainFromrecord componenttrainTo- the value for thetrainTorecord componenttestFrom- the value for thetestFromrecord componenttestTo- the value for thetestTorecord componentbestParams- the value for thebestParamsrecord componentinSampleObjective- the value for theinSampleObjectiverecord componentoutOfSampleObjective- the value for theoutOfSampleObjectiverecord 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. -
trainFrom
public int trainFrom()Returns the value of thetrainFromrecord component.- Returns:
- the value of the
trainFromrecord component
-
trainTo
public int trainTo()Returns the value of thetrainTorecord component.- Returns:
- the value of the
trainTorecord component
-
testFrom
public int testFrom()Returns the value of thetestFromrecord component.- Returns:
- the value of the
testFromrecord component
-
testTo
public int testTo()Returns the value of thetestTorecord component.- Returns:
- the value of the
testTorecord component
-
bestParams
-
inSampleObjective
public double inSampleObjective()Returns the value of theinSampleObjectiverecord component.- Returns:
- the value of the
inSampleObjectiverecord component
-
outOfSampleObjective
public double outOfSampleObjective()Returns the value of theoutOfSampleObjectiverecord component.- Returns:
- the value of the
outOfSampleObjectiverecord component
-