Table of Contents

Class FdKlugeExtOUSpreadEngine

Namespace
NanoQL.Experimental
Assembly
NanoQL.dll

The three-dimensional finite-difference engine of a spread option between Kluge's power e^(f_p(t) + X + Y) and the gas price e^(f_g(t) + U) of a KlugeExtOUProcess: X's and U's meshers from their extended Ornstein-Uhlenbeck processes, Y's an exponential jump mesher, the basket payoff on power and gas, and early exercise by the vanilla step conditions.

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

Remarks

QuantLib's engine takes the vanilla option's arguments and casts its payoff to a basket payoff; its case prices a basket option, which is the instrument here. The maturity and the step conditions' times are read on the discount curve's day counter from its reference date, as QuantLib's. A time past a seasonal shape's last is refused.

Methods

Calculate(BasketOption, EvaluationContext, KlugeExtOUProcess, YieldTermStructure, int, int, int, int, IReadOnlyList<(double Time, double Value)>?, IReadOnlyList<(double Time, double Value)>?, FdmSchemeDesc?)

Prices a spread option.

public static MultiAssetOptionResults Calculate(BasketOption option, EvaluationContext context, KlugeExtOUProcess klugeOUProcess, YieldTermStructure rTS, int tGrid = 25, int xGrid = 50, int yGrid = 10, int uGrid = 25, IReadOnlyList<(double Time, double Value)>? gasShape = null, IReadOnlyList<(double Time, double Value)>? powerShape = null, FdmSchemeDesc? schemeDesc = null)

Parameters

option BasketOption

The option, its payoff a basket payoff on power and gas.

context EvaluationContext

The evaluation context.

klugeOUProcess KlugeExtOUProcess

The process.

rTS YieldTermStructure

The discount curve.

tGrid int

The time steps.

xGrid int

X's mesher points.

yGrid int

Y's mesher points.

uGrid int

The gas price's mesher points.

gasShape IReadOnlyList<(double Time, double Value)>

The gas price's seasonal shape, or null for none.

powerShape IReadOnlyList<(double Time, double Value)>

The power price's seasonal shape, or null for none.

schemeDesc FdmSchemeDesc?

The scheme, or null for Hundsdorfer's.

Returns

MultiAssetOptionResults

The results: the value alone.

Exceptions

ArgumentNullException

An argument is null.

ArgumentOutOfRangeException

A grid size is negative.

NanoQLException

The option is refused, or a time is past a shape's last.