Class PerformanceOptionPathPricer
- Namespace
- NanoQL.PricingEngines
- Assembly
- NanoQL.dll
The performance option's path pricer: each period's return under a plain vanilla payoff, discounted from its end.
public sealed class PerformanceOptionPathPricer : PathPricer<MonteCarloPath>
- Inheritance
-
PerformanceOptionPathPricer
- Inherited Members
Remarks
Immutable. QuantLib reads the periods as the path's consecutive points after its start, refusing a path of another
length ("discounts/options mismatch"), so a reset at the grid's start, which the grid merges into it, is refused
(Divergences/McPerformanceResetTodayTests.cs); given the resets' indices on the grid, it reads each period
between its own points, as the Monte Carlo forward engines read their reset, and on a grid of distinct reset times
the same points as QuantLib's.
Constructors
PerformanceOptionPathPricer(OptionType, double, IEnumerable<double>)
Initializes a new instance of the PerformanceOptionPathPricer class, QuantLib's.
public PerformanceOptionPathPricer(OptionType type, double strike, IEnumerable<double> discounts)
Parameters
typeOptionTypeThe option type.
strikedoubleThe strike, a moneyness.
discountsIEnumerable<double>The discount factors to each reset and to expiry.
Exceptions
- ArgumentNullException
discountsis null.- ArgumentOutOfRangeException
typeisn't a member of its type.
PerformanceOptionPathPricer(OptionType, double, IEnumerable<double>, IEnumerable<int>)
Initializes a new instance of the PerformanceOptionPathPricer class reading each reset at its index on the path's grid.
public PerformanceOptionPathPricer(OptionType type, double strike, IEnumerable<double> discounts, IEnumerable<int> indices)
Parameters
typeOptionTypeThe option type.
strikedoubleThe strike, a moneyness.
discountsIEnumerable<double>The discount factors to each reset and to expiry.
indicesIEnumerable<int>The grid's index of each reset and of expiry, one per discount.
Exceptions
- ArgumentNullException
A list is null.
- ArgumentOutOfRangeException
typeisn't a member of its type.- ArgumentException
The lists' lengths differ.
Methods
Evaluate(MonteCarloPath)
The periods' discounted payoffs on a path.
public override double Evaluate(MonteCarloPath path)
Parameters
pathMonteCarloPathThe path.
Returns
- double
The value.
Exceptions
- ArgumentNullException
pathis null.- NanoQLException
Without indices, the path's length isn't the discounts' and one more; with them, an index is past the path.