■ There are the following methods for stochastic integration
Riemann sum formula) $ \sum_{j=0}^{N-1} h(t_j) (t_{j+1}-t_j) $
Ito integral. Stochastic process method extended by Kiyoshi Ito formula) $ \sum_{j=0}^{N-1}h(t_j) (W(t_{j+1})-W(t_j)) $. <=> $ \int_0^{T} h(t)dW(t) $.
Stratonovich integrals
formula)
When $ h (t) \ equiv W (t) $, Ito integral is
\begin{align*}
\sum_{j=0}^{N-1} W(t_j) (W(t_{j+1})-W(t_j)) \\
&=\sum_{j=0}^{N-1} ({W(t_{j+1})}^2 - {W(t_{j+1})}^2 + 2 W(t_j) W(t_{j+1}) - {W(t_j)}^2 - {W(t_j)}^2) \\
&= \frac{1}{2} \sum_{j=0}^{N-1} ({W(t_{j+1})}^2 - {W(t_j)}^2 - (W(t_{j+1}) - W(t_j))^2 )\\
&= \frac{1}{2} (W(T)^2 - W(0)^2) - \frac{1}{2} \sum_{j=0}^{N-1} (W(t_{j+1}) - W(t_j))^2
\end{align*}
$ \ sum_ {j = 0} ^ {N-1} (W (t_ {j + 1}) --W (t_j)) ^ 2 $ is equal to the variance of the Wiener Process and can be set to $ T
Let's calculate Ito integral.
N=10000;
M=1;
T = 1.0
dt = T / N;
t = np.arange(0.0,1.0, dt);
dW = np.sqrt(dt)*randn(N,M); # (N, M)queue
W = np.cumsum(dW,axis=0);
e = np.array([[0]])
W_=np.concatenate((e,W[:-1]), axis=0) #Put 0 in the initial value W(0)As.
ito = np.dot(W_.T,dW) # (10000, 1).T * (10000, 1) => (1, 1)
np.abs(ito - 0.5*(W[-1]**2 - T) )[0][0]
## output
## 0.00414652405737
Reference article
https://www.semanticscholar.org/paper/An-Algorithmic-Introduction-to-Numerical-Simulation-Higham/1c4126f96df7690dd40dab5f34ee4be5a5f95fbb
--Wikipedia "Kiyoshi Ito" https://ja.wikipedia.org/wiki/%E4%BC%8A%E8%97%A4%E6%B8%85
Recommended Posts