Table of Contents

Class SpreadBasketPayoff

Namespace
NanoQL.Instruments
Assembly
NanoQL.dll

A basket payoff on the spread of two assets' prices, the first less the second.

public sealed class SpreadBasketPayoff : BasketPayoff
Inheritance
SpreadBasketPayoff
Inherited Members

Constructors

SpreadBasketPayoff(Payoff)

Initializes a new instance of the SpreadBasketPayoff class.

public SpreadBasketPayoff(Payoff basePayoff)

Parameters

basePayoff Payoff

The one-dimensional payoff applied to the spread.

Exceptions

ArgumentNullException

basePayoff is null.

Methods

Accumulate(ReadOnlySpan<double>)

The first price less the second.

public override double Accumulate(ReadOnlySpan<double> a)

Parameters

a ReadOnlySpan<double>

The two assets' prices.

Returns

double

The spread.

Exceptions

ArgumentException

a doesn't hold two prices.