Class ArithmeticASOPathPricer
- Namespace
- NanoQL.PricingEngines
- Assembly
- NanoQL.dll
The path pricer of a discrete arithmetic average-strike Asian option: the discounted payoff of the path's last value struck at the average of its fixings and the past ones.
public sealed class ArithmeticASOPathPricer : PathPricer<MonteCarloPath>
- Inheritance
-
ArithmeticASOPathPricer
- Inherited Members
Remarks
QuantLib's: the path's nodes fixings but its start, which is one where the grid's first time is 0, and, where a fixing count is given, its last node the exercise after them. The engine's own route weighs each node by the number of fixings on its time, the exercise node none, so a fixing date given twice counts twice, QuantLib's sum to the bit where each time holds one fixing.
Constructors
ArithmeticASOPathPricer(OptionType, double, double, int, int?)
Initializes a new instance of the ArithmeticASOPathPricer class.
public ArithmeticASOPathPricer(OptionType type, double discount, double runningSum = 0, int pastFixings = 0, int? fixingCount = null)
Parameters
typeOptionTypeThe option type.
discountdoubleThe discount factor to the exercise.
runningSumdoubleThe sum of the past fixings.
pastFixingsintThe number of past fixings.
fixingCountint?The number of the path's nodes that are fixings, its start included, or null for every node.
Exceptions
- ArgumentOutOfRangeException
typeisn't a member of its type, orpastFixingsorfixingCountis negative.
Methods
Evaluate(MonteCarloPath)
Prices a path.
public override double Evaluate(MonteCarloPath path)
Parameters
pathMonteCarloPathThe path.
Returns
- double
The discounted payoff.
Exceptions
- ArgumentNullException
pathis null.- NanoQLException
The path has no node after its start, or the fixing count exceeds its length.