Table of Contents

Class ContinuousArithmeticAsianVecerEngine

Namespace
NanoQL.Experimental
Assembly
NanoQL.dll

Vecer's engine for continuous arithmetic average-price Asian options: the option's value as a one-dimensional PDE in the replicating strategy's variable, solved by Crank-Nicolson (see <http://www.stat.columbia.edu/~vecer/asian-vecer.pdf>); a put by the Asian put-call parity.

[Experimental("NQL0001")]
public static class ContinuousArithmeticAsianVecerEngine
Inheritance
ContinuousArithmeticAsianVecerEngine
Inherited Members

Remarks

The engine reads every structure on one clock, the earliest reference date of the process's structures on the risk-free day counter, each at the instant a time denotes and nothing accrued before its own date, where QuantLib measures the time from the evaluation date on the risk-free day counter beside each curve's zero rate from its own date: each rate is the curve's own zero rate to the maturity times its own time over the clock's, and the volatility its own Black volatility at the maturity times the square root of its time over the clock's; on structures sharing the evaluation date and the day counter each factor is 1 and QuantLib's numbers stand. Where the initial point lies on the grid's upper end the price is the last node's value, the interpolation's own limit, where QuantLib reads one node past the grid. The operators are built per call.

The averaging starts at the engine's start date, as QuantLib's; an option carrying a start date of its own that differs is refused, where QuantLib ignores it. QuantLib's current average is never read by its engine, nor here.

Methods

Calculate(ContinuousAveragingAsianOption, EvaluationContext, GeneralizedBlackScholesProcess, double, Date, int, int, double, double)

Prices a continuous arithmetic average-price Asian option.

public static OneAssetOptionResults Calculate(ContinuousAveragingAsianOption option, EvaluationContext context, GeneralizedBlackScholesProcess process, double currentAverage, Date startDate, int timeSteps = 100, int assetSteps = 100, double zMin = -1, double zMax = 1)

Parameters

option ContinuousAveragingAsianOption

The option: arithmetic, European, on a striked payoff.

context EvaluationContext

The evaluation context.

process GeneralizedBlackScholesProcess

The Black-Scholes process.

currentAverage double

The average so far, never read (QuantLib's engine stores it unread).

startDate Date

The averaging's start, on or after the evaluation date.

timeSteps int

The number of time steps.

assetSteps int

The number of grid steps in the strategy's variable.

zMin double

The grid's lower end, at most 0.

zMax double

The grid's upper end, at least 0.

Returns

OneAssetOptionResults

The option's results: the value; the expired results when the option has expired.

Exceptions

ArgumentNullException

An argument is null.

NanoQLException

The average isn't arithmetic, the exercise isn't European, the payoff isn't striked, 0 isn't on the grid, the start date precedes the evaluation date ("Seasoned Asian not yet implemented") or differs from the option's, or the initial point isn't on the grid ("spot not on grid").