MonteCarloProblem Error

Hello,
I am following the instructions from the DifferentialEquations.jl package (http://docs.juliadiffeq.org/latest/features/noise_process.html#Direct-Simulation-of-the-Noise-Process-1) to Monte Carlo simulate paths of a Geometric Brownian Motion.
Here is the code

using Plots, DiffEqBase, DiffEqNoiseProcess, Compat

μ = 0.0
σ = 0.3
W0 = 1.0
t0 = 0.0
tEnd = 10000.0
dt = 0.001
W = GeometricBrownianMotionProcess(μ,σ,t0,W0)
prob = NoiseProblem(W,(t0,tEnd))
sol = solve(prob;dt=dt)

monte_prob = MonteCarloProblem(prob)
monte_sol = solve(monte_prob;dt=dt,num_monte=100)

Everything works fine but the very last command yields the following error:

ERROR: LoadError: type MonteCarloProblem has no field tspan

I must be missing something basic.

I am running Julia v"1.1.1".

Thanks in advance for any help.

This happens to be an error which I just fixed on master.

using Plots, DiffEqBase, DiffEqNoiseProcess, Compat, DiffEqMonteCarlo

μ = 0.0
σ = 0.3
W0 = 1.0
t0 = 0.0
tEnd = 10000.0
dt = 0.001
W = GeometricBrownianMotionProcess(μ,σ,t0,W0)
prob = NoiseProblem(W,(t0,tEnd))
sol = solve(prob;dt=dt)

monte_prob = MonteCarloProblem(prob)
monte_sol = solve(monte_prob;dt=dt,num_monte=100)

now works. Thanks for the report!

2 Likes

Excellent! Thank you very much.

No problem. I’ll release it by Monday.

2 Likes