Closed vwiela closed 7 months ago
@frankschae this is the one I was mentioning. You said you had a source to double check the equations?
yeah I thought I'd seen it in one of the books of Simo Särkkä -- but it seems that it only contains the bridge for an OU process. I guess our implementation should actually do exp(beta*(i-1)*dt+delta*BB.u[i])
as well?
Yes I believe so.
I think transforming the Brownian Bridge might be the easiest. Just for your interest, one can also get an closed form for the expectation of the Geometric Brownian Bridge and it showed to coincide with the empirical mean of the transformed BB. I guess this is clear since the formulations are equivalent, so just as a side-remark.
Hey,
I wanted to simulate a geometric Brownian Motion of the form $$GBB(t)=\exp\left(\beta t+\delta B(t)\right),$$ where $B(t)$ is just some standard Brownian Motion. Or expressed as a SDE, I want to simulate the solution of $$dGBB(t)=\mu GBB(t)dt+\sigma GBB(t)dB(t)$$ with $\mu=\beta+\frac{\delta^2}{2}$ and $\sigma=\delta$. (The latter formulation as an SDE might be more consistent to the parameters in your implementation of a Geometric Brownian Motion.) However, I want to condition this on start and endpoint, so simulate a Geometric Brownian Bridge.
What I did at first was to simulate standard Brownian Bridges and apply the linear transform and exponential function to it, for example with the below code
This works nicely and the mean process looks as I would expect it, some kind of exponentially looking curve between beginning and endpoint.![Screenshot from 2024-01-16 15-56-19](https://github.com/SciML/DiffEqNoiseProcess.jl/assets/90847066/9cdec56d-33ba-4a87-a3bf-9338e52d44ba)
I then found that the
DiffEqNoiseProcess.jl
package also has a function for directly simulating Brownian Bridges. So I tried thisBut as you can see from the plot, the mean is now just a linear interpolation between start and endpoint. For me this is what I would expect from a normal Brownian bridge but not the Geometric. Moreover, I would expect the two simulation approaches to be equivalent, so the plots should be the same.
Either I am getting something conceptually wrong in the use of your functions (which can totally be the case), or the implementation of
GeometricBrownianBridge
does not work as it should.Would appreciate any help on this.
Thanks Vincent