DAFTAR PUSTAKA Bodie Z, Kane A, Marcus AJ. 2005. Investasi. Jilid 1, 2. Budi Wibowo, penerjemah; Salemba Empat. Terjemahan dari: Invesment . Higham DJ. An Introduction to Financial Option Valuation. Department of Mathematics University of Strathclyde. Hull JC. 2003. Option Future and Other Derivative. University of Toronto: Prentice Hall International Inc. Leisen DPJ and Reimer M. 1996. Binomial Model for Option Valuation-Examining and Improving Convergence. Journal of Applied Mathematical Finance 3: 319-345. Niwiga DB. 2005. Numerical Method For Valuation Of Financial Derivatives [tesis]. University of Werstern Cape, South Africa. http://User.aim.ac.za/~ bundi/thesis. pdf [24 Oktober 2007]. Purcell EJ and Varberg D. 1997. Kalkulus dan Geometri Analitik. Jilid 2. I Nyoman Susilo at.al. penerjemah; Erlangga. Terjemahan dari: Calculus With Analytic Geometry.
LAMPIRAN
44 Lampiran 1 Penurunan persamaan (2.8) Persamaan (2.3) adalah dS
Sdt
Persamaan (2.5) adalah dV
S
Persamaan (2.7) adalah d
Sdz.
V S
2
1 2
V t
2
S2
V dt S2
S
V dz . S
Sdt
Sdz
V dS. S
dV
Substitusi (2.3) dan (2.5) ke dalam (2.7) diperoleh
d
V dS. S
dV
V S
S
V dt S
V dt t
S
V dt S
S
V dt t
0 V t
Jadi d
V t
2
S
V t
1 2 1 2
1 2
1 2
2
S2
1 2
V dt S 2
2
S2
S2
V dt S2 2
2
S2
V dt S2
V dz S
S
2
2
S2
V dt S2
V dt t
V dt 0 S2
2
2
V dt S2
1 2
S
V S
V dz S
S
V dt S
S
V dz S
S
V dz S
S
V dz S
2
2
S2
V dt S2
45 Lampiran 2 Penurunan persamaan (2.15). Telah diturunkan bahwa ln ST rataan dari ln ST
ln S 0 ~ N
1 2
r
2
T,
T , sehingga
ln S 0 adalah 1 2
r
2
T
dan variansinya 2
T.
(L2.1)
Persamaan (2.13) menyebutkan bahwa ln ST berdistribusi normal dengan rataan m
ln S 0
1 2
r
2
T dan standar deviasi s
Persamaan (2.14) adalah Q
ln ST
m T
T , sehingga variansinya
.
Substitusi (2.13) ke dalam (2.14) diperoleh 1
Q
T
ln ST
2
1
ln S 0
r
T
2
T
Jika a dan b suatu konstanata serta X suatu peubah acak maka (Buchanan 2007):
aX Var aX
Q
aE X
b
b
a 2Var X
b 1 T 1 T
ln ST
ln S 0
ln ST
ln S 0
2
1 T
r
T
2 2
1 T
r
2
T
2
T
46 1 T
2
1
ln ST ln S 0
T
r
T
2
(L2.2)
Substitusi (L2.1) ke dalam (L2.2) diperoleh 2
1
E Q
T
r
2
T
2
1 T
r
T
2
=0 1
Var Q =Var
=
=
T
ln S 0
2
1 T
r
2
1
Var ln ST ln S 0
T
1 2 T
ln ST
2
T
=1 Jadi rataan dari Q adalah 0 dan variansinya 1.
2
T
47 LAMPIRAN PROGRAM DENGAN SOFTWARE MATLAB 6.5 UNTUK GAMBAR DAN PENGHITUNGAN NILAI PADA TABEL Lampiran program untuk gambar 3.1 clear clc % Program untuk gambar 3.1 tic S=100; E=110; T=1; r=0.05; sigma=0.3; % M adalah banyak refinement, sebagai n %M=40; for M=1:100 dt=T/M; u=exp(sigma*sqrt(dt)); d=exp(-sigma*sqrt(dt)); p=(exp(r*dt)-d)/(u-d); W=max(S*d.^([M:-1:0]').*u.^([0:M]')-E,0); for i=M:-1:1 W=exp(-r*dt)*(p*W(2:i+1)+(1-p)*W(1:i)); end %disp('harga opsi call adalah'),disp(W) disp([M,W]) B(M)=W; end x=10:1:M; y=B(10:100) plot(x,y) hold off % solusi Black-scholes untuk CALL d1=(log(S/E)+(r+sigma^2/2)*T)/(sigma*T^0.5); d2=(log(S/E)+(r-sigma^2/2)*T)/(sigma*T^0.5); Nd1=normcdf(d1,0,1); Nd2=normcdf(d2,0,1); C=S*Nd1-E*exp(-r*T)*Nd2; disp('nilai call untuk Black-Scholes adalah'),disp(C) line([10,100],[C,C]) toc
48 Lampiran program untuk gambar 3.2 clear clc % Program untuk gambar 3.2 tic S=100; E=110; T=1; r=0.05; sigma=0.3; % M adalah banyak refinement, sebagai n %M=40; for M=1:100 dt=T/M; % p pilihan sendiri %p=0.5059008; u=exp(sigma*sqrt(dt)+(r-0.5*sigma^2)*dt); d=exp(-sigma*sqrt(dt)+(r-0.5*sigma^2)*dt); p=(exp(r*dt)-d)/(u-d); W=max(S*d.^([M:-1:0]').*u.^([0:M]')-E,0); for i=M:-1:1 W=exp(-r*dt)*(p*W(2:i+1)+(1-p)*W(1:i)); end %disp('harga opsi call adalah'),disp(W) disp([M,W]) B(M)=W; end hold on % solusi Black-scholes untuk CALL d1=(log(S/E)+(r+sigma^2/2)*T)/(sigma*T^0.5); d2=(log(S/E)+(r-sigma^2/2)*T)/(sigma*T^0.5); Nd1=normcdf(d1,0,1); Nd2=normcdf(d2,0,1); C=S*Nd1-E*exp(-r*T)*Nd2; disp('nilai call untuk Black-Scholes adalah'),disp(C) line([10,100],[C,C]) % gambar grafik x=10:1:M; y=B(10:100) plot(x,y) toc
49 Lampiran program untuk gambar 3.3 clear clc % program untuk gambar 3.3 tic S=100; E=110; T=1; r=0.05; sigma=0.3; % M adalah banyak refinement, sebagai n for M=1:100 dt=T/M; rn=exp(r*dt); vn=exp(sigma.^2*dt); u=rn*vn*0.5*(vn+1+(vn.^2+2*vn-3).^0.5) d=rn*vn*0.5*(vn+1-(vn.^2+2*vn-3).^0.5) p=(exp(r*dt)-d)/(u-d); W=max(S*d.^([M:-1:0]').*u.^([0:M]')-E,0); for i=M:-1:1 W=exp(-r*dt)*(p*W(2:i+1)+(1-p)*W(1:i)); end %disp('harga opsi call adalah'),disp(W) disp([M,W]) B(M)=W; end x=10:1:M; y=B(10:100) plot(x,y) axis([10 100 9.7 10.3]) hold off d1=(log(S/E)+(r+sigma^2/2)*T)/(sigma*T^0.5); d2=(log(S/E)+(r-sigma^2/2)*T)/(sigma*T^0.5); Nd1=normcdf(d1,0,1); Nd2=normcdf(d2,0,1); C=S*Nd1-E*exp(-r*T)*Nd2; disp('nilai call untuk Black-Scholes adalah'),disp(C) line([10,100],[C,C]) toc
50 Lampiran program untuk gambar 3.4 clear clc format long % Program untuk gambar 3.4 tic S=100; K=90; T=1; r=0.05; sigma=0.3; k=10; for i=1:6 for n=10:1:1000 %METODE CRR Versi Lain %=============================================== un=exp(sigma*(T/n)^(0.5)); dn=exp(-sigma*(T/n)^(0.5)); rn=exp(r*T/n); a=(log(K/S)-n*log(dn))/(log(un)-log(dn)); pn=(rn-dn)/(un-dn); pna=(un/rn)*pn; cnCRRVL=S*(1-binocdf(a,n,pna))-K*rn^(-n)*(1-binocdf(a,n,pn)); %METODE BS d1=(log(S/K)+(r+0.5*sigma^2)*T)/(sigma*T^0.5); d2=(log(S/K)+(r-0.5*sigma^2)*T)/(sigma*T^0.5); cnBS=S*normcdf(d1,0,1)-K*exp(-r*T)*normcdf(d2,0,1); %ERROR error(n-9)=abs(cnCRRVL-cnBS); y(n-9)=k/n; end m=min(y-error); for j=1:1:991 if (y(j)-error(j)) == m break else end
51 end k=(j+9)*(k/(j+9)-m); end %Gambar Error hold on n=10:1:1000; plot(n,error) plot(n,y) toc Lampiran program untuk gambar 3.5 clear clc format long % Program untuk gambar 3.5 tic S=100; K=110; T=1; r=0.05; sigma=0.3; k=10; for i=1:6 for n=10:1:1000 %METODE JR Versi Lain %=============================================== un=exp((r-0.5*sigma^2)*T/n+sigma*(T/n)^(0.5)); dn=exp((r-0.5*sigma^2)*T/n-sigma*(T/n)^(0.5)); rn=exp(r*T/n); a=(log(K/S)-n*log(dn))/(log(un)-log(dn)); pn=(rn-dn)/(un-dn); pna=(un/rn)*pn; cnJRVL=S*(1-binocdf(a,n,pna))-K*rn^(-n)*(1-binocdf(a,n,pn)); %METODE BS d1=(log(S/K)+(r+0.5*sigma^2)*T)/(sigma*T^0.5); d2=(log(S/K)+(r-0.5*sigma^2)*T)/(sigma*T^0.5); cnBS=S*normcdf(d1,0,1)-K*exp(-r*T)*normcdf(d2,0,1);
52 %ERROR error(n-9)=abs(cnJRVL-cnBS); y(n-9)=k/n; end m=min(y-error); for j=1:1:991 if (y(j)-error(j)) == m break else end end k=(j+9)*(k/(j+9)-m); end %Gambar Error hold on n=10:1:1000; plot(n,error) plot(n,y) toc
Lampiran program untuk gambar 3.6 clear clc format long % Program untuk gambar 3.6 tic S=100; K=100; T=1; r=0.05; sigma=0.3; k=10; for i=1:6 for n=10:1:1000 %METODE Tian Versi Lain %=============================================== vn=exp(sigma^2*T/n);
53 rn=exp(r*T/n); un=(rn*vn/2)*(vn+1+(vn^2+2*vn-3)^0.5); dn=(rn*vn/2)*(vn+1-(vn^2+2*vn-3)^0.5); a=(log(K/S)-n*log(dn))/(log(un)-log(dn)); pn=(rn-dn)/(un-dn); pna=(un/rn)*pn; cnJRVL=S*(1-binocdf(a,n,pna))-K*rn^(-n)*(1-binocdf(a,n,pn)); %METODE BS d1=(log(S/K)+(r+0.5*sigma^2)*T)/(sigma*T^0.5); d2=(log(S/K)+(r-0.5*sigma^2)*T)/(sigma*T^0.5); cnBS=S*normcdf(d1,0,1)-K*exp(-r*T)*normcdf(d2,0,1); %ERROR error(n-9)=abs(cnJRVL-cnBS); y(n-9)=k/n; end m=min(y-error); for j=1:1:991 if (y(j)-error(j)) == m break else end end k=(j+9)*(k/(j+9)-m); end %Gambar Error hold on n=10:1:1000; plot(n,error) plot(n,y) toc Lampiran program untuk gambar 3.7 sisi kanan clear clc %gambar 3.9 kanan
54 %gambar momen definisi 2 tic S=100; K=90; T=1; r=0.05; sigma=0.3; for n=10:1:1000 un=exp(sigma*(T/n)^(0.5)); dn=exp(-sigma*(T/n)^(0.5)); rn=exp(r*T/n); vn=exp(sigma^2*T/n); pn=(rn-dn)/(un-dn); m2(n-9)=((un-1)^2*pn+(dn-1)^2*(1-pn))-(rn-1)^2*vn; m3(n-9)=((un-1)^3*pn+(dn-1)^3*(1-pn))-(rn-1)^3*vn^3; pm(n-9)=log(un)*(un-1)^3; end hold on n=10:1:1000; line([10 1000],[0.0007 0.00000007]) %plot(n,m2,'red') plot(n,m3,'k--') plot(n,pm,'k-.') legend('momen ke-2','momen ke-3','momen semu') toc Lampiran program untuk gambar 3.8 sisi kanan clear clc %gambar 3.8 sisi kanan tic S=100; K=100; T=1; r=0.05; sigma=0.3; for n=10:1:1000 rn=exp(r*T/n);
55 vn=exp(sigma^2*T/n); un=(rn*vn/2)*(vn+1+(vn^2+2*vn-3)^0.5); dn=(rn*vn/2)*(vn+1-(vn^2+2*vn-3)^0.5); pn=(rn-dn)/(un-dn); m2(n-9)=((un-1)^2*pn+(dn-1)^2*(1-pn))-(rn-1)^2*vn; m3(n-9)=((un-1)^3*pn+(dn-1)^3*(1-pn))-(rn-1)^3*vn^3; pm(n-9)=log(un)*(un-1)^3; end hold on n=10:1:1000 line([10 1000],[0.0007 0.00000007]) %plot(n,m2,'red') plot(n,m3,'k-') plot(n,pm,'k-.') legend('momen ke-2','momen ke-3','momen semu') toc Lampiran program untuk gambar 3.9 sisi kanan clear clc %gambar 3.9 kanan %gambar momen definisi 2 tic S=100; K=90; T=1; r=0.05; sigma=0.3;
for n=10:1:1000 un=exp(sigma*(T/n)^(0.5)); dn=exp(-sigma*(T/n)^(0.5)); rn=exp(r*T/n); vn=exp(sigma^2*T/n); pn=(rn-dn)/(un-dn);
56
m2(n-9)=((un-1)^2*pn+(dn-1)^2*(1-pn))-(rn-1)^2*vn; m3(n-9)=((un-1)^3*pn+(dn-1)^3*(1-pn))-(rn-1)^3*vn^3; pm(n-9)=log(un)*(un-1)^3; end hold on n=10:1:1000; plot(n,m2,'red') plot(n,m3,'k--') plot(n,pm,'k-.') legend('momen ke-2','momen ke-3','momen semu') %line([10 1000],[0.0004 0.00000004]) toc Lampiran program untuk gambar 3.10 sisi kiri clear clc % grafik dari gambar 3.10 sisi kiri tic S=100; K=110; T=1; r=0.05; sigma=0.3; %n=4; for n=11:2:150 d1=(log(S/K)+(r+0.5*sigma^2)*T)/(sigma*T^0.5); d2=(log(S/K)+(r-0.5*sigma^2)*T)/(sigma*T^0.5); % untuk PP1 if K <= S pna1=0.5+(0.25-0.25*exp(-(d1/(n+(1/3)))^2*(n+(1/6))))^0.5; pn1 =0.5+(0.25-0.25*exp(-(d2/(n+(1/3)))^2*(n+(1/6))))^0.5; else pna1=0.5-(0.25-0.25*exp(-(d1/(n+(1/3)))^2*(n+(1/6))))^0.5; pn1 =0.5-(0.25-0.25*exp(-(d2/(n+(1/3)))^2*(n+(1/6))))^0.5; end rn1=exp(r*T/n); un1=rn1*(pna1/pn1);
57 dn1=(rn1-pn1*un1)/(1-pn1); a1=(log(K/S)-n*log(dn1))/(log(un1)-log(dn1)); cnPP1(n-10)=S*(1-binocdf(a1,n,pna1))-K*rn1^(-n)*(1-binocdf(a1,n,pn1)); % untuk PP2 if K <= S pna2=0.5+(0.25-0.25*exp(-(d1/(n+(1/3)+0.1/(n+1)))^2*(n+(1/6))))^0.5; pn2 =0.5+(0.25-0.25*exp(-(d2/(n+(1/3)+0.1/(n+1)))^2*(n+(1/6))))^0.5; else pna2=0.5-(0.25-0.25*exp(-(d1/(n+(1/3)+0.1/(n+1)))^2*(n+(1/6))))^0.5; pn2 =0.5-(0.25-0.25*exp(-(d2/(n+(1/3)+0.1/(n+1)))^2*(n+(1/6))))^0.5; end rn2=exp(r*T/n); un2=rn2*(pna2/pn2); dn2=(rn2-pn2*un2)/(1-pn2); a2=(log(K/S)-n*log(dn2))/(log(un2)-log(dn2)); cnPP2(n-10)=S*(1-binocdf(a2,n,pna2))-K*rn2^(-n)*(1-binocdf(a2,n,pn2)); end hold on %Gambar Garis Black Scholes %========================== d1=(log(S/K)+(r+0.5*sigma^2)*T)/(sigma*T^0.5); d2=(log(S/K)+(r-0.5*sigma^2)*T)/(sigma*T^0.5); cnBS=S*normcdf(d1,0,1)-K*exp(-r*T)*normcdf(d2,0,1); line([10,150],[cnBS,cnBS]) %Gambar opsi CRR %=============== n=11:2:150; axis([10 150 10.015 10.025]) c1=cnPP1(n-10); c2=cnPP2(n-10); plot(n,c1,'k',n,c2,'k') gtext('PP1') gtext('PP2') toc Lampiran program untuk gambar 3.10 sisi kanan clear clc
58 % grafik dari gambar 3.10 sisi kanan tic S=100; K=110; T=1; r=0.05; sigma=0.3; %n=4; for n=11:2:1000 d1=(log(S/K)+(r+0.5*sigma^2)*T)/(sigma*T^0.5); d2=(log(S/K)+(r-0.5*sigma^2)*T)/(sigma*T^0.5); % untuk Black-Scholes cnBS=S*normcdf(d1,0,1)-K*exp(-r*T)*normcdf(d2,0,1); % untuk PP1 if K <= S pna1=0.5+(0.25-0.25*exp(-(d1/(n+(1/3)))^2*(n+(1/6))))^0.5; pn1 =0.5+(0.25-0.25*exp(-(d2/(n+(1/3)))^2*(n+(1/6))))^0.5; else pna1=0.5-(0.25-0.25*exp(-(d1/(n+(1/3)))^2*(n+(1/6))))^0.5; pn1 =0.5-(0.25-0.25*exp(-(d2/(n+(1/3)))^2*(n+(1/6))))^0.5; end rn1=exp(r*T/n); un1=rn1*(pna1/pn1); dn1=(rn1-pn1*un1)/(1-pn1); a1=(log(K/S)-n*log(dn1))/(log(un1)-log(dn1)); cnPP1(n-10)=S*(1-binocdf(a1,n,pna1))-K*rn1^(-n)*(1-binocdf(a1,n,pn1)); % error PP1 error1(n-10)=abs(cnPP1(n-10)-cnBS); % untuk PP2 if K <= S pna2=0.5+(0.25-0.25*exp(-(d1/(n+(1/3)+0.1/(n+1)))^2*(n+(1/6))))^0.5; pn2 =0.5+(0.25-0.25*exp(-(d2/(n+(1/3)+0.1/(n+1)))^2*(n+(1/6))))^0.5; else pna2=0.5-(0.25-0.25*exp(-(d1/(n+(1/3)+0.1/(n+1)))^2*(n+(1/6))))^0.5; pn2 =0.5-(0.25-0.25*exp(-(d2/(n+(1/3)+0.1/(n+1)))^2*(n+(1/6))))^0.5; end rn2=exp(r*T/n); un2=rn2*(pna2/pn2); dn2=(rn2-pn2*un2)/(1-pn2);
59 a2=(log(K/S)-n*log(dn2))/(log(un2)-log(dn2)); cnPP2(n-10)=S*(1-binocdf(a2,n,pna2))-K*rn2^(-n)*(1-binocdf(a2,n,pn2)); %error PP2 error2(n-10)=abs(cnPP2(n-10)-cnBS); end %Gambar Error hold on n=11:2:1000; plot(n,error1(n-10),'k-') plot(n,error2(n-10),'k-.') legend('PP1','PP2') toc Lampiran program pembuatan tabel penghitungan nilai call untuk n = 25 clear clc format long %tic S=100; T=0.5; r=0.07; sigma=0.3; n=25; disp('======================================================== =======================================') disp(' K CRR JR Tian CRRVL PP1 PP2 BS') disp('======================================================== =======================================') for K=80:10:120; %METODE CRR %=============================================== un=exp(sigma*(T/n)^(0.5)); dn=exp(-sigma*(T/n)^(0.5)); rn=exp(r*T/n); pn=(rn-dn)/(un-dn); for j=0:n f=nchoosek(n,j)*pn^(n-j)*(1-pn)^(j)*max(0,un^(n-j)*dn^j*S-K);
60 fa(j+1)=f; end cnCRR=rn^(-n)*sum(fa); %METODE JR %=============================================== un=exp((r-0.5*sigma^2)*T/n+sigma*(T/n)^(0.5)); dn=exp((r-0.5*sigma^2)*T/n-sigma*(T/n)^(0.5)); rn=exp(r*T/n); pn=(rn-dn)/(un-dn); for j=0:n f=nchoosek(n,j)*pn^(n-j)*(1-pn)^(j)*max(0,un^(n-j)*dn^j*S-K); fa(j+1)=f; end cnJR=rn^(-n)*sum(fa); %METODE Tian %=============================================== rn=exp(r*T/n); vn=exp(sigma^2*T/n); un=(rn*vn/2)*(vn+1+(vn^2+2*vn-3)^0.5); dn=(rn*vn/2)*(vn+1-(vn^2+2*vn-3)^0.5); pn=(rn-dn)/(un-dn); for j=0:n f=nchoosek(n,j)*pn^(n-j)*(1-pn)^(j)*max(0,un^(n-j)*dn^j*S-K); fa(j+1)=f; end cnTian=rn^(-n)*sum(fa); %METODE CRR Versi Lain %=============================================== un=exp(sigma*(T/n)^(0.5)); dn=exp(-sigma*(T/n)^(0.5)); rn=exp(r*T/n); a=(log(K/S)-n*log(dn))/(log(un)-log(dn)); pn=(rn-dn)/(un-dn); pna=(un/rn)*pn; cnCRRVL=S*(1-binocdf(a,n,pna))-K*rn^(-n)*(1-binocdf(a,n,pn)); %METODE PP1 %===============================================
61 d1=(log(S/K)+(r+0.5*sigma^2)*T)/(sigma*T^0.5); d2=(log(S/K)+(r-0.5*sigma^2)*T)/(sigma*T^0.5); if K <= S pna=0.5+(0.25-0.25*exp(-(d1/(n+(1/3)))^2*(n+(1/6))))^0.5; pn =0.5+(0.25-0.25*exp(-(d2/(n+(1/3)))^2*(n+(1/6))))^0.5; else pna=0.5-(0.25-0.25*exp(-(d1/(n+(1/3)))^2*(n+(1/6))))^0.5; pn =0.5-(0.25-0.25*exp(-(d2/(n+(1/3)))^2*(n+(1/6))))^0.5; end rn=exp(r*T/n); un=rn*(pna/pn); dn=(rn-pn*un)/(1-pn); a=(log(K/S)-n*log(dn))/(log(un)-log(dn)); cnPP1=S*(1-binocdf(a,n,pna))-K*rn^(-n)*(1-binocdf(a,n,pn)); %METODE PP2 %=============================================== d1=(log(S/K)+(r+0.5*sigma^2)*T)/(sigma*T^0.5); d2=(log(S/K)+(r-0.5*sigma^2)*T)/(sigma*T^0.5); if K <= S pna=0.5+(0.25-0.25*exp(-(d1/(n+(1/3)+0.1/(n+1)))^2*(n+(1/6))))^0.5; pn =0.5+(0.25-0.25*exp(-(d2/(n+(1/3)+0.1/(n+1)))^2*(n+(1/6))))^0.5; else pna=0.5-(0.25-0.25*exp(-(d1/(n+(1/3)+0.1/(n+1)))^2*(n+(1/6))))^0.5; pn =0.5-(0.25-0.25*exp(-(d2/(n+(1/3)+0.1/(n+1)))^2*(n+(1/6))))^0.5; end rn=exp(r*T/n); un=rn*(pna/pn); dn=(rn-pn*un)/(1-pn); a=(log(K/S)-n*log(dn))/(log(un)-log(dn)); cnPP2=S*(1-binocdf(a,n,pna))-K*rn^(-n)*(1-binocdf(a,n,pn)); %METODE BS %=============================================== d1=(log(S/K)+(r+0.5*sigma^2)*T)/(sigma*T^0.5); d2=(log(S/K)+(r-0.5*sigma^2)*T)/(sigma*T^0.5); cnBS=S*normcdf(d1,0,1)-K*exp(-r*T)*normcdf(d2,0,1); W=[K,cnCRR,cnJR,cnTian,cnCRRVL,cnPP1,cnPP2,cnBS]; fprintf('%3.0f %12.8f %12.8f %12.8f %12.8f %12.8f %12.8f %12.8f\n',W);
62 end disp('======================================================== =======================================') %toc Lampiran tabel penghitungan nilai put untuk n = 25 clear clc format long tic S=100; T=0.5; r=0.07; sigma=0.3; n=25; disp('Nilai put opsi Eropa') disp('======================================================== =========================') disp(' K CRR JR Tian pnCRRVL PP1 PP2 BS') disp('======================================================== =========================') for K=80:10:120; %METODE CRR %=============================================== un=exp(sigma*(T/n)^(0.5)); dn=exp(-sigma*(T/n)^(0.5)); rn=exp(r*T/n); pn=(rn-dn)/(un-dn); for j=0:n f=nchoosek(n,j)*pn^(n-j)*(1-pn)^(j)*max(0,K-un^(n-j)*dn^j*S); fa(j+1)=f; end pnCRR=rn^(-n)*sum(fa); %METODE JR %=============================================== un=exp((r-0.5*sigma^2)*T/n+sigma*(T/n)^(0.5)); dn=exp((r-0.5*sigma^2)*T/n-sigma*(T/n)^(0.5));
63 rn=exp(r*T/n); pn=(rn-dn)/(un-dn); for j=0:n f=nchoosek(n,j)*pn^(n-j)*(1-pn)^(j)*max(0,K-un^(n-j)*dn^j*S); fa(j+1)=f; end pnJR=rn^(-n)*sum(fa); %METODE Tian %=============================================== rn=exp(r*T/n); vn=exp(sigma^2*T/n); un=(rn*vn/2)*(vn+1+(vn^2+2*vn-3)^0.5); dn=(rn*vn/2)*(vn+1-(vn^2+2*vn-3)^0.5); pn=(rn-dn)/(un-dn); for j=0:n f=nchoosek(n,j)*pn^(n-j)*(1-pn)^(j)*max(0,K-un^(n-j)*dn^j*S); fa(j+1)=f; end pnTian=rn^(-n)*sum(fa); %METODE CRR Versi Lain %=============================================== un=exp(sigma*(T/n)^(0.5)); dn=exp(-sigma*(T/n)^(0.5)); rn=exp(r*T/n); a=(log(K/S)-n*log(dn))/(log(un)-log(dn)); pn=(rn-dn)/(un-dn); pna=(un/rn)*pn; pnCRRVL=K*rn^(-n)*binocdf(a,n,pn)-S*binocdf(a,n,pna); %METODE PP1 %=============================================== d1=(log(S/K)+(r+0.5*sigma^2)*T)/(sigma*T^0.5); d2=(log(S/K)+(r-0.5*sigma^2)*T)/(sigma*T^0.5); if K <= S pna=0.5+(0.25-0.25*exp(-(d1/(n+(1/3)))^2*(n+(1/6))))^0.5; pn =0.5+(0.25-0.25*exp(-(d2/(n+(1/3)))^2*(n+(1/6))))^0.5; else pna=0.5-(0.25-0.25*exp(-(d1/(n+(1/3)))^2*(n+(1/6))))^0.5;
64 pn =0.5-(0.25-0.25*exp(-(d2/(n+(1/3)))^2*(n+(1/6))))^0.5; end rn=exp(r*T/n); un=rn*(pna/pn); dn=(rn-pn*un)/(1-pn); a=(log(K/S)-n*log(dn))/(log(un)-log(dn)); pnPP1=K*rn^(-n)*binocdf(a,n,pn)-S*binocdf(a,n,pna); %METODE PP2 %=============================================== d1=(log(S/K)+(r+0.5*sigma^2)*T)/(sigma*T^0.5); d2=(log(S/K)+(r-0.5*sigma^2)*T)/(sigma*T^0.5); if K <= S pna=0.5+(0.25-0.25*exp(-(d1/(n+(1/3)+0.1/(n+1)))^2*(n+(1/6))))^0.5; pn =0.5+(0.25-0.25*exp(-(d2/(n+(1/3)+0.1/(n+1)))^2*(n+(1/6))))^0.5; else pna=0.5-(0.25-0.25*exp(-(d1/(n+(1/3)+0.1/(n+1)))^2*(n+(1/6))))^0.5; pn =0.5-(0.25-0.25*exp(-(d2/(n+(1/3)+0.1/(n+1)))^2*(n+(1/6))))^0.5; end rn=exp(r*T/n); un=rn*(pna/pn); dn=(rn-pn*un)/(1-pn); a=(log(K/S)-n*log(dn))/(log(un)-log(dn)); pnPP2=K*rn^(-n)*binocdf(a,n,pn)-S*binocdf(a,n,pna); %METODE BS %=============================================== %d1=(log(S/K)+(r+s^2/2)*T)/(s*T^0.5); %d2=(log(S/K)+(r-s^2/2)*T)/(s*T^0.5); %Nd1=normcdf(-d1,0,1); %Nd2=normcdf(-d2,0,1); %p=K*exp(-r*T)*Nd2-S*Nd1;
d1=(log(S/K)+(r+0.5*sigma^2)*T)/(sigma*T^0.5); d2=(log(S/K)+(r-0.5*sigma^2)*T)/(sigma*T^0.5); pnBS=K*exp(-r*T)*normcdf(-d2,0,1)-S*normcdf(-d1,0,1); W=[K,pnCRR,pnJR,pnTian,pnCRRVL,pnPP1,pnPP2,pnBS]; fprintf('%3.0f %10.6f %10.6f %10.6f %10.6f %10.6f %10.6f %10.6f\n',W); end
65 disp('======================================================= ==========================') toc