Euler-Approximation

Transcription

Euler-Approximation
Euler-Approximation
Leonie van de Sandt
TU Dortmund
Prof. Dr. Christine Müller
5. Juni 2012
Leonie van de Sandt (TU Dortmund)
Euler-Approximation
5. Juni 2012
1 / 26
Inhaltsverzeichnis
1
Einleitung
Leonie van de Sandt (TU Dortmund)
Euler-Approximation
5. Juni 2012
2 / 26
Inhaltsverzeichnis
1
Einleitung
2
Definition der Euler-Approximation
Leonie van de Sandt (TU Dortmund)
Euler-Approximation
5. Juni 2012
2 / 26
Inhaltsverzeichnis
1
Einleitung
2
Definition der Euler-Approximation
3
Simulation der Euler-Approximation
Leonie van de Sandt (TU Dortmund)
Euler-Approximation
5. Juni 2012
2 / 26
Inhaltsverzeichnis
1
Einleitung
2
Definition der Euler-Approximation
3
Simulation der Euler-Approximation
4
Vorstellung des Milstein-Schemas
Leonie van de Sandt (TU Dortmund)
Euler-Approximation
5. Juni 2012
2 / 26
Inhaltsverzeichnis
1
Einleitung
2
Definition der Euler-Approximation
3
Simulation der Euler-Approximation
4
Vorstellung des Milstein-Schemas
5
Zusammenfassung
Leonie van de Sandt (TU Dortmund)
Euler-Approximation
5. Juni 2012
2 / 26
Inhaltsverzeichnis
1
Einleitung
2
Definition der Euler-Approximation
3
Simulation der Euler-Approximation
4
Vorstellung des Milstein-Schemas
5
Zusammenfassung
6
Literatur
Leonie van de Sandt (TU Dortmund)
Euler-Approximation
5. Juni 2012
2 / 26
Einleitung
Einleitung
Gegeben: stochastische Differentialgleichung
dXt = b(t, Xt )dt + σ(t, Xt )dWt
Gesucht ist stetige Lösung Xt , 0 ≤ t ≤ T
Es kann eine diskrete Approximation für Lösung gefunden werden
Euler-Approximation bietet häufig verwendetes numerisches
Simulationsverfahren
Leonie van de Sandt (TU Dortmund)
Euler-Approximation
5. Juni 2012
3 / 26
Einleitung
Zunächst formale Definition der Euler-Approximation
Anschließend Simulationen anhand von zwei Beispielen:
Ornstein-Uhlenbeck-Prozess
Cox-Ingersoll-Ross-Prozess
Vorstellung des Milstein-Schemas als Alternative zur
Euler-Approximation mit Simulation
Leonie van de Sandt (TU Dortmund)
Euler-Approximation
5. Juni 2012
4 / 26
Definition der Euler-Approximation
Definition der Euler-Approximation
Gegeben sei stochastische Differentialgleichung
dXt = b(t, Xt )dt + σ(t, Xt )dWt
mit determinischtem Anfangswert Xt0 = X0 und Diskretisierung
ΠN ([0, T ])
Die Lösung dieser Gleichung sei der Prozess Xt , 0 ≤ t ≤ T
mit T > 0
Euler-Approximation von X ist stetiger stochastischer Prozess Y
genügt iterativem Schema
Yi+1 = Yi + b(ti , Yi )(ti+1 − ti ) + σ(ti , Yi )(Wi+1 − Wi )
i = 0, 1, ..., N − 1 und Y0 = X0
Leonie van de Sandt (TU Dortmund)
Euler-Approximation
5. Juni 2012
5 / 26
Definition der Euler-Approximation
konstante Schrittweite ∆t = ti+1 − ti =
1
N
zwischen den Zeitpunkten ti und ti+1 kann man
linear interpolieren:
Y (t) = Yi +
t − ti
Yi+1 − Yi für t ∈ [ti , ti+1 )
ti+1 − ti
Euler-Approximation konvergiert gegen die Lösung der
stochastischen Differentialgleichung
schwach mit Ordnung β = 1
stark mit Ordnung γ = 12
Leonie van de Sandt (TU Dortmund)
Euler-Approximation
5. Juni 2012
6 / 26
Simulation der Euler-Approximation
Simulation der Euler-Approximation
Zur Simulation nur der Wiener Prozess zu simulieren:
Yi+1 = Yi + b(ti , Yi )(ti+1 − ti ) + σ(ti , Yi )(Wi+1 − Wi )
Als Lösung der stochastischen Differentialgleichung zwei Beispiele,
welche zu simulieren sind:
Ornstein-Uhlenbeck-Prozess
Cox-Ingersoll-Ross-Prozess
Leonie van de Sandt (TU Dortmund)
Euler-Approximation
5. Juni 2012
7 / 26
Simulation der Euler-Approximation
Der Ornstein-Uhlenbeck-Prozess
Eindeutige Lösung der stochastischen Differentialgleichung
dXt = (θ1 − θ2 Xt )dt + θ3 dWt
Explizite Lösung ist dann gegeben durch:
θ1
θ1 −θ2 t
Xt =
+ x0 −
e
+ θ3 e −θ2 t
θ2
θ2
Z t
e −θ2 (u) dWu
0
hier: b(t, x ) = (θ1 − θ2 x ) und σ(t, x ) = θ3
Leonie van de Sandt (TU Dortmund)
Euler-Approximation
5. Juni 2012
8 / 26
Simulation der Euler-Approximation
Simulation des OU-Prozesses mit Euler
>set.seed(123)
>T <- 1
>x <- 10
>theta <- c(0, 5, 3.5)
>Z <- BM(x=x,T=T,N=100)
>N <- 100
>Dt <- T/N
>t <- seq(0,T,by=Dt)
>Y <- numeric(N+1)
>Y[1] <- x
>for(i in 1:N){
+ Y[i+1] <- Y[i] + (theta[1] - theta[2]*Y[i])*Dt +
+
theta[3]*(Z[i+1]-Z[i])}
>Y <- ts(Y,start=0, deltat=T/N)
>plot(Y)
Leonie van de Sandt (TU Dortmund)
Euler-Approximation
5. Juni 2012
9 / 26
10
Simulation der Euler-Approximation
0
2
4
Y
6
8
N=10
N=100
N=1000
0.0
0.2
0.4
0.6
0.8
1.0
Time
Abbildung: Simulation des Ornstein-Uhlenbeck-Prozesses mithilfe der
Euler-Approximation
Leonie van de Sandt (TU Dortmund)
Euler-Approximation
5. Juni 2012
10 / 26
Simulation der Euler-Approximation
Ornstein-Uhlenbeck-Prozess auch mit der Integraldarstellung zu
simulieren:
θ1 −θ2 t
θ1
+ x0 −
e
+ θ3 e −θ2 t
θ2
θ2
Xt =
Z t
e −θ2 (u) dWu
0
Zur Veranschaulichung der Approximationsgüte der
Euler-Approximation werden beide Simulationen mit verschiedenen
Schrittweiten in je einer Grafik dargestellt
Leonie van de Sandt (TU Dortmund)
Euler-Approximation
5. Juni 2012
11 / 26
Simulation der Euler-Approximation
Simulation des OU-Prozesses via Integral
>T <- 1
>x <- 10
>theta <- c(0, 5, 3.5)
>N <- 100
>Dt <- T/N
>t <- seq(0,T,by=Dt)
>itosumOU.N <- 0
>XOU.N <- rep(x,N+1)
>for(i in 1:N){
+ itosumOU.N<-itosumOU.N+exp(theta[2]*t[i])*(Z[i+1]-Z[i])
+ XOU.N[i+1]<-theta[1]/theta[2]+(x-theta[1]/theta[2])*
+ exp(-theta[2]*t1[i])+theta[3]*exp(-theta[2]*t[i])*
+ itosumOU.N}
>XOU.N <- ts(XOU.N,start=0, deltat=Dt)
Leonie van de Sandt (TU Dortmund)
Euler-Approximation
5. Juni 2012
12 / 26
Simulation der Euler-Approximation
−2
0
2
4
Y
6
8
10
Euler−Approximation
via Integral
0.0
0.2
0.4
0.6
0.8
1.0
Time
Abbildung: Simulation des Ornstein-Uhlenbeck-Prozesses mit
Euler-Approximation und via Integral mit 10 Schritten
Leonie van de Sandt (TU Dortmund)
Euler-Approximation
5. Juni 2012
13 / 26
10
Simulation der Euler-Approximation
0
2
4
Y
6
8
Euler−Approximation
via Integral
0.0
0.2
0.4
0.6
0.8
1.0
Time
Abbildung: Simulation des Ornstein-Uhlenbeck-Prozesses mit
Euler-Approximation und via Integral mit 100 Schritten
Leonie van de Sandt (TU Dortmund)
Euler-Approximation
5. Juni 2012
14 / 26
10
Simulation der Euler-Approximation
0
2
4
Y
6
8
Euler−Approximation
via Integral
0.0
0.2
0.4
0.6
0.8
1.0
Time
Abbildung: Simulation des Ornstein-Uhlenbeck-Prozesses mit
Euler-Approximation und via Integral mit 1000 Schritten
Leonie van de Sandt (TU Dortmund)
Euler-Approximation
5. Juni 2012
15 / 26
Simulation der Euler-Approximation
Der Cox-Ingersoll-Ross-Prozess
Lösung der stochastischen Differentialgleichung
p
dXt = (θ1 − θ2 Xt )dt + θ3 Xt dWt
Explizite Lösung ist dann gegeben durch:
Z t
θ1
θ1 −θ2 t
Xt =
+ x0 −
e
+ θ3 e −θ2 t
θ2
θ2
√
hier: b(t, x ) = (θ1 − θ2 x ) und σ(t, x ) = θ3 x
Leonie van de Sandt (TU Dortmund)
Euler-Approximation
e θ2 u Xu dWu
p
0
5. Juni 2012
16 / 26
Simulation der Euler-Approximation
Simulation des CIR-Prozesses mit Euler
>T <- 10
>x <- 10
>theta <- c(1, 1, 1)
>Z <- BM(x=x,T=T,N=100)
>N <- 100
>Dt <- T/N
>Y <- numeric(N1+1)
>Y[1] <- x
>for(i in 1:N){
+ Y[i+1] <- Y1[i] + (theta[1] - theta[2]*Y[i])*Dt +
+
theta[3]*sqrt(Y[i])*(Z[i+1]-Z[i])}
>Y <- ts(Y,start=0, deltat=T/N)
>plot(Y)
Leonie van de Sandt (TU Dortmund)
Euler-Approximation
5. Juni 2012
17 / 26
10
Simulation der Euler-Approximation
0
2
4
Y
6
8
N=50
N=100
N=1000
0
2
4
6
8
10
Time
Abbildung: Simulation des Cox-Ingersoll-Ross-Prozesses mithilfe der
Euler-Approximation
Leonie van de Sandt (TU Dortmund)
Euler-Approximation
5. Juni 2012
18 / 26
Simulation der Euler-Approximation
0
2
4
Y
6
8
10
Euler−Approximation
via Integral
0
2
4
6
8
10
Time
Abbildung: Simulation des Cox-Ingersoll-Ross-Prozesses mit Euler-Approximation
und via Integral mit 50 Schritten
Leonie van de Sandt (TU Dortmund)
Euler-Approximation
5. Juni 2012
19 / 26
10
Simulation der Euler-Approximation
0
2
4
Y
6
8
Euler−Approximation
via Integral
0
2
4
6
8
10
Time
Abbildung: Simulation des Cox-Ingersoll-Ross-Prozesses mit Euler-Approximation
und via Integral mit 100 Schritten
Leonie van de Sandt (TU Dortmund)
Euler-Approximation
5. Juni 2012
20 / 26
10
Simulation der Euler-Approximation
0
2
4
Y
6
8
Euler−Approximation
via Integral
0
2
4
6
8
10
Time
Abbildung: Simulation des Cox-Ingersoll-Ross-Prozesses mit Euler-Approximation
und via Integral mit 1000 Schritten
Leonie van de Sandt (TU Dortmund)
Euler-Approximation
5. Juni 2012
21 / 26
Vorstellung des Milstein-Schemas
Vorstellung des Milstein-Schemas
Das Milstein-Schema ist ebenfalls eine Methode, um Lösungen
stochastischer Differentialgleichungen zu approximieren
Definition des Milstein-Schemas:
Yi+1 = Yi + b(ti , Yi )∆t + σ(ti , Yi )(Wi+1 − Wi ) +
1
2
2 σ(ti , Yi )σx (ti , Yi ){(Wi+1 − Wi ) − ∆t}
Es wird Gebrauch vom Itô-Lemma gemacht, wodurch der Term
σx (ti , Yi ) als Ableitung nach x von σ(ti , Yi ) hinzukommt
Für den Ornstein-Uhlenbeck-Prozess mit b(t, x ) = θ1 − θ2 x und
σ(t, x ) = θ3 stimmen Euler-Approximation und Milstein-Schema
überein
Als Beispiel zum Vergleich der beiden Approximations-Schemen kann
man den Cox-Ingersoll-Ross-Prozess verwenden
Hierbei ist dann σx =
Leonie van de Sandt (TU Dortmund)
√1
x
für θ3 = 2
Euler-Approximation
5. Juni 2012
22 / 26
Vorstellung des Milstein-Schemas
R Code für die Simulation des CIR-Prozesses mit dem Milstein-Schema
>N <- 100
>x <- 10
>T <- 10
>Dt <- T/N
>theta <- c(1, 1, 1)
>X <- numeric(N+1)
>X[1] <- x
>for(i in 1:N){
+ X[i+1] <- X[i] + (theta[1] - theta[2]*X[i])*Dt +
+ theta[3]*sqrt(X[i])*
+ (Z[i+1]-Z[i])+(1/2)*theta[3]*
+ sqrt(X[i])*(1/sqrt(X[i]))*((Z[i+1]-Z[i])^2-Dt)}
>X <- ts(X,start=0, deltat=T/N)
Leonie van de Sandt (TU Dortmund)
Euler-Approximation
5. Juni 2012
23 / 26
Vorstellung des Milstein-Schemas
3
1
2
X1
4
5
Euler
Milstein
Integral
0
2
4
6
8
10
Time
Abbildung: Simulation des Cox-Ingersoll-Ross-Prozesses mit Euler-Approximation,
Milstein-Schema und via Integral mit 100 Schritten
Leonie van de Sandt (TU Dortmund)
Euler-Approximation
5. Juni 2012
24 / 26
Zusammenfassung
Zusammenfassung
Euler-Approximation häufig verwendetes numerisches Verfahren zur
Simulation von Lösungen stochastischer Differentialgleichungen
Iteratives Schema, welches Wiener Prozess beinhaltet
Zu simulieren ist der Wiener Prozess
Je kleiner die Schrittweite gewählt wird, desto besser die
Approximation
Milstein-Schema ebenfalls gut für Approximation und Simulation,
enthält weiteren Term σx (t, x )
Leonie van de Sandt (TU Dortmund)
Euler-Approximation
5. Juni 2012
25 / 26
Literatur
Literatur
Iacus, S. M. (2008): Simulation and Inference for Stochastic
Differential Equations: With R Examples. 1. Auflage. New York:
Springer.
Iacus, S. M. (2009): sde: Simulation and Inference for Stochastic
Differential Equations.R package version 2.0.10. url:
http://CRAN.R-project.org/package=sde.
R Development Core Team (2011):R 2.13.1: A Language and
Environment for Statistical Computing.ISBN 3-900051-07-0. R
Foundation for Statistical Computing. Vienna, Austria. url:
http://www.R-project.org/.
Leonie van de Sandt (TU Dortmund)
Euler-Approximation
5. Juni 2012
26 / 26

Documents pareils