Class LeisenReimer
The Leisen-Reimer binomial tree: centered on the strike, its probabilities from the Peizer-Pratt inversion, on an odd number of steps.
public sealed class LeisenReimer : BinomialTree<LeisenReimer>, IBinomialTree<LeisenReimer>
- Inheritance
-
LeisenReimer
- Implements
- Inherited Members
Remarks
Immutable.
Constructors
LeisenReimer(StochasticProcess1D, double, int, double)
Initializes a new instance of the LeisenReimer class.
public LeisenReimer(StochasticProcess1D process, double end, int steps, double strike)
Parameters
processStochasticProcess1DThe process, read at time 0.
enddoubleThe tree's last time.
stepsintThe number of steps; an even count builds on the next odd one, as QuantLib's does, its Columns less one.
strikedoubleThe strike the tree centers on.
Exceptions
- ArgumentNullException
processis null.- ArgumentOutOfRangeException
stepsis negative.- ArgumentException
strikeisn't positive.- NanoQLException
The up probability is outside (0, 1).
Methods
Probability(int, int, int)
The probability of a node's branch.
public override double Probability(int i, int index, int branch)
Parameters
Returns
- double
The probability.
Underlying(int, int)
The underlying variable's value at a node.
public override double Underlying(int i, int index)
Parameters
Returns
- double
The value.
Explicit Interface Implementations
Create(StochasticProcess1D, double, int, double)
Builds the tree of a process from time 0 to end.
static LeisenReimer Create(StochasticProcess1D process, double end, int steps, double strike)
Parameters
processStochasticProcess1DThe process.
enddoubleThe tree's last time.
stepsintThe number of steps asked for; a tree may build on another (its Columns less one).
strikedoubleThe strike, which some trees center on.
Returns
- LeisenReimer
The tree.