-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
Hi,
I am trying your software to do some stochastical simulations with the Fractional Brownian Motion implementation. And I see the following issues, or maybe I am wrong. But when I run a code with the following code:
function fOPU(t0, dt, tf,x_0, H; theta = 0.7, mu = 1.5, sigma = 0.06)
time = t0:dt:tf
fbm_o = FBM(time, H)
sample = rand(fbm_o, method=:fft)
steps = length(time)
v = zeros(steps,1)
v[1] = x_0
for i = 2:steps
v[i] = v[i-1] + theta * (mu - v[i-1]) * dt + sigma * (sample[i] - sample[i-1])
end
return v
end
function bmOUP(t0, dt, tf, x0; theta = 0.7, mu = 1.5, sigma = 0.06)
time = t0:dt:tf
steps = length(time)
v = zeros(steps, 1)
norm = Distributions.Normal(0,1)
sample = rand(norm, steps)
v[1] = x0
for i = 2:steps
v[i] = v[i-1]+theta*(mu - v[i-1]) * dt + sigma * sample[i] * sqrt(dt)
end
return v
endWhen the method in the fOPU function is :ftt the results are:

And when the method is :chol the results are:
As you can see in the :ftt method, the fSDE doesn't compares with the brownian motion equivalent even when the Hurst parameter is 0.5. So, this seems to be an issue in this case.
So, as I can see from this implementation, the :ftt shouldn't be suited for fSDE implementations?
Metadata
Metadata
Assignees
Labels
No labels
