Class FdBlackScholesAsianEngine
- Namespace
- NanoQL.PricingEngines
- Assembly
- NanoQL.dll
The finite-difference Black-Scholes engine for discrete arithmetic average-price Asian options, on a mesher of the log spot and the log average with the average's step condition at each fixing.
public static class FdBlackScholesAsianEngine
- Inheritance
-
FdBlackScholesAsianEngine
- Inherited Members
Remarks
The value, delta and gamma, as QuantLib's. Its times run on the engine's clock,
Clock(GeneralizedBlackScholesProcess, FdmQuantoHelper?), from the earliest reference date of the structures, where QuantLib takes them
from the process (Divergences/AsianMismatchedTimesTests.cs); several fixings on one date are weighed by their
count (FdmArithmeticAverageCondition).
A fixing dated from the evaluation date to the clock's origin, where the structures settle after the evaluation
date, is taken at the origin, the spot with no variance and no discount accrued, so as a past fixing at the spot
(Divergences/AsianLateSettlementTests.cs), where QuantLib refuses it as past.
Methods
Calculate(DiscreteAveragingAsianOption, EvaluationContext, GeneralizedBlackScholesProcess, int, int, int, FdmSchemeDesc?)
Prices a discrete arithmetic average-price Asian option.
public static OneAssetOptionResults Calculate(DiscreteAveragingAsianOption option, EvaluationContext context, GeneralizedBlackScholesProcess process, int tGrid = 100, int xGrid = 100, int aGrid = 50, FdmSchemeDesc? schemeDesc = null)
Parameters
optionDiscreteAveragingAsianOptionThe option.
contextEvaluationContextThe evaluation context.
processGeneralizedBlackScholesProcessThe Black-Scholes process.
tGridintThe number of time steps.
xGridintThe number of spot grid points.
aGridintThe number of average grid points.
schemeDescFdmSchemeDesc?The scheme; Douglas's by default.
Returns
- OneAssetOptionResults
The option's results: the value, delta and gamma; the expired results when the option has expired.
Exceptions
- ArgumentNullException
An argument is null.
- ArgumentOutOfRangeException
A grid size is negative.
- NanoQLException
The exercise isn't European, the average isn't arithmetic, a running average has no past fixing, the spot isn't positive, or the option's past fixings fail its checks.