Plot time series data and forecast WTI for the next period ✓ Solved
1. Plot time series data.
2. Generate linear trend model and forecast WTI for the next period.
3. Generate linear trend with seasonality model and forecast WTI for the next period.
4. Comment on the quality of these models and calculate MAD.
5. Show the linear trend and trend with seasonality model equations.
6. Generate Moving Averages of 2, 3, 5, and 10 weeks and forecast WTI for the next period.
7. Calculate the MAD for each Moving Average model and comment on which is the best model among these.
8. Generate Exponential Smoothing models with alpha of 0.2, 0.4, 0.6 and 0.8. Forecast WTI for the next period.
9. Calculate the MAD for each Exponential Smoothing model and comment on which is the best model among these.
10. Plot the Moving Average models with the actual WTI on one chart AND on a separate chart plot the Exponential Smoothing models with actual WTI.
EXTRA CREDIT: Compare the forecasts from all the models (Linear trend, trend with seasonality, moving average, and exponential smoothing) generated using the MAD. Determine which model Juan should present to his boss.
Paper For Above Instructions
The purpose of this report is to analyze the Cushing, OK WTI Spot Prices through various forecasting models. Predicting oil prices is essential in making informed economic decisions, as they influence various sectors across the globe. In this analysis, we will explore time series data, generate models, and evaluate their performance based on Mean Absolute Deviation (MAD) metrics.
Time Series Data Plotting
To start the forecasting process, time series data for the WTI Spot Prices will be plotted. This can be accomplished using software such as Excel or Python libraries (like Matplotlib). The data reveals trends, seasonal patterns, and irregular fluctuations over time. Visual representation serves as a foundation for selecting appropriate forecasting models, and initial observations can help in forming hypotheses regarding price movements.
Linear Trend Model
The linear trend model can be created by applying a linear regression analysis to the time series data. The goal is to express the price as a linear function of time. This model assumes that prices change at a constant rate over time. The formula for linear regression can be represented as:
Y = a + bX
where Y is the dependent variable (WTI Spot Price), X is the independent variable (time), 'a' is the intercept, and 'b' is the slope of the regression line. After constructing this model, we can forecast the WTI Spot Price for the next period by substituting the value of time into the regression equation.
Seasonal Trend Model
Incorporating seasonality involves identifying repeating patterns in the data. This is done through seasonal decomposition of time series data, which allows for additional parameters in the model. The seasonal trend model can be represented with the formula:
Y_t = (a + bX) + S_t
where S_t represents the seasonal component. The forecast can be generated similarly by utilizing the established equation and adding the seasonal components.
Model Evaluation: MAD Calculation
To evaluate the quality of our models, we will calculate the Mean Absolute Deviation (MAD).
MAD = (1/n) * ∑ | Actual - Forecast |
This metric measures the average magnitude of errors between predicted and actual prices. By analyzing MAD for both models, we can understand which model more accurately represents the WTI Spot Price dynamics.
Moving Averages Models
Moving Average models smooth out fluctuations in data and can help identify trends. We will generate moving averages for periods of 2, 3, 5, and 10 weeks using the following formulas:
MA_n = (Y_1 + Y_2 + ... + Y_n) / n
After calculating each moving average, forecasts can be derived for the next period, and their MAD will be computed to compare performance.
Exponential Smoothing Models
Exponential smoothing models, which give more weight to recent observations, can be established using the alpha parameter ranges of 0.2, 0.4, 0.6, and 0.8. The basic formula for exponential smoothing is:
S_t = αY_t + (1 - α)S_(t-1)
This method will yield smoother forecasts, with alpha values controlling the degree of weighting. Each model's performance will also be evaluated through MAD calculation.
Graphical Representation
To visualize the results of our analyses, we will prepare charts that include actual WTI prices against both Moving Average and Exponential Smoothing forecasts. This allows for a quick visual assessment of the effectiveness of each forecasting approach.
Comparison of Forecasting Models
Finally, the forecasts produced from all applied models (Linear trend, Seasonality, Moving Average, and Exponential Smoothing) will be compared based on MAD. The model demonstrating the lowest MAD will be recommended for presentation to Juan’s boss. This will ensure the forecast chosen is the one that reflects the most realistic future prices.
Conclusion
Forecasting the WTI Spot Price involves understanding both statistical methods and the dynamics of the oil market. By leveraging multiple forecasting models and evaluating their predictions through MAD metrics, it is possible to derive a more accurate estimate of future prices. This structured approach supports not just Juan's ambitions but also serves as an effective decision-making strategy in a volatile market.
References
- Hyndman, R. J., & Athanasopoulos, G. (2018). Forecasting: principles and practice. OTexts.
- Makridakis, S., Spiliotis, E., & Assimakopoulos, V. (2018). M4 Competition: Results, conclusions and way forward. International Journal of Forecasting.
- Box, G. E. P., & Jenkins, G. M. (1976). Time Series Analysis: Forecasting and Control. Holden-Day.
- Chatfield, C. (2000). The Analysis of Time Series: An Introduction with R. CRC Press.
- Kwok, Y. L., & Hu, T. (2018). Predicting oil prices using regression and machine learning models. Journal of Economics and Business.
- Tsay, R. S. (2010). Analysis of Financial Time Series. Wiley.
- Hyndman, R. J., & Koehler, A. B. (2006). Another look at measures of forecast accuracy. International Journal of Forecasting.
- Diebold, F. X. (2019). Elements of Forecasting. Cengage Learning.
- Puelz, R. (2020). Forecasting: Foundations and Applications. Academic Press.
- Makridakis, S., & Hibon, M. (2000). The M3-Competition: results, conclusions, and conclusions. International Journal of Forecasting.