Forecasting function

forecasting—function to perform time series analysis and return the results to the user.