google-research / torchsde

Differentiable SDE solvers with GPU support and efficient sensitivity analysis.
Apache License 2.0
1.56k stars 195 forks source link

Question about the "increment of Brownian motion" #93

Closed abdulfatir closed 3 years ago

abdulfatir commented 3 years ago

Can someone explain what exactly does the parameter W (The increment of the Brownian motion over the interval [t0, t1]) in BrownianInterval mean mathematically?

Let's say that I have a Brownian motion with E[dB_t dB_t^T] = Qdt. Is the parameter W related to Q? If yes, how should I set the value of W given that I have Q?

patrick-kidger commented 3 years ago

The parameter W is equal to B_{t_1} - B_{t_0}. For example it can be set to zero, so that BrownianInterval samples from a Brownian bridge.

In particular that should mean that it is unrelated to your use case. I believe sampling uncorrelated Brownian motion (via BrownianInterval) and then multiplying by sqrt(Q) should give you the distribution you're after.

abdulfatir commented 3 years ago

Thanks a lot for the clarification, @patrick-kidger.

A small follow-up:

Setting the diffusion function (g) equal to cholesky(Q)/sqrt(Q) in the SDE should produce the same effect, right? Assume that my state_dim and brownian_dim are equal and the SDE that I am interested in looks something like this:

dy(t) = f(t, y(t)) dt + dW(t)  with       y(t0) = y0    and    E[dW(t)dW(t)^T] = Qdt
patrick-kidger commented 3 years ago

Yep, that sounds correct to me.

abdulfatir commented 3 years ago

Awesome, thanks! Closing this.