Non-Parametric Time Series (NPTS) Algorithm