Table of Contents

Class PearsonSpreadEngine

Namespace
NanoQL.PricingEngines
Assembly
NanoQL.dll

Pearson's engine for a European spread option on two futures: the Black price conditional on the second asset, integrated over its driving normal by Gauss-Lobatto quadrature; N. D. Pearson, "An Efficient Approach for Pricing Spread Options", Journal of Derivatives 3 (1995), 76-91.

public sealed class PearsonSpreadEngine : SpreadBlackScholesVanillaEngine
Inheritance
PearsonSpreadEngine
Inherited Members

Remarks

Immutable. Where the conditional strike is zero or less a put's conditional value is 0, where QuantLib takes the call's intrinsic value whatever the type (Divergences/PearsonNegativeStrikePutTests.cs).

Constructors

PearsonSpreadEngine(GeneralizedBlackScholesProcess, GeneralizedBlackScholesProcess, double, double, int, double)

Initializes a new instance of the PearsonSpreadEngine class.

public PearsonSpreadEngine(GeneralizedBlackScholesProcess process1, GeneralizedBlackScholesProcess process2, double correlation, double integrationTolerance = 1E-10, int maxIntegrationIterations = 10000, double nStd = 8)

Parameters

process1 GeneralizedBlackScholesProcess

The first asset's process.

process2 GeneralizedBlackScholesProcess

The second asset's process.

correlation double

The correlation of the two assets.

integrationTolerance double

The quadrature's absolute accuracy.

maxIntegrationIterations int

The quadrature's iteration limit.

nStd double

The standard deviations either side of zero the integral spans.

Exceptions

ArgumentNullException

A process is null.

Methods

Calculate(BasketOption, EvaluationContext, GeneralizedBlackScholesProcess, GeneralizedBlackScholesProcess, double, double, int, double)

Prices a European spread option by Pearson's integral.

public static MultiAssetOptionResults Calculate(BasketOption option, EvaluationContext context, GeneralizedBlackScholesProcess process1, GeneralizedBlackScholesProcess process2, double correlation, double integrationTolerance = 1E-10, int maxIntegrationIterations = 10000, double nStd = 8)

Parameters

option BasketOption

The option, on a SpreadBasketPayoff over a plain vanilla payoff.

context EvaluationContext

The evaluation context.

process1 GeneralizedBlackScholesProcess

The first asset's process.

process2 GeneralizedBlackScholesProcess

The second asset's process.

correlation double

The correlation of the two assets.

integrationTolerance double

The quadrature's absolute accuracy.

maxIntegrationIterations int

The quadrature's iteration limit.

nStd double

The standard deviations either side of zero the integral spans.

Returns

MultiAssetOptionResults

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, the payoff isn't a spread payoff over a plain vanilla payoff, or the quadrature doesn't converge.

Calculate(double, double, double, OptionType, double, double, double)

The value of a spread option on two forwards.

protected override double Calculate(double f1, double f2, double strike, OptionType optionType, double variance1, double variance2, double df)

Parameters

f1 double

The first forward.

f2 double

The second forward.

strike double

The strike.

optionType OptionType

The option's type.

variance1 double

The first forward's Black variance to expiry.

variance2 double

The second forward's Black variance to expiry.

df double

The discount factor to expiry.

Returns

double

The value.