Thank you for pointing this.
I am a bit confused since all the paths I get when simulating this process are positive:
For the comparison, using the jumpdiff library from python and simulating the same process, the paths look like this:
Is there any reason, why Julia’s path gives only positive value (some shifting etc.), or is there something else wrong?
I am using the following code for the Julia path:
using DifferentialEquations, Plots, JumpProcesses
timestep = Float64(0.05)
t = range(0, timestep, length=100)
function f(du, u, p, t)
du[1] = -u[1]
end
rate(u, p, t) = 1.0
function affect!(integrator)
integrator.u[1] += 1
nothing
end
The jump amplitude parameter in Python jumpdiff library is the standard deviation of a Gaussian distributed jump N(0,sigma^2) and as such can take both negative and positive values.
In the Julia code:
function affect!(integrator)
integrator.u[1] += 1
nothing
end
the jump is a +1 jump only (at a specified rate). To get the same as the Python effect use:
function affect!(integrator)
integrator.u[1] += randn()
nothing
end