-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
In order to work with e.g. the Merton model, some way of dealing with jump processes is necessary; is it possible to add e.g. JumpProcesses.jl to the dependencies? I think something like the following (untested) could then be used to specify the dynamics under the Merton model:
function LogGBMJProblem(μ, σ, λ, μⱼ, σⱼ, u0, tspan; seed = UInt64(0), kwargs...)
f = function (u, p, t)
return @. μ - 0.5 * σ^2 # Drift of log(S_t)
end
g = function (u, p, t)
return @. σ # Constant diffusion for log(S_t)
end
J = LogNormal(μⱼ, σⱼ)
affect! = function (integrator)
@. integrator.u[1] *= Distributions.rand(J)
nothing
end
const_jump = ConstantRateJump(λ, affect!)
noise = WienerProcess(tspan[1], 0.0)
sde_f = SDEFunction(f, g)
sde_prob = SDEProblem{false}(
sde_f,
u0,
(tspan[1], tspan[2]),
noise = noise,
seed = seed,
kwargs...,
)
return JumpProblem(sde_prob, Direct(), const_jump)
end
Metadata
Metadata
Assignees
Labels
No labels