Record Class PairsHedger.PairsAnalysis
java.lang.Object
java.lang.Record
com.quantfinlib.hedging.PairsHedger.PairsAnalysis
- Enclosing class:
PairsHedger
public static record PairsHedger.PairsAnalysis(double hedgeRatio, double intercept, double correlation, double halfLifeBars, double lastZScore, double[] spread)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionPairsAnalysis(double hedgeRatio, double intercept, double correlation, double halfLifeBars, double lastZScore, double[] spread) Creates an instance of aPairsAnalysisrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the value of thecorrelationrecord component.final booleanIndicates whether some other object is "equal to" this one.doubleReturns the value of thehalfLifeBarsrecord component.final inthashCode()Returns a hash code value for this object.doubleReturns the value of thehedgeRatiorecord component.doubleReturns the value of theinterceptrecord component.doubleReturns the value of thelastZScorerecord component.double[]spread()Returns the value of thespreadrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PairsAnalysis
public PairsAnalysis(double hedgeRatio, double intercept, double correlation, double halfLifeBars, double lastZScore, double[] spread) Creates an instance of aPairsAnalysisrecord class.- Parameters:
hedgeRatio- the value for thehedgeRatiorecord componentintercept- the value for theinterceptrecord componentcorrelation- the value for thecorrelationrecord componenthalfLifeBars- the value for thehalfLifeBarsrecord componentlastZScore- the value for thelastZScorerecord componentspread- the value for thespreadrecord 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. -
hedgeRatio
public double hedgeRatio()Returns the value of thehedgeRatiorecord component.- Returns:
- the value of the
hedgeRatiorecord component
-
intercept
public double intercept()Returns the value of theinterceptrecord component.- Returns:
- the value of the
interceptrecord component
-
correlation
public double correlation()Returns the value of thecorrelationrecord component.- Returns:
- the value of the
correlationrecord component
-
halfLifeBars
public double halfLifeBars()Returns the value of thehalfLifeBarsrecord component.- Returns:
- the value of the
halfLifeBarsrecord component
-
lastZScore
public double lastZScore()Returns the value of thelastZScorerecord component.- Returns:
- the value of the
lastZScorerecord component
-
spread
public double[] spread()Returns the value of thespreadrecord component.- Returns:
- the value of the
spreadrecord component
-