# Milstein method in DifferentialEquations.jl or other

I am trying to use a Milstein method in DifferentialEquations.jl to solve a stochastic differential equation \mathrm{d}X(t)=f(X(t))\mathrm{d}t + g(X(t))\mathrm{d}W(t), where the Milstein method is defined by

X_{n+1}=X_n+f(X_n)\Delta t + g(X_n)\Delta W_n+\frac12g'(X_n)g(X_n)\left[\Delta W_n^2-\Delta t\right]

for a fixed time step \Delta t. Is this method implemented anywhere in DifferentialEquations.jl or elsewhere in Julia? I tried using RKMil() based on the list of available solvers in SDE Solvers · DifferentialEquations.jl, but it seems to only allow for adaptive time stepping.

All (Julia-based) methods can be made non-adaptive via adaptive=false.

https://diffeq.sciml.ai/stable/basics/common_solver_opts/#Basic-Stepsize-Control

2 Likes

Thank you @ChrisRackauckas - I missed that option, my mistake.

Is there an easy way to check the actual formula being used by the algorithms in your package? I’m new to SDEs so I’m having difficulties understanding which of the many Milstein methods match up with those in the question. Searching through the documentation for a citation, and in the source code itself for RKMil(), hasn’t revealed it for me. Apologies in advance if this is obvious.

?alg should always give the citation. ?RKMil reveals:

Kloeden, P.E., Platen, E., Numerical Solution of Stochastic Differential Equations.
Springer. Berlin Heidelberg (2011)
RKMil: Nonstiff Method
An explicit Runge-Kutta discretization of the strong order 1.0 Milstein method.
Defaults to solving the Ito problem, but RKMil(interpretation=:Stratonovich) makes it solve the Stratonovich problem.
Only handles scalar and diagonal noise.


Though I need to update that to be more precise. There’s a bit of influence from SDELab: A package for solving stochastic differential equations in MATLAB - ScienceDirect and with Levy areas from [2201.08424] An Analysis of Approximation Algorithms for Iterated Stochastic Integrals and a Julia and MATLAB Simulation Toolbox. Then the adaptivity is ADAPTIVE METHODS FOR STOCHASTIC DIFFERENTIAL EQUATIONS VIA NATURAL EMBEDDINGS AND REJECTION SAMPLING WITH MEMORY - PMC

1 Like

Not your mistake. I’m reworking the common kwarg docs to make them more visible.

1 Like