-
Notifications
You must be signed in to change notification settings - Fork 57
/
Copy pathsde.html
327 lines (290 loc) · 9.58 KB
/
sde.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
<html>
<head>
<title>
SDE - Stochastic Differential Equations
</title>
</head>
<body bgcolor="#EEEEEE" link="#CC0000" alink="#FF3300" vlink="#000055">
<h1 align = "center">
SDE <br> Stochastic Differential Equations
</h1>
<hr>
<p>
<b>SDE</b>
is a MATLAB library which
illustrates the properties of stochastic differential equations and some
algorithms for handling them,
by Desmond Higham.
</p>
<p>
The original version of these routines is available at
<a href = "http://www.maths.strath.ac.uk/~aas96106/algfiles.html">
"http://www.maths.strath.ac.uk/~aas96106/algfiles.html".</a>
</p>
<h3 align = "center">
Languages:
</h3>
<p>
<b>SDE</b> is available in
<a href = "../../c_src/sde/sde.html">a C version</a> and
<a href = "../../cpp_src/sde/sde.html">a C++ version</a> and
<a href = "../../f77_src/sde/sde.html">a FORTRAN77 version</a> and
<a href = "../../f_src/sde/sde.html">a FORTRAN90 version</a> and
<a href = "../../m_src/sde/sde.html">a MATLAB version</a>.
</p>
<h3 align = "center">
Related Data and Programs:
</h3>
<p>
<a href = "../../m_src/black_scholes/black_scholes.html">
BLACK_SCHOLES</a>,
a MATLAB library which
implements some simple approaches to
the Black-Scholes option valuation theory,
by Desmond Higham.
</p>
<p>
<a href = "../../m_src/brownian_motion_simulation/brownian_motion_simulation.html">
BROWNIAN_MOTION_SIMULATION</a>,
a MATLAB program which
simulates Brownian motion in an M-dimensional region.
</p>
<p>
<a href = "../../m_src/cnoise/cnoise.html">
CNOISE</a>,
a MATLAB library which
generates samples of noise obeying a 1/f^alpha power law,
by Miroslav Stoyanov.
</p>
<p>
<a href = "../../m_src/colored_noise/colored_noise.html">
COLORED_NOISE</a>,
a MATLAB library which
generates samples of noise obeying a 1/f^alpha power law.
</p>
<p>
<a href = "../../m_src/correlation/correlation.html">
CORRELATION</a>,
a MATLAB library which
contains examples of statistical correlation functions.
</p>
<p>
<a href = "../../m_src/ornstein_uhlenbeck/ornstein_uhlenbeck.html">
ORNSTEIN_UHLENBECK</a>,
a MATLAB library which
approximates solutions of the Ornstein-Uhlenbeck
stochastic differential equation (SDE) using the Euler method and
the Euler-Maruyama method.
</p>
<p>
<a href = "../../m_src/pce_burgers/pce_burgers.html">
PCE_BURGERS</a>,
a MATLAB program which
defines and solves a version of the time-dependent viscous Burgers equation,
with uncertain viscosity, using a polynomial chaos expansion in terms
of Hermite polynomials,
by Gianluca Iaccarino.
</p>
<p>
<a href = "../../m_src/pce_legendre/pce_legendre.html">
PCE_LEGENDRE</a>,
a MATLAB program which
assembles the system matrix associated with a polynomal chaos expansion
of a 2D stochastic PDE, using Legendre polynomials;
</p>
<p>
<a href = "../../m_src/pce_ode_hermite/pce_ode_hermite.html">
PCE_ODE_HERMITE</a>,
a MATLAB program which
sets up a simple scalar ODE for exponential decay with an uncertain
decay rate, using a polynomial chaos expansion in terms of Hermite polynomials.
</p>
<p>
<a href = "../../m_src/pink_noise/pink_noise.html">
PINK_NOISE</a>,
a MATLAB library which
computes a "pink noise" signal obeying a 1/f power law.
</p>
<p>
<a href = "../../m_src/stochastic_diffusion/stochastic_diffusion.html">
STOCHASTIC_DIFFUSION</a>,
MATLAB functions which
implement several versions of a stochastic diffusivity coefficient.
</p>
<p>
<a href = "../../m_src/stochastic_gradient_nd_noise/stochastic_gradient_nd_noise.html">
STOCHASTIC_GRADIENT_ND_NOISE</a>,
a MATLAB program which
solves an optimization problem involving a functional over a system
with stochastic noise.
</p>
<p>
<a href = "../../m_src/stochastic_rk/stochastic_rk.html">
STOCHASTIC_RK</a>,
a MATLAB library which
applies a Runge Kutta (RK) scheme to a stochastic differential equation.
</p>
<h3 align = "center">
Author:
</h3>
<p>
Desmond Higham
</p>
<h3 align = "center">
Reference:
</h3>
<p>
<ol>
<li>
Desmond Higham,<br>
An Algorithmic Introduction to Numerical Simulation of
Stochastic Differential Equations,<br>
SIAM Review,<br>
Volume 43, Number 3, September 2001, pages 525-546.
</li>
</ol>
</p>
<h3 align = "center">
Source Code:
</h3>
<p>
<ul>
<li>
<a href = "bpath.m">bpath.m</a> computes one simulation
of discretized Brownian motion over the time interval [0,1]
using 500 time steps and a user specified random number seed.
</li>
<li>
<a href = "bpath_vectorized.m">bpath_vectorized.m</a>, a second version of BPATH
using faster, vectorized commands.
</li>
<li>
<a href = "bpath_average.m">bpath_average.m</a>,
displays the average of 1000 Brownian paths.
</li>
<li>
<a href = "chain.m">chain.m</a> tests the stochastic Chain Rule.
</li>
<li>
<a href = "em.m">em.m</a>,
applies the Euler-Maruyama method to integrate a linear SDE.
</li>
<li>
<a href = "emstrong.m">emstrong.m</a>
tests the strong convergence of the Euler-Maruyama method.
</li>
<li>
<a href = "emweak.m">emweak.m</a>
tests the weak convergence of the Euler-Maruyama method.
</li>
<li>
<a href = "milstrong.m">milstrong.m</a>
tests the strong convergence of the Milstein method.
</li>
<li>
<a href = "stab_asymptotic.m">stab_asymptotic.m</a> examines the
asymptotic stability of the Euler-Maruyama method applied
to a stochastic differential equation.
</li>
<li>
<a href = "stab_meansquare.m">stab_meansquare.m</a> examines the mean-square
stability of the Euler-Maruyama method applied
to a stochastic differential equation.
</li>
<li>
<a href = "stochastic_integral_ito.m">stochastic_integral_ito.m</a>,
approximates the stochastic integral W(t) dW using the Ito integral.
</li>
<li>
<a href = "stochastic_integral_strat.m">stochastic_integral_strat.m</a>,
approximates the stochastic integral W(t) dW using the Stratonovich integral.
</li>
<li>
<a href = "timestamp.m">timestamp.m</a>,
prints the YMDHMS date as a timestamp.
</li>
</ul>
</p>
<h3 align = "center">
Examples and Tests:
</h3>
<p>
<ul>
<li>
<a href = "sde_test.m">sde_test.m</a>,
calls all the tests.
</li>
<li>
<a href = "sde_test_output.txt">sde_test_output.txt</a>,
the output file.
</li>
<li>
<a href = "stochastic_integral_ito_test.m">stochastic_integral_ito_test.m</a>,
tests stochastic_integral_ito.
</li>
<li>
<a href = "stochastic_integral_strat_test.m">stochastic_integral_strat_test.m</a>,
tests stochastic_integral_strat.
</li>
</ul>
</p>
<p>
A number of graphics images are created by the example programs:
<ul>
<li>
<a href = "bpath.png">bpath.png</a>,
an image of the computed path for BPATH.
</li>
<li>
<a href = "bpath_vectorized.png">bpath_vectorized.png</a>,
an image of the computed path for BPATH_VECTORIZED.
</li>
<li>
<a href = "bpath_average.png">bpath_average.png</a>,
an image of the averaged paths for BPATH_AVERAGE.
</li>
<li>
<a href = "chain.png">chain.png</a>,
an image comparing solutions done with and without the chain rule.
</li>
<li>
<a href = "em.png">em.png</a>,
an image of a true solution versus the Euler-Maruyama estimate.
</li>
<li>
<a href = "emstrong.png">emstrong.png</a>,
an image of the strong convergence of the Euler-Maruyama error with stepsize.
</li>
<li>
<a href = "emweak0.png">emweak0.png</a>,
an image of the weak convergence of the standard Euler-Maruyama method.
</li>
<li>
<a href = "emweak1.png">emweak1.png</a>,
an image of the weak convergence of the weak Euler-Maruyama method.
</li>
<li>
<a href = "milstrong.png">milstrong.png</a>,
an image of the strong convergence of the Milstein method.
</li>
<li>
<a href = "stab_asymptotic.png">stab_asymptotic.png</a>,
an image of an asymptotic stability check.
</li>
<li>
<a href = "stab_meansquare.png">stab_meansquare.png</a>,
an image of a meansquare stability check.
</li>
</ul>
</p>
<p>
You can go up one level to <a href = "../m_src.html">
the MATLAB source codes</a>.
</p>
<hr>
<i>
Last revised on 18 September 2012.
</i>
<!-- John Burkardt -->
</body>
</html>