Class TrinomialTree
- java.lang.Object
-
- com.opengamma.strata.pricer.impl.tree.TrinomialTree
-
public class TrinomialTree extends Object
Trinomial tree.Option pricing model based on trinomial tree. Trinomial lattice is defined by
LatticeSpecification
and the option to price is specified byOptionFunction
.Option pricing with non-uniform tree is realised by specifying
RecombiningTrinomialTreeData
.
-
-
Constructor Summary
Constructors Constructor Description TrinomialTree()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
optionPrice(OptionFunction function, RecombiningTrinomialTreeData data)
Price an option under the specified trinomial tree gird.double
optionPrice(OptionFunction function, LatticeSpecification lattice, double spot, double volatility, double interestRate, double dividendRate)
Price an option under the specified trinomial lattice.ValueDerivatives
optionPriceAdjoint(OptionFunction function, RecombiningTrinomialTreeData data)
Compute option price and delta under the specified trinomial tree gird.
-
-
-
Method Detail
-
optionPrice
public double optionPrice(OptionFunction function, LatticeSpecification lattice, double spot, double volatility, double interestRate, double dividendRate)
Price an option under the specified trinomial lattice.It is assumed that the volatility, interest rate and continuous dividend rate are constant over the lifetime of the option.
- Parameters:
function
- the optionlattice
- the lattice specificationspot
- the spotvolatility
- the volatilityinterestRate
- the interest ratedividendRate
- the dividend rate- Returns:
- the option price
-
optionPrice
public double optionPrice(OptionFunction function, RecombiningTrinomialTreeData data)
Price an option under the specified trinomial tree gird.- Parameters:
function
- the optiondata
- the trinomial tree data- Returns:
- the option price
-
optionPriceAdjoint
public ValueDerivatives optionPriceAdjoint(OptionFunction function, RecombiningTrinomialTreeData data)
Compute option price and delta under the specified trinomial tree gird.The delta is the first derivative of the price with respect to spot, and approximated by the data embedded in the trinomial tree.
- Parameters:
function
- the optiondata
- the trinomial tree data- Returns:
- the option price and spot delta
-
-