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: bitree IBTdk IBTbc IBTvolaplot

Quantlet: IBTlocsigma
Description: estimates the implied local volatility of each node in the implied binomial tree

Reference(s):

Usage: loc = IBTlocsigma(ptree, prob, m, deltat)
Input:
ptree Matrix: the first j elements in the jth column are corresponding to the stock prices of the nodes at the (j-1)th level in the implied tree generated by IBTdk or IBTbc
prob Matrix: the first j elements in jth column are corresponding to the transition probability of the nodes at the (j-1)th level in the implied tree generated by IBTdk or IBTbc
m scalar: the highest level desired
deltat scalar: the length of time step (by year)
Output:
loc Matrix: 3 columns, the first column contains the stock price at some node in implied binomial tree, the second column the time to expiration and the third column the estimated implied local volatility

Example:
library("finance")
proc(sigma)=volafunc(K, S, time)
  sigma=0.1+(S-K)/S/10*0.5
endp
r=0.03		; riskless annual interest rate
S=100		; the underlying asset price
lev=4		; the number of time steps
expiration=2	; time to expiration
deltat=expiration/lev
ibtree=IBTdk(S, r, lev, expiration, "volafunc")
ptree=ibtree.Tree
prob=ibtree.prob
m=2
loc=IBTlocsigma(ptree, prob,m, deltat)
loc

Result:
Contents of loc
[ 1,]      100      0.5  0.069598
[ 2,]      100        1  0.09829
[ 3,]   93.171      0.5  0.075124
[ 4,]   93.171        1  0.10566
[ 5,]   107.33      0.5  0.064462
[ 6,]   107.33        1  0.090728
[ 7,]   85.645      0.5  0.080028
[ 8,]   85.645        1  0.11355
[ 9,]      100      0.5  0.069959
[10,]      100        1  0.098629
[11,]   114.26      0.5  0.059354
[12,]   114.26        1  0.083493
[13,]   79.293      0.5  0.085862
[14,]   93.139      0.5  0.075195
[15,]   107.37      0.5  0.064605
[16,]   121.32      0.5  0.05425



Author: J. Zheng, W. Haerdle, 20010420 license MD*Tech
(C) MD*TECH Method and Data Technologies, 05.02.2006