public final class SabrFormulaData extends Object implements SmileModelData, org.joda.beans.ImmutableBean, Serializable
The bundle contains the SABR model parameters, alpha, beta, rho and nu, as an array.
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
double |
getAlpha()
Gets the alpha parameter.
|
double |
getBeta()
Gets the beta parameter.
|
double |
getNu()
Obtains the nu 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.
|
int |
hashCode() |
boolean |
isAllowed(int index,
double value)
Checks the value satisfies the constraint for a model parameter.
|
static org.joda.beans.TypedMetaBean<SabrFormulaData> |
meta()
The meta-bean for
SabrFormulaData. |
org.joda.beans.TypedMetaBean<SabrFormulaData> |
metaBean() |
static SabrFormulaData |
of(double[] parameters)
Obtains an instance of the SABR formula data.
|
static SabrFormulaData |
of(double alpha,
double beta,
double rho,
double nu)
Obtains an instance of the SABR formula data.
|
String |
toString() |
SabrFormulaData |
with(int index,
double value)
Creates a new smile model data bundle with a model parameter replaced.
|
SabrFormulaData |
withAlpha(double alpha)
Returns a copy of this instance with alpha replaced.
|
SabrFormulaData |
withBeta(double beta)
Returns a copy of this instance with beta replaced.
|
SabrFormulaData |
withNu(double nu)
Returns a copy of this instance with nu replaced.
|
SabrFormulaData |
withRho(double rho)
Returns a copy of this instance with rho replaced.
|
public static SabrFormulaData of(double alpha, double beta, double rho, double nu)
alpha - the alpha parameterbeta - the beta parameterrho - the rho parameternu - the nu parameterpublic static SabrFormulaData of(double[] parameters)
The parameters in the input array should be in the order of alpha, beta, rho and nu.
parameters - the parameterspublic double getAlpha()
public double getBeta()
public double getRho()
public double getNu()
public SabrFormulaData withAlpha(double alpha)
alpha - the new alphapublic SabrFormulaData withBeta(double beta)
beta - the new betapublic SabrFormulaData withRho(double rho)
rho - the new rhopublic SabrFormulaData withNu(double nu)
nu - the new nupublic 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 SabrFormulaData 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<SabrFormulaData> meta()
SabrFormulaData.public org.joda.beans.TypedMetaBean<SabrFormulaData> metaBean()
metaBean in interface org.joda.beans.Beanpublic DoubleArray getParameters()
This must be an array of length 4.
The parameters in the array are in the order of alpha, beta, rho and nu.
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.