# Stochastic calculus
> Itô and Stratonovich_interpretations

- toc: true 
- badges: true
- comments: true
- categories: [jupyter]
- image: images/chart-preview.png


```javascript
%%javascript
MathJax.Hub.Config({
    TeX: { equationNumbers: { autoNumber: "AMS" } }
});

MathJax.Hub.Queue(
  ["resetEquationNumbers", MathJax.InputJax.TeX],
  ["PreProcess", MathJax.Hub],
  ["Reprocess", MathJax.Hub]
);
```

Consider a stochastic differential equation of the form

\begin{equation}
\dot{x} = A(x) + B(x) \,\Lambda \label{langevin}
\end{equation}

$\Lambda$ is a zero-mean, unit-variance Gaussian white noise such that whole drift of the system of the system is contained in $A(x)$. 

A naive integration of the equation gives

\begin{equation}
{x}(t) = x(0) + \int_{0}^t A(x) dt +  \int_{0}^t  B(x) \,\Lambda
\end{equation}

The last term is problematic: a continuous time white noise has infinite power in the Fourier space as it only its support in real space is a delta function. Thus, the point of integration makes difference in Riemannian sense.

Thus, we write, for a finite $dt$,

\begin{equation}
d{x} = A(x) dt + B(x) dW \label{langevinw}
\end{equation}

Here $dW$ is an increment of a Weiner process $W$ such that

\begin{equation}
 {P}(W(t)) = \frac{1}{\sqrt{2\pi t}}e^{-\frac{W(t)^2}{2t}}
\end{equation}

The Weiner process is the integral of the white noise, and thus, it is not differentiable. Doob's theorem implies that Brownian motion $B$ is the only such Gaussian process. Below we plot it:


```python
import numpy as np
import matplotlib.pyplot as plt

plt.plot(np.cumsum(1-2*np.random.random(4096)))
plt.plot(np.cumsum(1-2*np.random.random(4096)))
plt.plot(np.cumsum(1-2*np.random.random(4096)))
```

### Stochastic calculus

To emphasize the subtleties of the integral, we now consider

\begin{equation}
\int_0^t W dW = \lim_{n\rightarrow \infty}\sum_{1}^n W(t_i^*) [W(t_i)-W(t_{i-1})]
\end{equation}

We can choose $t_i^*=t_{i-1}+\alpha\,(t_i-t_{i-1})$. Now $<W(t)W(s)>=min(t,s)$.

Thus, 
$$
\lim_{n\rightarrow \infty}\sum_{1}^n W(t_i^*) [W(t_i)-W(t_{i-1})] = \alpha t
$$
we see that the result of the integration depends on the choice $\alpha$. We will now discuss two common choices.


#### Itô formulation
In this formulation, we set $\alpha=0$. Thus, we have

\begin{equation}
\int_0^t B dB = \lim_{n\rightarrow \infty}\sum_{1}^n B(t_{i-1}) [B(t_i)-B(t_{i-1})]
\end{equation}

By definition, the Brownian increment $B(t_i)-B(t_{i-1})$ is independent of B(t_i), and thus, the increments are uncorrelated.

Thus, we can rewrite it as

\begin{equation}
\int_0^t B dB = \lim_{n\rightarrow \infty}\sum_{1}^n \Bigg( -\frac12  [B(t_i)-B(t_{i-1})]^2 + \frac12  [B^2(t_i)-B(t_{i-1})^2] \Bigg)
\end{equation}


```python

```


```python

```

96b1f4105f4b7a5f2e1a50d63dc6f83e52bf0d74
ipynb
Jupyter Notebook
_notebooks/2020-08-05_Ito_Strato.ipynb
tubho/blog
15aa6122ea06e0f999f8716f6ed9b8fee0975c19
Apache-2.0
_notebooks/2020-08-05_Ito_Strato.ipynb
tubho/blog
15aa6122ea06e0f999f8716f6ed9b8fee0975c19
Apache-2.0
2021-03-30T12:32:00.000Z
2022-02-26T09:48:21.000Z
_notebooks/2020-08-05_Ito_Strato.ipynb
tubho/blog
15aa6122ea06e0f999f8716f6ed9b8fee0975c19
Apache-2.0
Qwen/Qwen-72B
1. YES
2. YES