public class TrinomialTree extends Object
Option pricing model based on trinomial tree. Trinomial lattice is defined by LatticeSpecification
and the option to price is specified by OptionFunction
.
Option pricing with non-uniform tree is realised by specifying RecombiningTrinomialTreeData
.
Constructor and Description |
---|
TrinomialTree() |
Modifier and Type | Method and Description |
---|---|
double |
optionPrice(OptionFunction function,
LatticeSpecification lattice,
double spot,
double volatility,
double interestRate,
double dividendRate)
Price an option under the specified trinomial lattice.
|
double |
optionPrice(OptionFunction function,
RecombiningTrinomialTreeData data)
Price an option under the specified trinomial tree gird.
|
ValueDerivatives |
optionPriceAdjoint(OptionFunction function,
RecombiningTrinomialTreeData data)
Compute option price and delta under the specified trinomial tree gird.
|
public double optionPrice(OptionFunction function, LatticeSpecification lattice, double spot, double volatility, double interestRate, double dividendRate)
It is assumed that the volatility, interest rate and continuous dividend rate are constant over the lifetime of the option.
function
- the optionlattice
- the lattice specificationspot
- the spotvolatility
- the volatilityinterestRate
- the interest ratedividendRate
- the dividend ratepublic double optionPrice(OptionFunction function, RecombiningTrinomialTreeData data)
function
- the optiondata
- the trinomial tree datapublic ValueDerivatives optionPriceAdjoint(OptionFunction function, RecombiningTrinomialTreeData data)
The delta is the first derivative of the price with respect to spot, and approximated by the data embedded in the trinomial tree.
function
- the optiondata
- the trinomial tree dataCopyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.