I used the method below to solve SDEs during my PhD, but I cannot tell if there is an equivalent method in diffrax. I learned about SDEs in an oblique way during my studies, so I'm lacking some technical background to recognize whether this is already implemented.
The method is as follows. For simplicity, consider the scalar SDE:
$$
dy = a(t, y) dt + b(t, y) dW.
$$
Under some moderate smoothness conditions on the $y$-dependence of $b(t,y)$, this can be converted to a Stratonovitch SDE of the form:
$$
\dot{y} = \left[a(t,y) - \frac{1}{2} b(t, y) \frac{\partial b(t, y)}{\partial y} \right] + b(t, y) \frac{dW}{dt} = f\left(t, y, \frac{dW}{dt}\right)
$$
Let us treat $dW/dt$ as a constant function over the interval $dt$. We can then solve this equation using a standard RK4 method as follows:
$$
\begin{align}
&k_1 = f\left(t, y, \frac{dW}{dt}\right), \\
&k_2=f\left(t + \frac{dt}{2}, y + k_1 * \frac{dt}{2}, \frac{dW}{dt}\right), \\
&k_3=f\left(t + \frac{dt}{2}, y + k_2 * \frac{dt}{2}, \frac{dW}{dt}\right), \\
&k_3=f\left(t + dt, y + k_3 * dt, \frac{dW}{dt} \right),
\end{align}
$$
and then
$$
\begin{align}
&t' = t + dt, \\
&y' = y + \frac{1}{6} (k_1 + 2 k_2 + 2 k_3 + k_4).
\end{align}
$$
The only references I'm aware of for this method are from Wilkie and Debrabant. It is intended to produced a solution to order $dt^2$. In all cases that I used it for it gave the correct increment to order $dt^2$. I therefore found this to be really useful in practice.
So my questions are: is there an implementation of this kind of method in diffrax? And if not, is it something that would be advisable to implement in diffrax? And if not that, what would be the solver that behaves the closest to its intent?
I used the method below to solve SDEs during my PhD, but I cannot tell if there is an equivalent method in
diffrax. I learned about SDEs in an oblique way during my studies, so I'm lacking some technical background to recognize whether this is already implemented.The method is as follows. For simplicity, consider the scalar SDE:
Under some moderate smoothness conditions on the$y$ -dependence of $b(t,y)$ , this can be converted to a Stratonovitch SDE of the form:
Let us treat$dW/dt$ as a constant function over the interval $dt$ . We can then solve this equation using a standard RK4 method as follows:
and then
The only references I'm aware of for this method are from Wilkie and Debrabant. It is intended to produced a solution to order$dt^2$ . In all cases that I used it for it gave the correct increment to order $dt^2$ . I therefore found this to be really useful in practice.
So my questions are: is there an implementation of this kind of method in
diffrax? And if not, is it something that would be advisable to implement indiffrax? And if not that, what would be the solver that behaves the closest to its intent?