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→a+ 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: d→y=f(→y,→α,t)dt+g(→y,→α,t)dW(t), where →y is the vector of state variables you want to solve for, and →α 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 Δt time units: →yn+1=yn+f(→yn,→α,tn)⋅Δt+g(→yn,→α,tn)⋅σ⋅rnorm(N)⋅√Δt, where rnorm(N)
is N dimensional random variable from a normal distribution with mean 0.