Table of Contents

Class KirkEngine

Namespace
NanoQL.PricingEngines
Assembly
NanoQL.dll

Kirk's engine for a European spread option on two futures: E. Kirk, "Correlation in the Energy Markets", Managing Energy Price Risk, Risk Publications and Enron, pp. 71-78.

public sealed class KirkEngine : SpreadBlackScholesVanillaEngine
Inheritance
KirkEngine
Inherited Members

Remarks

Immutable. A second forward and strike summing to zero or less is refused by Black's formula, as in QuantLib.

Constructors

KirkEngine(GeneralizedBlackScholesProcess, GeneralizedBlackScholesProcess, double)

Initializes a new instance of the KirkEngine class.

public KirkEngine(GeneralizedBlackScholesProcess process1, GeneralizedBlackScholesProcess process2, double correlation)

Parameters

process1 GeneralizedBlackScholesProcess

The first asset's process.

process2 GeneralizedBlackScholesProcess

The second asset's process.

correlation double

The correlation of the two assets.

Exceptions

ArgumentNullException

A process is null.

Methods

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

Prices a European spread option by Kirk's formula.

public static MultiAssetOptionResults Calculate(BasketOption option, EvaluationContext context, GeneralizedBlackScholesProcess process1, GeneralizedBlackScholesProcess process2, double correlation)

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.

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 second forward and the strike sum to zero or less.

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.