Two Effective Algorithms for Time Series Forecasting