Usage: |
{Ttree,P,Q,AD,LocVol,Onodes,Oprobs,Time}=ITT(S,r,div,time,volafunc{,skewconst}) or
{Ttree,P,Q,AD,LocVol,Onodes,Oprobs,Time}=ITT(volafunc)
|
Input: |
| S | scalar; spot price of the underlying
|
| r | scalar; interest rate from interval (0,1)
|
| div | scalar; the dividend rate from interval (0,1)
|
| time | t x 1 vector; time points (in years) when the levels of the tree occurred
(they are supposed to increase).
|
| volafunc | string; if there is only a slow variation in the implied volatilities,
volafunc has only one row containing the name of the volatility function.
This function has three input parameters: (S, K, tau),
where S is the spot price of the underlying, K denotes the exercise price
and tau the time to maturity on each level.
If the volatility varies significantly with strike or time to expiration,
volafunc can have up to 3 rows:
the first row contains the name of the volatility function for the term
structure: term(t). The second row represents the name of the first derivative of this
volatility function: term'(t). Both of these two functions have only one
parameter time and it is necessary that they can use vectors.
The third row corresponds to the name of the function for the skew structure: skew(t).
If there is no term structure, but significant skew structure,
insert volafunc[1]="".
|
| skewconst | optional vector; the skew constant c (see the reference), default is 0.1
|
Output: |
| Ttree | matrix; the Implied Trinomial Tree (the root is found in the upper left corner;
elements which do not belong to the tree are NaN's) |
| P | matrix; the up transition probabilities |
| Q | matrix; the down transition probabilities |
| AD | matrix; the Arrow-Debreu prices for the computed tree |
| LocVol | matrix; the local volatilities |
| Onodes | matrix; the overwritten nodes of the Implied Trinomial Tree,
not overwritten elements represented as NaN's. If there are no overwritten
nodes Onodes = NaN (only scalar). |
| Oprobs | ((1+4*k) x 2) matrix; coordinates of the nodes where overwritten probabilities
occurred. The first row is only auxiliary, but after that each of the following
four rows corresponds to one overwritten probability. The first element of this
quartet represents the parental node, the three other elements are daughter nodes.
If there are no overwritten probabilities Oprobs = NaN (only scalar). |
| Time | vector; useful only when there is a significant term structure - only in this
case it differs from the input parameter time. |