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
basePayoffPayoffThe one-dimensional payoff applied to the spread.
Exceptions
- ArgumentNullException
basePayoffis null.
Methods
Accumulate(ReadOnlySpan<double>)
The first price less the second.
public override double Accumulate(ReadOnlySpan<double> a)
Parameters
aReadOnlySpan<double>The two assets' prices.
Returns
- double
The spread.
Exceptions
- ArgumentException
adoesn't hold two prices.