Library: | finance |
See also: | ITT grITTcrr IBTnicemat |
Quantlet: | ITTnicemat | |
Description: | writes any matrix with the ITT convention style as a string where the central node is found in the middle. |
Usage: | ITTnicemat(title,onetree,prec) | |
Input: | ||
title | string; description of onetree | |
onetree | matrix; corresponds to any output matrix of ITT(.): Ttree, P, Q, AD or LocVol. | |
prec | scalar; the precision of the description |
library("finance") proc(sigma)=volafunc(S,K,time) sigma=0.15 +(K-S)/10 * 0.005 endp S = 100 ; current index level r = 0.1 ; interest rate div = 0.05 ; dividend yield time = 0|0.5|1 ; 2 half-year periods t=ITT(S, r, div, time, "volafunc") t.Ttree ITTnicemat("State space of the ITT",t.Ttree,2)
Contents of Ttree [1,] 100 116.18 134.99 [2,] +NAN 100 116.18 [3,] +NAN 86.071 100 [4,] +NAN +NAN 86.071 [5,] +NAN +NAN 74.082 State space of the ITT 134.99 116.18 116.18 100.00 100.00 100.00 86.07 86.07 74.08