Is there a way to add events with WhenEvent
or similar when using ItoProcesesItoProcess
?
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)