Univariate Timeseries Prediction Algorithm