Optimal stopping time from the compensator (source code)

= Optimal stopping time from the compensator

The first time the Snell-envelope compensator is about to become positive is an optimal stopping time; before it the martingale part equals both value and reward at stopping.