Skip to main content
2 of 3
added sample SDE
Radost
  • 221
  • 1
  • 4

WhenEvent in Stochastic Differential Equation

Is there a way to add events with WhenEvent or similar when using ItoProcess?

Minimal example of my problem would be to change sign when diffusion hits a wall. (Post processing is no good - I need to change several things in the actual problem)

As per edit request a sample SDE:

$$ d x = \frac{\sin x}{1 - \cos x} dt + dW $$

with looping boundary. That is, with $x = \pi + \epsilon$ changing to $x = -\pi + \epsilon$ whenever $x > \pi$ and analog for $x < -\pi$

(Equation is well behaved within $(-\pi,\pi)$ domain)

Radost
  • 221
  • 1
  • 4