You are on page 1of 16

1

16 101071016
16 101071041
16 101072245
1

-
(knock-out)

S d Z t

0 85
S =-1 S (
) S

3 0 5
0~0.5
0.5~3 3

3
1
age:
s0: -
(age)
r:(
): TEJ+
sigma:sigma
(A.1)
: 102
102
T:
r1t:
r2t:
dS: dS=1
dt: dt=1
2 Monte Carlo Simulation

3 Crank-Nicolson Method
dS=d t + s d Z t

Crank-Nicolson Method

2 i2
ri
1
2 i2 r
=

=
=
+
4
t
4 S2
2 S2 2

f i1, j1 + ( ) f i , j1+ ( + ) f i +1, j1= ( ) f i1, j + ( + ) f i , j f i+1, j


r1t
r2t

S0

4
1

1
2
3
4
Crank-Nicolson Method

MATLAB

1
T =10 (2003/1/1~2013/12/31) r(
2003 )= 2.08590%sigma 2 r1t=200
r2t=1 dS=1dt=1

1-1
1-1

2
age=60 r 2 %sigma 2
r1t=200 r2t=1 dS=1dt=1

1-2
1-2
5

3
time 10 (2003/1/1~2013/12/31)
age=60 r( 2003 )=
2.08590%r1t=200 r2t=1
5

1-3
1-3

4
time 10 (2003/1/1~2013/12/31)
20 sigma 2%r1t=200 r2t=1 NSteps=10()
NRepl=20000

1-4
1-4

c
1
()

2
CrankNicolson Method 102
102 TEJ+
()

sigma
(A.1)
z (MATLAB icdf )
1 sigma

St:
P(St>0): age T
age X age+T Y X
> YP(St > 0) 1-((X - Y) / X)
s0-(age)

(A.1)

P(St>0) =
2N((s0 - time) / (sigma * sqrt(T)) - 1 P(St > 0)= 1-((X - Y)
7

/ X)= 2N((s0 - time) / (sigma * sqrt(T)) 1 1-((X - Y) / X)


P(St > 0) 2N((s0 - time) / (sigma * sqrt(T)) 1
sigma
2
2003 1 1 20
80.02 2013 1 1 CrankNicolson Method (
) 2.08590%
200 1 ?

age = 20
T = 10
r1t = 2000000
r2t = 10000
r = 2.08590% = 0.0208590
1-5 1-6

1-5 102

1-6 102
20 99215 ( 0M 100000 15)( 30 ) 98723
(99215-98723)/99215=0.49589%
1-0.49589%=99.50411% P(St>0)
0.9950411=2N((80.02-20-10)/(sigma*sqrt(10))-1 N((50.02)/
(sigma*sqrt(10))=0.99752 x=(50.02)/(sigma*sqrt(10))N(x) =
0.99752 icdf x 1-7

1-7 z (icdf )
x = (50.02) / (sigma * sqrt(10)) = 2.8096 sigma = 5.6299
sigma 1-8

10

:Price = 2.6378e + 05 = 263,780


3

1-9

10

11

1-10

1-11

c :
r : ( 2003 )
n :

11

12

1-12
1-12 value
1-9 1-10 1-11 Monte Carlo
SimulationCrank-Nicolson Method

1-13Monte Carlo SimulationCrank-Nicolson Method

Monte Carlo SimulationCrank-Nicolson Method

Monte Carlo Simulation Crank-Nicolson Method


Crank-Nicolson Method

Monte Carlo
Simulation

1 sigma

2
3
12

13

4
5

function
pay=insurance_option(age,r,sigma,time,r1t,r2t,NSteps,NRepl)
if age<3
s0=10*age;
else
s0=80-age;
end
%% generate life path
13

14

dt = time/NSteps;
nudt = -dt;
sidt = sigma*sqrt(dt);
Increments = nudt + sidt*randn(NRepl, NSteps);
life = cumsum([s0*ones(NRepl,1) , Increments] , 2);
%% monte carlo
NCrossed=0;
for i=1:NRepl
crossed = any(life(i,:) <= 0);
if crossed == 0
payoff(i)=r2t*exp(-r*time);
else
tcrossed=min(find(life(i,:) <= 0));
payoff(i) = r1t*exp(-r*dt*(tcrossed-1));
NCrossed = NCrossed + 1;
end
end
pay = mean(payoff);

function
price=insurance_option_FIFNITE(age,r,sigma,T,r1t,r2t,dS,dt)
%sb=0
Smax=80;
if age<3
s0=10*age;
else
s0=80-age;
end
M = round(Smax/dS);
dS = (Smax)/M;
N = round(T/dt);
14

15

dt = T/N;
matval = zeros(M+1,N+1);
vetS = linspace(0,Smax,M+1)';
vetj = 0:N;
veti = vetS/dS;
vetT= linspace(0,T,N+1)';
matval(:,N+1) = r2t;
matval(1,:) = r1t;
matval(M+1,:) = r2t;
alpha = 0.25*( sigma^2*(veti.^2))/(dS^2) ;
beta = 0.25* r*veti;
gamma = -1/dt;
zz=(0.5*(sigma^2*(veti.^2))/(dS^2))+r/2;
a=gamma-zz;
b=alpha+beta;
c=beta-alpha;
d=gamma+zz;
M1 = diag(alpha(3:M),-1) + diag(a(2:M)) + diag(b(2:M-1),1);
[L,U] = lu(M1);
M2 = diag(c(3:M),-1) + diag(d(2:M)) - diag(alpha(2:M-1),1);
aux=zeros(M-1,1);
for j=N:-1:1
aux(1)=alpha(2)*matval(1,j);
aux(M-1)=b(M-1)*matval(M+1,j);
matval(2:M,j) = U \ (L \ (M2*matval(2:M,j+1)-aux));
end
idown = floor(s0/dS);
iup = ceil(s0/dS);
if idown == iup
price = matval(idown+1,1);
15

16

else
price = matval(idown+1,1) + ...
(s0 - (idown+1)*dS)*(matval(idown+2,1) matval(idown+1,1))/dS;
end

16

You might also like