Module Diffusion¶
Introduction¶
The functions in this module operate on three conceptual different objects, (although they are currently just represented as vectors and arrays.)
Stochastic processes, denoted x, y, w are arrays of values which
are sampled at distance dt, ds, where dt, ds are either scalar or
Vectors length(dt)=size(W)[end].
Stochastic differentials are denoted dx, dw etc., and are first differences of
stochastic processes. Finally, t can denote the total time or correspond to a vector of
size(W)[end] sampling time poins.
Note the following convention: In analogy with the definition of the Ito integral,
intxdw[i] = x[i]](w[i+1]-w[i]) (== x[i]dw[i])
and
length(w) = length(dw) + 1
Reference¶
-
Diffusion.brown1(u, t, n::Integer)¶ Compute
nequally spaced samples of 1d Brownian motion in the interval[0,t], starting from pointu
-
Diffusion.brown(u, t, d::Integer, n::Integer)¶ Simulate
nequally spaced samples ofd-dimensional Brownian motion in the interval[0,t], starting from pointu
-
Diffusion.dW1(t, n::Integer)¶ -
Diffusion.dW(t, d::Integer, n::Integer)¶ Simulate a
1-dimensional (d-dimensional) Wiener differential withnvalues in the the interval[0,t], starting from pointu
-
Diffusion.dW(dt::Vector, d::Integer) Simulate a
d-dimensional Wiener differential sampled at time points with distances given by the vectordt
-
Diffusion.ito(y, dx)¶ -
Diffusion.ito(dx) -
Diffusion.cumsum0(dx)¶ Integrate a valued stochastic process with respect to a stochastic differential. R, R^2 (d rows, n columns), R^3.
ito(dx)is a shortcut forito(ones(size(dx)[end], dx). Soito(dx)is just acumsum0function which is a inverse todx = diff([0, x1, x2, x3,...]).
-
..(y, dx)¶ -
Diffusion.ydx(y, dx)¶ y .. dxreturns the stochastic differentialydxdefined by the propertyito(ydx) == ito(y, dx)
-
Diffusion.bb(u, v, t, n)¶ Simulates
nequidistant samples of a Brownian bridge from pointutovin timet
-
Diffusion.dWcond1(v, t, n)¶ Simulates
nequidistant samples of a “bridge noise”: that is a Wiener differentialdWconditioned onW(t) = v
-
Diffusion.aug(dw, dt, n)¶ -
Diffusion.aug(dt, n) Take Wiener differential sampled at
dtand return Wiener differential subsampledntimes between each observation with new lengthlength(dw)*n.aug(dt,n)computes the corresponding subsample of times.
-
Diffusion.quvar(x)¶ Computes quadratic variation of
x.
-
Diffusion.bracket(x)¶ -
Diffusion.bracket(x, y) Computes quadratic variation process of
x(ofxandy).
-
Diffusion.euler(t0, u, b, sigma, dt, dw)¶ -
Diffusion.euler(t0, u, b, sigma, dt) Simulates a 1-dimensional diffusion process using the Euler-Maruyama approximation with drift
b(t,x)and diffusion coefficientsigma(t,x)starting in(t0, u)usingdtand given Wiener differentialdw.