## XFGIBT01 (MatLab R2007b)

XFGIBT01 Outputs implied binomial trees computed by DK and BC algorithm of stock prices, transition probabilities and Arrow-Debreu prices, respectively, with a parabolic implied volatility (see IBTimpliedvola). Require IBTblackscholes.m, IBTdk.m, IBTbc.m, IBTimpliedvola.m, IBTresort.m, IBTcrr.m

Click the button to demonstrate a graph view.
Notice: This content requires Java Runtime Environment.
Java Applet and JavaScript should be allowed on your browser.

Fri, July 27 2012 by Dedy Dwi Prastyo

`IBTblackscholes, IBTdk, IBTbc, IBTimpliedvola, IBTresort, IBTcrr`

- Price of underlying asset, Interest rate, Time to expiration, Number of steps

Description: Run the program with following values for Price of underlying asset, Interest rate, Time to expiration and Number of steps, respectively: [100, 0.03, 3, 3]

```format short
disp('Please input Price of Underlying Asset s0, Riskless Interest Rate per Year r');
disp('Time to Expiration (Years) t, Number of steps n');
disp('as: [100, 0.03, 5, 5]');
disp(' ') ;
para=input('[s0, r, t, n]=');
while length(para) < 4
disp('Not enough input arguments. Please input in 1*4 vector form like [100, 0.03, 5, 5]');
disp(' ') ;
para=input('[s0, r, t, n]=');
end
s0=para(1);                             % Stock price
r=para(2);                              % Riskless interest rate
t=para(3);                              % Time to expiration
n=para(4);                              % Number of intervals format short
[St, AD, P, LV] = IBTdk(s0,r,t,n,[]);      % DK algorithm with parabolic implied volatility
[St2, AD2, P2, LV2] = IBTbc(s0,r,t,n,[]);  % BC algorithm with parabolic implied volatility
Stree = IBTresort(St);
Ptree = IBTresort(P);
Stree2 = IBTresort(St2);
Ptree2 = IBTresort(P2);
'implied stock tree D&K'
disp(Stree);
'implied stock tree B&C'
disp(Stree2);
'transition probability tree D&K'
disp(Ptree);
'transition probability tree B&C'
disp(Ptree2);
'arrow debreu price tree D&K'