Professional Documents
Culture Documents
Paper - Important Sampling
Paper - Important Sampling
dung cheng
2017. 08
1 Basic knowledge
2 Variance Reduction
3 Change of Measure
5 Importance Sampling
8 Reference
We consider the events that occur with low frequency as rare event.
Financial example:
I Default rate: joint default probability
I Risk management: portfolio credit risk, systemic risk
function estimate(N, C)
for i=1:length(C)
%Crude Monte Carlo
A = randn(1,N);
CMC_sm = sum(A<C(i))/N;
CMC_se = std(A<C(i))/sqrt(N);
%Exact answer
mu = 0;
sigma = 1;
pd = makedist(’Normal’,mu,sigma);
cdf_ans = cdf(pd,C(i));
fprintf(’%1.1f & %e & %e & %e \\\\\n’, C(i), cdf_ans,
end
end
Additivity:
Estimate E[X ] by E[X + C λ]
where λ: control parameter with E[C ] = 0
I Asian option !
1 T
Z 1 RT
X =h St dt , Y = h e T 0 ln St dt
T 0
Let C = Y − E[Y ], then E[C ] = 0.
I American option pricing by Monte Carlo Simulation
(ref. Longstaff-Schwartz, 2000)
Multiplicity:
Estimate E[X ] by Ẽ[X · Q(X )] where Q(X ): importance function.
In option pricing, the importance sampling plays the role of change of
probability measure.
I X ∼ N(0, 1), evaluate p = P(X < c) = E[I(X < c)]
Z
E[I(X < c)] = I(X < c)f (x)dx
Z
f (x) ˜
= I(X < c) · f (x)dx
f˜(x)
h f (x) i
=E
e I(X < c)
f˜(x)
| {z }
likelyhood ratio
e µx f (x)
where f˜(x) = , MX (µ) = E[e µX ]: moment generating function
MX (µ)
Z ∞
M(z, t) = e zx f (x, t)dx
−∞
e hx f (x, t)
f (x, t; h) :=
M(h, t)
M(z + h, t)
M(z, t; h) := , and note that M(z, t; h) = [M(z, 1; h)]t
M(h, t)
Goal: seek h∗ such that the discounted price e −δt S(t) is a martingale
under the new probability measure given by Esscher transform
I S(0) = E∗ [e −δt S(t)] ⇒ S(0) = e −δt S(0)E∗ [e X (t) ]
I e δt = E∗ [e X (t) ] = M(1, t; h∗ ) = [M(1, 1; h∗ )]t ⇒ δ = log M(1, 1; h∗ )
To evaluate a European call option on the stock with strike K and
exercise date τ at time t = 0: V0 := E∗ [e −δt (S(t) − K )+ |F0 ]
K
I Define κ := log
ZS(0)
∞
−δt
I V0 = e S(0) e x f (x, τ ; h∗ )dx − e −δt K [1 − F (κ, τ ; h∗ )]
κ
where e x f (x, τ ; h∗ ) = e δt f (x, τ ; h∗ + 1)
I V0 = S(0)[1 − F (κ, τ, h∗ + 1)] − e −δt K [1 − F (κ, τ ; h∗ )]
{X (t)}: Wiener process with mean µ and variance σ 2 (per unit time)
I F (x, t) := P(X (t) ≤ x) = N(x; µt, σ 2 t)
1 2 2
I M(z, t) = e (µz+ 2 σ z )t
2 1 2 2
I M(z, t; h) = e ((µ+hσ )z+ 2 σ z )t
I F (x, t; h) = N(x; (µ + hσ 2 )t, σ 2 t)
Risk-neutral Esscher transform
δ = (µ + h ∗ σ 2 ) + σ 2 /2
µ∗ = µ + h∗ σ 2 = δ − σ 2 /2
V0Wie =
−κ + (δ + σ 2 /2)τ −κ + (δ − σ 2 /2)τ
−δτ
S(0)Φ √ −e KΦ √
σ τ σ τ
Define τx := inf n
Sn >x
Estimate the eventual ruin P(τx < ∞):
(For general setting, we assume {Xi }: i.i.d. with 0 < P(Xi > 0) < 1,
E[Xi ] < 0 and drop the special form Yi − pξi )
dP
p = EP [X ] = EQ X
dQ
" #
dP 2 dP 2
dP
VarQ X = EQ X − EQ X
dQ dQ dQ
dP
= EP X 2 − p2
dQ
dQ∗
∗ dP X
∃Q such that VarQ∗ X ∗
= 0 by taking =
dQ dP EP [X ]
h f (x) 2 i
h i
−µx+ 12 µ2
P2Q = EQ I(X < c) = E I(X < c)e
f˜(x)
1 2 1 2
≤ E[e −cµ+ 2 µ ] = e −cµ+ 2 µ
d 1 2
By taking log e −cµ+ 2 µ = 0, we have µ = c
dµ
for i=1:length(C)
%Crude Monte Carlo
A = randn(1,N);
CMC_sm = sum(A<C(i))/N;
CMC_se = std(A<C(i))/sqrt(N);
%Efficient I.S.
B=A+C;
EIS_sm=
sum((B<C(i)).*(exp(1).^(-C(i).*B+0.5.*C(i).^2)))/N
EIS_se=
(std((B<C(i)).*(exp(1).^(-C(i).*B+0.5.*C(i).^2))))/sqrt(N)
end
Z t
W
ft = Wt + φu du: Brownian motion under Q
0
dXs = (µ(Xs ) − σ(Xs )φs ) ds + σ(Xs )dW
fs
t,x
Then v (t, x) = EQ g (Xs , t ≤ s ≤ T )LT
Rt Rt
fu − 1
φ0u dW |φu |2 du
where LT = e 0 2 0
N
1 X
Importance sampling: IgN,φ (t, x) = g (X i,t,x )LiT
N
i=1