Library: | finance |
See also: | grITTcrr grITTstsp ITT plotITT regest |
Quantlet: | grITTspd | |
Description: | generates a state price density of an implied trinomial tree |
Usage: | dat=grITTspd(ttree,ad,r,time) | |
Input: | ||
ttree | matrix; implied trinomial tree corresponds to the output of ITT(.) | |
ad | matrix; Arrow-Debreu price corresponds to the output of ITT(.) | |
r | scalar; interest rate from interval (0,1) | |
time | T x 1 vector; time points corresponding to ttree | |
Output: | ||
dat | n x 2 matrix; coordinates of the density curve |
library("finance") library("smoother") library("graphic") proc(sigma)=volafunc(S,K,time) sigma=0.15 +(S-K)/10 * 0.005 endp S = 100 ; current index level r = 0.1 ; compounded riskless interest rate div = 0.05 ; dividend yield time = 0|1|3|6 ; time vector t=ITT(S, r, div, time, "volafunc") spd=grITTspd(t.Ttree,t.AD,r,time) d=createdisplay(1,1) show(d,1,1,spd)
A plot showing points of the estimated density curve.