25.4 Concluding thoughts
If you start with a known differential equation and want to add stochasticity to a parameter, here is a process:
- Replace whatever parameter with a “parameter + Noise” term (i.e \(a \rightarrow a + \mbox{ Noise }\)).
- Collect terms multiplied by Noise - they will form the stochastic part of the differential equation.
- The deterministic part of the differential equation should be your original differential equation.
The most general form of the stochastic differential equation is: \(\displaystyle d\vec{y} = f(\vec{y},\vec{\alpha},t) \; dt + g(\vec{y},\vec{\alpha},t) \; dW(t)\), where \(\vec{y}\) is the vector of state variables you want to solve for, and \(\vec{\alpha}\) is your vector of parameters, and \(dW(t)\) is the stochastic noise from the random walk.
At a given initial condition, the Euler-Maruyama method applies locally linear approximations to forecast the solution forward \(\Delta t\) time units: \(\displaystyle \vec{y}_{n+1} = y_{n} + f(\vec{y}_{n},\vec{\alpha},t_{n}) \cdot \Delta t + g(\vec{y}_{n},\vec{\alpha},t_{n}) \cdot \sigma \cdot \mbox{rnorm(N)} \cdot \sqrt{\Delta t}\), where rnorm(N)
is \(N\) dimensional random variable from a normal distribution with mean 0.