Table of Contents

Class AnalyticCompoundOptionEngine

Namespace
NanoQL.PricingEngines
Assembly
NanoQL.dll

The analytic engine for a compound option: Geske's formula, the critical spot at the mother's maturity where the daughter is worth the mother's strike, and a bivariate term for the daughter.

public static class AnalyticCompoundOptionEngine
Inheritance
AnalyticCompoundOptionEngine
Inherited Members

Remarks

Stateless. QuantLib solves its critical spot on the volatility at a date as far from the curves' start as the daughter's maturity from the mother's and on the discounts over that span, then reads the daughter's volatility at its maturity and the mother's at the mother's strike, so it is exact only on flat markets; here Geske's formula reads the variances to each maturity at the daughter's strike, the correlation √(V_M/V_D) and the discounts by date, and the critical spot solves the daughter's forward Black value over the mother's period (Divergences/CompoundTermStructureTests.cs, against the exact integral at the mother's maturity within Brent's accuracy), with QuantLib's solver, bracket and accuracy. The Greeks are the form's: the delta and gamma with the critical spot held, the vega under a parallel shift of the volatilities, and the theta with each date's zero rate and volatility held as the times shorten, where QuantLib's take the vega on the daughter's volatility alone and discount the mother's strike at the daughter's rate in the theta. The bivariate normal is West's, QuantLib's default, where its engine reads Drezner's.

Where the daughter is a put whose largest value, K_D·D(T_M, T_D), doesn't exceed the mother's strike, there is no critical spot and QuantLib's Brent refuses ("root not bracketed"); the mother is then never exercised (a call on the put is worth 0) or always (a put on the put is worth K_M·D(T_M) less the put), and those limits are priced (Divergences/CompoundNoCriticalSpotTests.cs). Every structure is read by date, accruing nothing before its own date (Divergences/ExoticMismatchedTimesTests.cs); a date before the process's clock keeps QuantLib's "negative time" refusal.

Methods

Calculate(CompoundOption, EvaluationContext, GeneralizedBlackScholesProcess)

Prices a compound option: QuantLib's calculate.

public static OneAssetOptionResults Calculate(CompoundOption option, EvaluationContext context, GeneralizedBlackScholesProcess process)

Parameters

option CompoundOption

The option.

context EvaluationContext

The evaluation context.

process GeneralizedBlackScholesProcess

The underlying's process.

Returns

OneAssetOptionResults

The option's results: the value, delta, gamma, vega and theta.

Exceptions

ArgumentNullException

An argument is null.

NanoQLException

The option's terms are invalid; a payoff isn't plain vanilla; a strike or the spot isn't positive; a date is before the clock's date; or the critical spot isn't bracketed.