Finance[LatticePrice] - return the net present value of the given instruments computed using a binomial or trinomial tree
|
Calling Sequence
|
|
LatticePrice(instrument, model, discountrate, opts)
|
|
Parameters
|
|
instrument
|
-
|
one-asset option, swaption, cap, floor, or collar data structure; financial instrument
|
model
|
-
|
binomial or trinomial tree; tree approximation for the underlying stochastic process
|
discountrate
|
-
|
non-negative constant or a yield term structure; discount rate
|
opts
|
-
|
equations of the form option = value where option is one of referencedate or daycounter; specify options for the LatticePrice command
|
|
|
|
|
Description
|
|
•
|
The LatticePrice command computes the net present value of the specified financial instrument using the specified lattice approximation for the underlying stochastic process.
|
•
|
The parameter instrument is a financial instrument to be valued. At the present the following instruments are supported:
|
•
|
The parameter model is a binomial or trinomial tree.
|
•
|
The parameter discountrate is the discount rate. It can be either a non-negative constant or a yield term structure. In the former case the reference date and the day count convention for the underlying term structure can be provided using the options daycounter and referencedate.
|
•
|
Note that all internal computations are performed at the hardware precision.
|
|
|
Options
|
|
•
|
daycounter = a string containing a date specification in a format recognized by ParseDate or a date data structure -- This option specifies a day counter or day counting convention.
|
•
|
referencedate = a string containing a date specification in a format recognized by ParseDate or a date data structure -- This option specifies the reference date, that is, the date when the discount factor is 1. By default this is set to the global evaluation date.
|
|
|
Compatibility
|
|
•
|
The Finance[LatticePrice] command was introduced in Maple 15.
|
|
|
Examples
|
|
>
|
|
Set the global evaluation date to January 3, 2006.
>
|
|
>
|
|
Construct a binomial tree approximating a Black-Scholes process with an initial value of 100, a risk-free rate of 10%, and constant volatility of 40%. Assume that no dividend is paid. Build the tree by subdividing the time period 0..0.6 into 1000 equal time steps.
>
|
|
Consider an American put option with a strike price of 100 that matures in 6 months.
>
|
|
| (1) |
>
|
|
>
|
|
| (2) |
>
|
|
| (3) |
>
|
|
Calculate the price of this option using the tree constructed above. Use the risk-free rate as the discount rate.
>
|
|
| (4) |
>
|
|
| (5) |
The next set of examples will demonstrate how to price American-style swaptions using Hull-White trinomial trees.
>
|
|
>
|
|
| (6) |
>
|
|
| (7) |
>
|
|
| (8) |
>
|
|
| (9) |
>
|
|
| (10) |
>
|
|
| (11) |
>
|
|
| (12) |
>
|
|
| (13) |
>
|
|
| (14) |
Construct an interest rate swap receiving the fixed-rate payments in exchange for the floating-rate payments.
>
|
|
| (15) |
Compute the at-the-money rate for this interest rate swap.
>
|
|
| (16) |
Construct three swaps.
>
|
|
| (17) |
>
|
|
| (18) |
>
|
|
| (19) |
Here are cash flows for the paying leg of our interest rate swap.
>
|
|
![cash_flows := [`39.96838906 on 'November 17, 2008'`, `39.96838906 on 'November 17, 2009'`, `39.96838906 on 'November 17, 2010'`, `39.96838906 on 'November 17, 2011'`, `39.96838906 on 'November 19, 2012'`]](/support/helpjp/helpview.aspx?si=8863/file01656/math355.png)
| (20) |
Here are cash flows for the receiving leg of our interest rate swap.
>
|
|
![[`24.67872558 on 'May 19, 2008'`, `24.40119905 on 'November 17, 2008'`, `24.81751704 on 'May 18, 2009'`, `24.53995292 on 'November 17, 2009'`, `24.67872558 on 'May 17, 2010'`, `24.67872558 on 'November 17, 2010'`, `24.67872558 on 'May 17, 2011'`, `24.67872558 on 'November 17, 2011'`, `24.67872558 on 'May 17, 2012'`, `24.95632730 on 'November 19, 2012'`]](/support/helpjp/helpview.aspx?si=8863/file01656/math364.png)
| (21) |
These are the days when coupon payments are scheduled to occur.
>
|
|
| (22) |
>
|
![itm_swaption := AmericanSwaption(itm_swap, AdvanceDate(start, 1, Days, EURIBOR), AdvanceDate(dates[-2], 1, Days, EURIBOR))](/support/helpjp/helpview.aspx?si=8863/file01656/math377.png)
|
| (23) |
>
|
![atm_swaption := AmericanSwaption(atm_swap, AdvanceDate(start, 1, Days, EURIBOR), AdvanceDate(dates[-2], 1, Days, EURIBOR))](/support/helpjp/helpview.aspx?si=8863/file01656/math384.png)
|
| (24) |
>
|
![otm_swaption := AmericanSwaption(otm_swap, AdvanceDate(start, 1, Days, EURIBOR), AdvanceDate(dates[-2], 1, Days, EURIBOR))](/support/helpjp/helpview.aspx?si=8863/file01656/math391.png)
|
| (25) |
Price these swaptions using the Hull-White trinomial tree.
>
|
|
| (26) |
>
|
|
| (27) |
>
|
|
| (28) |
>
|
|
| (29) |
>
|
|
| (30) |
Price your swaptions using the tree constructed above.
>
|
|
| (31) |
>
|
|
| (32) |
>
|
|
| (33) |
|
|
See Also
|
|
Finance[BermudanSwaption], Finance[BinomialTree], Finance[BlackScholesBinomialTree], Finance[BlackScholesTrinomialTree], Finance[EuropeanSwaption], Finance[GetDescendants], Finance[GetProbabilities], Finance[GetUnderlying], Finance[ImpliedBinomialTree], Finance[ImpliedTrinomialTree], Finance[LatticeMethods], Finance[LatticePrice], Finance[MultinomialTree], Finance[SetDescendants], Finance[SetProbabilities], Finance[ShortRateTree], Finance[StochasticProcesses], Finance[TreePlot], Finance[TrinomialTree]
|
|