Class FdmHestonSolver
The finite-difference Heston solver: FdmHestonOp on the problem's grid in the logarithm of the underlying by the variance, rolled back by the two-dimensional solver, read at a spot and a variance.
public sealed class FdmHestonSolver
- Inheritance
-
FdmHestonSolver
- Inherited Members
Remarks
Computed at construction, where QuantLib's lazy object computes at the first read, and immutable after (Fdm2DimSolver's form). The problem's times are Clock(HestonProcess, FdmQuantoHelper?, LocalVolTermStructure?)'s.
The delta and gamma are the first and second derivatives with respect to the spot, not the model-implied ones (Fabio Mercurio, Massimo Morini, "A Note on Hedging with Local and Stochastic Volatility Models"); the mean-variance delta and gamma add the variance's moves along its correlation with the spot.
Constructors
FdmHestonSolver(HestonProcess, FdmSolverDesc, FdmSchemeDesc?, FdmQuantoHelper?, LocalVolTermStructure?, double)
Initializes a new instance of the FdmHestonSolver class, and solves the problem.
public FdmHestonSolver(HestonProcess process, FdmSolverDesc solverDesc, FdmSchemeDesc? schemeDesc = null, FdmQuantoHelper? quantoHelper = null, LocalVolTermStructure? leverageFct = null, double mixingFactor = 1)
Parameters
processHestonProcessThe Heston process.
solverDescFdmSolverDescThe problem, on Clock(HestonProcess, FdmQuantoHelper?, LocalVolTermStructure?)'s times.
schemeDescFdmSchemeDesc?The scheme; Hundsdorfer's by default, QuantLib's.
quantoHelperFdmQuantoHelperThe quanto helper, or null for none.
leverageFctLocalVolTermStructureThe leverage function, or null for none.
mixingFactordoubleThe factor scaling the variance's volatility σ.
Exceptions
- ArgumentNullException
The process or the problem is null.
- ArgumentException
The rollback's arguments are refused.
- NanoQLException
A step or the spline fails.
Methods
DeltaAt(double, double)
The first derivative with respect to the spot at a spot and a variance.
public double DeltaAt(double s, double v)
Parameters
Returns
- double
The delta.
GammaAt(double, double)
The second derivative with respect to the spot at a spot and a variance.
public double GammaAt(double s, double v)
Parameters
Returns
- double
The gamma.
MeanVarianceDeltaAt(double, double)
The mean-variance delta at a spot and a variance: the delta plus ρσ/s times the derivative with respect to the variance.
public double MeanVarianceDeltaAt(double s, double v)
Parameters
Returns
- double
The mean-variance delta.
MeanVarianceGammaAt(double, double)
The mean-variance gamma at a spot and a variance.
public double MeanVarianceGammaAt(double s, double v)
Parameters
Returns
- double
The mean-variance gamma.
ThetaAt(double, double)
The theta at a spot and a variance.
public double? ThetaAt(double s, double v)
Parameters
Returns
ValueAt(double, double)
The value at a spot and a variance.
public double ValueAt(double s, double v)
Parameters
Returns
- double
The value.