Class IntegralEngine
- Namespace
- NanoQL.PricingEngines
- Assembly
- NanoQL.dll
The pricing engine for European vanilla options by integrating the payoff against the lognormal density of the underlying at expiry, by the segment rule on 5,000 intervals over ten standard deviations each side.
public static class IntegralEngine
- Inheritance
-
IntegralEngine
- Inherited Members
Remarks
The engine reports the value. Each structure is read at the exercise date by date, nothing accrued before its own reference date (the mismatched-dates class), where QuantLib's reads throw.
At zero variance QuantLib's bounds collapse and its density divides by zero (integralengine.cpp:78-83), NaN;
here the value is the payoff at the forward, discounted, the density's limit. A documented divergence
(Divergences/IntegralEngineZeroVarianceTests.cs).
Methods
Calculate(VanillaOption, EvaluationContext, GeneralizedBlackScholesProcess)
Prices a European vanilla option.
public static OneAssetOptionResults Calculate(VanillaOption option, EvaluationContext context, GeneralizedBlackScholesProcess process)
Parameters
optionVanillaOptionThe option.
contextEvaluationContextThe evaluation context.
processGeneralizedBlackScholesProcessThe Black-Scholes process.
Returns
- OneAssetOptionResults
The option's results: the value; the expired results when it has expired.
Exceptions
- ArgumentNullException
An argument is null.
- NanoQLException
The exercise isn't European, or the payoff isn't striked.