I have implemented the Richardson extrapolation of the Euler-Maruyama method to 4th order, to estimate the moments of SDE.
The Euler-Maruyama works, and I would expect the Richardson extrapolation to work too, because when I suppress the noise contribution it gives the correct solution in the resulting ordinary differential equations.
However, when I add the noise term, I don't get the moments (the variance, in particular) I would expect, as I do with the regular Euler method, so apparently I am doing something wrong.
This is my MATLAB code for the extrapolation:
function [t, y] = Richardson_weak_4th_order(a, b, t_interval, y0, h)
[t1, y1] = euler_maruyama(a, b, t_interval, y0, h);
[~, y2] = euler_maruyama(a, b, t_interval, y0, h/2);
[~, y3] = euler_maruyama(a, b, t_interval, y0, h/4);
[~, y4] = euler_maruyama(a, b, t_interval, y0, h/8);
% Extrapolation
y2 = y2(1:2:end,:);
y3 = y3(1:4:end,:);
y4 = y4(1:8:end,:);
t = t1;
y = 1/21*(64*y4 - 56*y3 + 14*y2 - y1);
For simplicity, I am testing with an Ornstein-Uhlenbeck process $$ \mathbb{d} X_t = (m - X_t)\mathbb{d}t + \sigma \mathbb{d}W_t $$ for which $\mathbb{E}(X) \simeq m$ and $\operatorname{Var}(X) \simeq \frac{\sigma^2}{2}$. The results are OK with the Euler method, but the variance is quite bigger with the extrapolation. What am I missing?
Edit: The problem is Richardson extrapolation was not implemented on the estimated moments (as it should), but to realizations of the process.