Class AnalyticHestonEngineAPHelper
- Namespace
- NanoQL.PricingEngines
- Assembly
- NanoQL.dll
The integrand of AnalyticHestonEngine's control-variate forms and the control variate's value:
QuantLib's AnalyticHestonEngine::AP_Helper.
public sealed class AnalyticHestonEngineAPHelper
- Inheritance
-
AnalyticHestonEngineAPHelper
- Inherited Members
Remarks
The integrand is the damped difference between the control variate's characteristic function and the model's, on the real line for Andersen and Piterbarg's forms and on an angled contour for the others; the price is the control variate's value plus the forward over π times the integral, discounted. Immutable.
Constructors
AnalyticHestonEngineAPHelper(double, double, double, AnalyticHestonEngineComplexLogFormula, AnalyticHestonEngine, double)
Initializes a new instance of the AnalyticHestonEngineAPHelper class.
public AnalyticHestonEngineAPHelper(double term, double fwd, double strike, AnalyticHestonEngineComplexLogFormula cpxLog, AnalyticHestonEngine engine, double alpha = -0.5)
Parameters
termdoubleThe maturity.
fwddoubleThe forward.
strikedoubleThe strike.
cpxLogAnalyticHestonEngineComplexLogFormulaThe control variate: one of Andersen and Piterbarg's, the asymptotic expansion's or the angled contour's.
engineAnalyticHestonEngineThe engine whose model and characteristic function the integrand reads.
alphadoubleThe damping exponent.
Exceptions
- ArgumentNullException
engineis null.- ArgumentOutOfRangeException
cpxLogisn't a member of its enum.- ArgumentException
cpxLogis no control variate: Gatheral's form, the branch correction or the optimal choice.
Methods
ControlVariateValue()
The control variate's value, undiscounted.
public double ControlVariateValue()
Returns
- double
The value: a Black price at the average variance for Andersen and Piterbarg's forms and the angled contour, the asymptotic expansion's closed form, or the residue term without a control variate.
Exceptions
- NanoQLException
The asymptotic expansion's damping exponent isn't −0.5.
Evaluate(double)
The integrand at u.
public double Evaluate(double u)
Parameters
udoubleThe integration variable.
Returns
- double
The integrand's value.
Exceptions
- NanoQLException
The engine adds a term to the characteristic function: the control variates serve the Heston model alone.