Re: Runge Kunta on SDE




In article <30557026.1140143239812.JavaMail.jakarta@xxxxxxxxxxxxxxxxxxxxxx>,
David Langevin <langevin_david@xxxxxxxxxxx> writes:
Dear readers,

I want to apply the Runge Kunta fourth order scheme on the following SDE:

dX = aXdt + bXdW

where a,b are real, dW = sqrt(dt)N(0,1) is a wiener process.

When b=0 in my program all is fine, the solution is the same as in the deterministic case (Hopefully !), the problem I have is in the stochastic part, the scheme doesn't converge to the true solution:

X = X0exp(((a-b^2/2)t+bW)

where X0 is real.

Here is the small program that compute RK4:

function RungeKuntaApprox = RK4(N, M, X0, a, b, dt, dW)

L = (floor(1/dt)); % time step
RungeKuntaApprox = zeros(N*M,(floor(1/dt)));
Xtemp = X0;

for j = 1:L
W = sum(dW(:,1:j),2);
k1 = a*Xtemp*dt + b*Xtemp.*W;
k2 = a*(Xtemp + 0.5*k1)*dt + b*(Xtemp + 0.5*k1).*W;
k3 = a*(Xtemp + 0.5*k2)*dt + b*(Xtemp + 0.5*k2).*W;
k4 = a*(Xtemp + k3)*dt + b*(Xtemp + k3).*W;
Xtemp = Xtemp + 1/6*(k1 + 2*k2 + 2*k3 + k4);
RungeKuntaApprox(:,j) = Xtemp;
end

Thank's for your contribution !
DL

you caanot use standard integrators for SDE's. this is a much more intricate job.
look here:
Milstein G. N., Tretyakov M. V.
Stochastic Numerics for Mathematical Physics
Springer 2004, XX, 596 p. 48 illus., Geb. ISBN: 3-540-21110-1


Stochastic differential equations have many applications in the natural
sciences. Besides, the employment of probabilistic representations together
with the Monte Carlo technique allows us to reduce solution of multi-dimen-
sional problems for partial differential equations to integration of stocha-
stic equations. This approach leads to powerful computational mathematics that
is presented in the treatise. The authors propose many new special schemes,
some published here for the first time. In the second part of the book they
construct numerical methods for solving complicated problems for partial
differential equations occurring in practical applications, both linear and
nonlinear. All the methods are presented with proofs and hence founded on
rigorous reasoning, thus giving the book textbook potential. An overwhelming
majority of the methods are accompanied by the corresponding numerical
algorithms which are ready for implementation in practice. The book addresses
researchers and graduate students in numerical analysis, physics, chemistry,
and engineering as well as mathematical biology and financial mathematics.

more books:

Arnold, Ludwig: Stochastic Differential Equations (more about
martingales, stopping times etc.)
Gichman/Skohorod: Stochastic Differential Equations (more about
diffusion processes and transition probabilities)




and more:
The URL: http://www.taygeta.com/sdes.html

contains an introdutory tutorial, references
plus references and software for NUMERICAL
integration of SDEs as well.
Peter Kloedens homepage has codes in MAPLE

http://www.math.uni-frankfurt.de/~numerik/kloeden/maplesde

hth
peter
.