public final class SsviFormulaData extends Object implements SmileModelData, org.joda.beans.ImmutableBean, Serializable
The bundle contains the SSVI model parameters, ATM volatility, rho and eta.
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
double |
getEta()
Gets the eta parameters.
|
int |
getNumberOfParameters()
Obtains the number of model parameters.
|
double |
getParameter(int index)
Obtains a model parameter specified by the index.
|
DoubleArray |
getParameters()
Gets the model parameters.
|
double |
getRho()
Gets the rho parameter.
|
double |
getSigma()
Gets the sigma parameter.
|
int |
hashCode() |
boolean |
isAllowed(int index,
double value)
Checks the value satisfies the constraint for a model parameter.
|
static org.joda.beans.TypedMetaBean<SsviFormulaData> |
meta()
The meta-bean for
SsviFormulaData. |
org.joda.beans.TypedMetaBean<SsviFormulaData> |
metaBean() |
static SsviFormulaData |
of(double[] parameters)
Obtains an instance of the SSVI formula data.
|
static SsviFormulaData |
of(double sigma,
double rho,
double eta)
Obtains an instance of the SSVI formula data.
|
String |
toString() |
SsviFormulaData |
with(int index,
double value)
Creates a new smile model data bundle with a model parameter replaced.
|
SsviFormulaData |
withEta(double eta)
Returns a copy of this instance with eta replaced.
|
SsviFormulaData |
withRho(double rho)
Returns a copy of this instance with rho replaced.
|
SsviFormulaData |
withSigma(double sigma)
Returns a copy of this instance with sigma replaced.
|
public static SsviFormulaData of(double sigma, double rho, double eta)
sigma - the sigma parameter, ATM volatilityrho - the rho parametereta - the eta parameterpublic static SsviFormulaData of(double[] parameters)
The parameters in the input array should be in the order of sigma (ATM volatility), rho and eta.
parameters - the parameterspublic double getSigma()
public double getRho()
public double getEta()
public SsviFormulaData withSigma(double sigma)
sigma - the new sigmapublic SsviFormulaData withRho(double rho)
rho - the new rhopublic SsviFormulaData withEta(double eta)
eta - the new etapublic int getNumberOfParameters()
SmileModelDatagetNumberOfParameters in interface SmileModelDatapublic double getParameter(int index)
SmileModelDatagetParameter in interface SmileModelDataindex - the indexpublic boolean isAllowed(int index,
double value)
SmileModelData
The parameter is specified by index.
isAllowed in interface SmileModelDataindex - the indexvalue - the valuepublic SsviFormulaData with(int index, double value)
SmileModelData
The parameter is specified by index and replaced by value.
with in interface SmileModelDataindex - the indexvalue - the valuepublic static org.joda.beans.TypedMetaBean<SsviFormulaData> meta()
SsviFormulaData.public org.joda.beans.TypedMetaBean<SsviFormulaData> metaBean()
metaBean in interface org.joda.beans.Beanpublic DoubleArray getParameters()
This must be an array of length 3.
The parameters in the array are in the order of sigma (ATM volatility), rho and eta.
The constraints for the parameters are defined in isAllowed(int, double).
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.