- Choose an economic series that you are interested in working with. (Your economic
variable must be approved by me):
- Prepare data for your analysis.
(a) Download data (not seasonally adjusted) directly from the Federal Reserve Economic Data (FRED) website.
(b) Keep observations from 1960-now.
(c) Report the descriptive statistics.
(d) Plot the series with recession bars. Your graph must have a title and it is self
explained.
Discuss if your series has a trend and/or seasonal patterns.
(e) For MA students: compute and plot 5-year rolling variances. Discuss your results.
- Identify at least five potential forecasting models. Explain briefly why you choose
them.
(a) To identify potential forecasting models, you have to compute the detrended and
seasonally adjusted variable first, which is computed as the residual from regressing your variable on a linear trend (or a quadratic trend or a log-linear trend) and
seasonal dummy variables.
(b) You then compute and plot the sample ACF and PACF for the detrended and
seasonally adjusted series.
(c) Analyze the sample ACF and PACF to find out five potential models for your
forecasting purpose.
For example, a model with a linear trend plus seasonality plus random noises can
be written as:
1
yt = 0 + 1t + 2D2t + 3D3t + 4D4t + t
.
Another example, a model with a linear trend plus seasonality plus an ARMA(1,1)
cycle can be written as:
yt = 0 + 1t + 2D2t + 3D3t + 4D4t + 1yt1 + 1t1 + t
.
Note: You might want to include the lagged values of other economic variables,
e.g. xt1, that could be useful in predicting yt based on economic theory. For
example,
yt = 0 + 1t + 2D2t + 3D3t + 4D4t+1xt1 + 1yt1 + 1t1 + t
.
- Split the sample into two periods: the in-sample period (i.e. 1960-2015) and the outof-sample period (i.e. 2016-now).
Use the in-sample observations (i.e. 1960-2015) to estimate all the potential models
and compute all the required statistics (MSE, s
2
, R2
, adjusted R2
, AIC, SIC).
- Choose three best models based on these AIC and SIC.
- Use the models from part (5) to compute simulated forecasts for the out-of-sample
period (i.e. 2016-now). Then compute forecast errors and mean squared forecast
errors (MSFE).
The select the best model based on MSFE.
Full Answer Section
(b) Observation Range:
We'll keep observations from 1960-present (as of today, May 2nd, 2024).
3. Descriptive Statistics and Plotting:
Once you have downloaded the data, you can use statistical software (like Python with libraries like Pandas and Matplotlib) to calculate descriptive statistics (mean, median, standard deviation, minimum, maximum) and plot the series with recession bars.
Here's an example Python code snippet to achieve this:
import pandas as pd
import matplotlib.pyplot as plt
data = pd.read_csv("UNRATE.csv")
print(data['UNRATE'].describe())
recessions = pd.read_csv("recessions.csv")
fig, ax = plt.subplots(figsize=(12, 6))
ax.plot(data['DATE'], data['UNRATE'], label='Unemployment Rate')
for start, end in zip(recessions['Start'], recessions['End']):
ax.axvspan(start, end, alpha=0.2, color='gray', label='Recession')
ax.set_title('US Unemployment Rate (1960-Present) with Recessions')
ax.set_xlabel('Year')
ax.set_ylabel('Unemployment Rate (%)')
ax.legend()
plt.show()
Analysis of Trend and Seasonality:
By visually inspecting the plot, you can determine if the unemployment rate exhibits a trend (upward, downward, or no trend) and/or seasonal patterns (e.g., higher unemployment during certain months).
4. Rolling Variances (For MA Students):
For Master's students, you can calculate and plot 5-year rolling variances to analyze how the volatility of the unemployment rate has changed over time.
5. Identifying Potential Forecasting Models (After Detrending and Seasonal Adjustment):
(a) Detrending and Seasonal Adjustment:
This step requires statistical modeling to remove the trend and seasonal components. You can achieve this using linear regression with a trend term and seasonal dummy variables. The residuals from this regression will be the detrended and seasonally adjusted unemployment rate series.
(b) Sample ACF and PACF:
Compute and plot the sample autocorrelation function (ACF) and partial autocorrelation function (PACF) for the detrended and seasonally adjusted series. These functions reveal patterns in the residuals that can suggest appropriate forecasting models.
(c) Potential Models:
Based on the ACF and PACF plots, you can identify several potential models suitable for forecasting the unemployment rate. Here are some examples:
- ARIMA Model: If the ACF and PACF show significant spikes at specific lags, an ARIMA model (Autoregressive Integrated Moving Average) might be suitable. This model incorporates autoregressive terms (past values of the series) and moving average terms (past forecast errors) to capture patterns in the data.
- Seasonal ARIMA Model: If seasonality is still present after detrending, a seasonal ARIMA model can be used. This model extends the ARIMA model by including seasonal terms.
- Exponential Smoothing Models: These models are simple and effective for short-term forecasting. They assign weights to past observations, with more recent observations receiving higher weights.
- Regression Models: If you have additional economic indicators that might influence the unemployment rate, you can consider regression models that incorporate these variables as predictors.
The specific models you choose will depend on the characteristics of the detrended and seasonally adjusted unemployment rate series.
6. Splitting the Sample and Model Estimation:
Divide the data into two periods:
- In-sample period (1960-2015) for model estimation.
- Out-of-sample period (2016-present) for evaluating forecast accuracy.
Use the in-sample data to estimate the parameters of each potential forecasting