Class BinomialJRBarrierEngine
- Namespace
- NanoQL.PricingEngines
- Assembly
- NanoQL.dll
The binomial barrier engine on the Jarrow-Rudd tree and Derman and Kani's discretized barrier option:
QuantLib-Python's BinomialJRBarrierEngine, QuantLib's BinomialBarrierEngine<JarrowRudd,
DiscretizedDermanKaniBarrierOption>, the wheel's closing.
public static class BinomialJRBarrierEngine
- Inheritance
-
BinomialJRBarrierEngine
- Inherited Members
Methods
Calculate(BarrierOption, EvaluationContext, GeneralizedBlackScholesProcess, int, int)
Prices a barrier option on a binomial tree.
public static OneAssetOptionResults Calculate(BarrierOption option, EvaluationContext context, GeneralizedBlackScholesProcess process, int timeSteps, int maxTimeSteps = 0)
Parameters
optionBarrierOptionThe option, with a striked payoff.
contextEvaluationContextThe evaluation context.
processGeneralizedBlackScholesProcessThe Black-Scholes process.
timeStepsintThe number of time steps, positive.
maxTimeStepsintThe most time steps Boyle and Lau's optimum may raise them to: 0, QuantLib's default, for the heuristic max(1000, 5 ×
timeSteps); equal totimeStepsto disable it. Ignored but for Cox-Ross-Rubinstein trees.
Returns
- OneAssetOptionResults
The value, delta, gamma and theta; the delta and the gamma null where the tree's first nodes don't separate.
Exceptions
- ArgumentNullException
An argument is null.
- ArgumentException
timeStepsisn't positive, ormaxTimeStepsis neither 0 nor at leasttimeSteps.- NanoQLException
The payoff isn't striked or its strike isn't positive, the underlying isn't positive or lies beyond the barrier ("barrier touched"), or the tree can't be built.