public final class SabrModelFitter extends SmileModelFitter<SabrFormulaData>
Attempts to calibrate SABR model to the implied volatilities of European vanilla options, by minimizing the sum of squares between the market and model implied volatilities.
All the options must be for the same expiry and (implicitly) on the same underlying.
Constructor and Description |
---|
SabrModelFitter(double forward,
DoubleArray strikes,
double timeToExpiry,
DoubleArray impliedVols,
DoubleArray error,
SabrVolatilityFormula sabrVolatilityFormula)
Constructs SABR model fitter from forward, strikes, time to expiry, implied volatilities and error values.
|
SabrModelFitter(double forward,
DoubleArray strikes,
double timeToExpiry,
DoubleArray impliedVols,
DoubleArray error,
VolatilityFunctionProvider<SabrFormulaData> model)
Constructs SABR model fitter from forward, strikes, time to expiry, implied volatilities and error values.
|
Modifier and Type | Method and Description |
---|---|
protected DoubleArray |
getMaximumStep()
Obtains the maximum number of iterations.
|
protected com.opengamma.strata.math.impl.minimization.NonLinearParameterTransforms |
getTransform(DoubleArray start)
Obtains the nonlinear transformation of parameters from the initial values.
|
protected com.opengamma.strata.math.impl.minimization.NonLinearParameterTransforms |
getTransform(DoubleArray start,
BitSet fixed)
Obtains the nonlinear transformation of parameters from the initial values with some parameters fixed.
|
SabrFormulaData |
toSmileModelData(DoubleArray modelParameters)
Obtains
SmileModelData instance from the model parameters. |
getConstraintFunction, getModel, getModelJacobianFunction, getModelValueFunction, solve, solve, solve
public SabrModelFitter(double forward, DoubleArray strikes, double timeToExpiry, DoubleArray impliedVols, DoubleArray error, SabrVolatilityFormula sabrVolatilityFormula)
strikes
, impliedVols
and error
should be the same length and ordered coherently.
forward
- the forward value of the underlyingstrikes
- the ordered values of strikestimeToExpiry
- the time-to-expiryimpliedVols
- the market implied volatilitieserror
- the 'measurement' error to apply to the market volatility of a particular optionsabrVolatilityFormula
- the volatility formulapublic SabrModelFitter(double forward, DoubleArray strikes, double timeToExpiry, DoubleArray impliedVols, DoubleArray error, VolatilityFunctionProvider<SabrFormulaData> model)
strikes
, impliedVols
and error
should be the same length and ordered coherently.
forward
- the forward value of the underlyingstrikes
- the ordered values of strikestimeToExpiry
- the time-to-expiryimpliedVols
- the market implied volatilitieserror
- the 'measurement' error to apply to the market volatility of a particular optionmodel
- the volatility function providerpublic SabrFormulaData toSmileModelData(DoubleArray modelParameters)
SmileModelFitter
SmileModelData
instance from the model parameters.toSmileModelData
in class SmileModelFitter<SabrFormulaData>
modelParameters
- the model parametersprotected com.opengamma.strata.math.impl.minimization.NonLinearParameterTransforms getTransform(DoubleArray start)
SmileModelFitter
getTransform
in class SmileModelFitter<SabrFormulaData>
start
- the initial valuesprotected com.opengamma.strata.math.impl.minimization.NonLinearParameterTransforms getTransform(DoubleArray start, BitSet fixed)
SmileModelFitter
getTransform
in class SmileModelFitter<SabrFormulaData>
start
- the initial valuesfixed
- the parameters are fixedprotected DoubleArray getMaximumStep()
SmileModelFitter
getMaximumStep
in class SmileModelFitter<SabrFormulaData>
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.