public final class HullWhiteOneFactorPiecewiseConstantParameters extends Object implements org.joda.beans.ImmutableBean, Serializable
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
double |
getLastVolatility()
Gets the last volatility of the volatility parameters.
|
double |
getMeanReversion()
Gets the mean reversion speed parameter.
|
DoubleArray |
getVolatility()
Gets the volatility parameters.
|
DoubleArray |
getVolatilityTime()
Gets the times separating the constant volatility periods.
|
int |
hashCode() |
static org.joda.beans.TypedMetaBean<HullWhiteOneFactorPiecewiseConstantParameters> |
meta()
The meta-bean for
HullWhiteOneFactorPiecewiseConstantParameters. |
org.joda.beans.TypedMetaBean<HullWhiteOneFactorPiecewiseConstantParameters> |
metaBean() |
static HullWhiteOneFactorPiecewiseConstantParameters |
of(double meanReversion,
DoubleArray volatility,
DoubleArray volatilityTime)
Obtains an instance from the model parameters.
|
String |
toString() |
HullWhiteOneFactorPiecewiseConstantParameters |
withLastVolatility(double volatility)
Returns a copy with the last volatility of the volatility parameters changed.
|
HullWhiteOneFactorPiecewiseConstantParameters |
withVolatility(DoubleArray volatility)
Returns a copy with the volatility parameters changed.
|
HullWhiteOneFactorPiecewiseConstantParameters |
withVolatilityAdded(double volatility,
double volatilityTime)
Returns a copy with an extra volatility and volatility time added at the end of the respective arrays.
|
public static HullWhiteOneFactorPiecewiseConstantParameters of(double meanReversion, DoubleArray volatility, DoubleArray volatilityTime)
volatilityTime should be sorted in increasing order. The first time (0) and the last time (1000) will be
added within this method. Thus the size of volatility should be greater than that of volatilityTime
by one.
meanReversion - the mean reversion speed (a) parametervolatility - the volatility parametersvolatilityTime - the times separating the constant volatility periodspublic HullWhiteOneFactorPiecewiseConstantParameters withVolatility(DoubleArray volatility)
volatility - the new volatility parameterspublic double getLastVolatility()
public HullWhiteOneFactorPiecewiseConstantParameters withLastVolatility(double volatility)
volatility - the new volatilitypublic HullWhiteOneFactorPiecewiseConstantParameters withVolatilityAdded(double volatility, double volatilityTime)
volatility - the volatilityvolatilityTime - the times separating the constant volatility periods. Must be larger than the previous onepublic static org.joda.beans.TypedMetaBean<HullWhiteOneFactorPiecewiseConstantParameters> meta()
HullWhiteOneFactorPiecewiseConstantParameters.public org.joda.beans.TypedMetaBean<HullWhiteOneFactorPiecewiseConstantParameters> metaBean()
metaBean in interface org.joda.beans.Beanpublic double getMeanReversion()
public DoubleArray getVolatility()
The volatility is constant between the volatility times, i.e., volatility value at t is volatility.get(i)
for any t between volatilityTime.get(i) and volatilityTime.get(i+1).
public DoubleArray getVolatilityTime()
The time should be sorted by increasing order. The first time is 0 and the last time is 1000 (represents infinity).
These extra times are added in of(double, DoubleArray, DoubleArray).
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.