Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

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.

Reference(s):

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

Example:
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)

Result:
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



Author: K. Komorad, W. Haerdle, 20020401 license MD*Tech
(C) MD*TECH Method and Data Technologies, 05.02.2006