Numerical Scheme for the Optimal Stopping Problem for Pairs Trading [PDF] [Github]