Learning Theory and Algorithms for Forecasting Non-stationary Time Series