Record Class NelsonSiegel.Fit
java.lang.Object
java.lang.Record
com.quantfinlib.rates.NelsonSiegel.Fit
- Enclosing class:
NelsonSiegel
public static record NelsonSiegel.Fit(double b0, double b1, double b2, double lambda, double rmse)
extends Record
Fitted parameters plus the fit's root-mean-square error.
-
Constructor Summary
ConstructorsConstructorDescriptionFit(double b0, double b1, double b2, double lambda, double rmse) Creates an instance of aFitrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubleb0()Returns the value of theb0record component.doubleb1()Returns the value of theb1record component.doubleb2()Returns the value of theb2record component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.doublelambda()Returns the value of thelambdarecord component.doublelongRate()The long-end asymptote z(∞) = b0.doublermse()Returns the value of thermserecord component.doubleThe short-rate limit z(0+) = b0 + b1 (exact in the model).final StringtoString()Returns a string representation of this record class.doublezeroRate(double t) Model zero rate at tenortyears, > 0.
-
Constructor Details
-
Fit
public Fit(double b0, double b1, double b2, double lambda, double rmse) Creates an instance of aFitrecord class.- Parameters:
b0- the value for theb0record componentb1- the value for theb1record componentb2- the value for theb2record componentlambda- the value for thelambdarecord componentrmse- the value for thermserecord component
-
-
Method Details
-
zeroRate
public double zeroRate(double t) Model zero rate at tenortyears, > 0. -
shortRate
public double shortRate()The short-rate limit z(0+) = b0 + b1 (exact in the model). -
longRate
public double longRate()The long-end asymptote z(∞) = b0. -
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. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
b0
public double b0()Returns the value of theb0record component.- Returns:
- the value of the
b0record component
-
b1
public double b1()Returns the value of theb1record component.- Returns:
- the value of the
b1record component
-
b2
public double b2()Returns the value of theb2record component.- Returns:
- the value of the
b2record component
-
lambda
public double lambda()Returns the value of thelambdarecord component.- Returns:
- the value of the
lambdarecord component
-
rmse
public double rmse()Returns the value of thermserecord component.- Returns:
- the value of the
rmserecord component
-