Class BiasedBarrierPathPricer
- Namespace
- NanoQL.PricingEngines
- Assembly
- NanoQL.dll
The biased path pricer of a barrier option: the barrier is checked at the path's points only, so crossings between them are missed.
public sealed class BiasedBarrierPathPricer : PathPricer<MonteCarloPath>
- Inheritance
-
BiasedBarrierPathPricer
- Inherited Members
Remarks
Immutable. A knock-out pays its rebate at the hit's node, a knock-in at expiry.
Constructors
BiasedBarrierPathPricer(BarrierType, double, double, OptionType, double, IEnumerable<double>)
Initializes a new instance of the BiasedBarrierPathPricer class.
public BiasedBarrierPathPricer(BarrierType barrierType, double barrier, double rebate, OptionType type, double strike, IEnumerable<double> discounts)
Parameters
barrierTypeBarrierTypeThe barrier's type.
barrierdoubleThe barrier, positive.
rebatedoubleThe rebate.
typeOptionTypeThe option type.
strikedoubleThe strike, non-negative.
discountsIEnumerable<double>The discount factors at the path's grid times.
Exceptions
- ArgumentNullException
discountsis null.- ArgumentOutOfRangeException
barrierTypeortypeisn't a member of its type.- ArgumentException
The strike is negative ("strike less than zero not allowed") or the barrier isn't positive ("barrier less/equal zero not allowed").
Methods
Evaluate(MonteCarloPath)
The discounted payoff on a path, the barrier checked at its points.
public override double Evaluate(MonteCarloPath path)
Parameters
pathMonteCarloPathThe path.
Returns
- double
The value.
Exceptions
- ArgumentNullException
pathis null.- NanoQLException
The path has fewer than two points.