Unless noted otherwise, all code for this file is available at the end (search: “R Code”).
Monthly Consumer Sentiment data was imported from FRED (Federal Reserve Economic Data) for the time period from 11/1/1952 through 2/1/2022; after initial inspection, the dataset was filtered to cover 1/1/1978 through 2/1/2022 in order to be complete on a monthly basis (University of Michigan). Consumer sentiment is an index that attempts to measure the overall economic attitudes of the consumer segment of GDP; scores over 100 are indicative of a strong economy, while scores below 100 are more indicative of economic hesitancy. Of note, the year 1982-1983 serves as the time to which all other years are indexed as it is considered to be a period of time of relative calm in the economy.
The ability to forecast the trajectory of consumer sentiment with a certain degree of predictive accuracy would potentially provide insight into the direction of an economy. While a more proactive approach to public policy might also be encouraged from such a forecast, it would be somewhat inadvisable if such external factors, such as fiscal stimulus to consumers, were not included in the model(s) used for forecasting. The following work only explored the inclusion of quarterly percent changes in nominal GDP as predictors; any statistical significance of such a predictor is likely not a perfect guide for public policy as both Consumer Sentiment and GDP levels likely have a degree of causal impact on each other.
A plot of monthly Consumer Sentiment for the training dataset, representing 80% of imported observations, is below. Although the data appears somewhat stationary, the results of an exploration of the need for any differencing of the data, shown below, suggests a first-difference of the non-seasonal data is appropriate. This results is not wholly surprising since the data displays periods of general upward or downward trend. The time series does not display strong seasonality; however, there is a lot of irregularity in the data.
## [1] "Differencing of non-seasonal data: 1"
## [1] "Differencing of seasonal data: 0"
A plot of the first-differenced data is below along with correlelograms to assist in the exploration of an appropriate ARIMA model configuration. The data shows stronger stationarity after a first-difference is taken. The ACF and PACF plots present some challenges as it relates to determining an appropriate ARIMA model to fit to the data. Both show significant autocorrelation at lag 2, as well as some potential seasonal autocorrelation at lag 12. In this way, the following ARIMA models will be tested against each other:
A plot of the models’ forecasts on the testing dataset along with tables of modeling statistics such as \(AIC_c\) and the root mean-squared errors on the test dataset values are below. Overall, the results indicate the most strength from the auto-generated ARIMA model with the lowest \(AIC_c = 2,365.940\) and \(RMSE = 14.89\). It should be noted that other models performed similarly well. Overall, all models residuals are representative of white noise, with the auto-generated ARIMA model with a predictor displaying the only significant autocorrelation among residuals.
A report of each model can be found in the Appendix; the auto-generated ARIMA(2,1,1)(1,0,1) model is extremely close to the manually selected ARIMA(2,1,2)(1,0,1) configuration.
| .model | sigma2 | log_lik | AICc |
|---|---|---|---|
| ARIMA_212_101 | 15.52004 | -1176.806 | 2369.960 |
| ARIMA_212_101nd | 15.48327 | -1176.813 | 2367.896 |
| ARIMAauto | 15.45150 | -1176.869 | 2365.940 |
| ARIMAdynamic | 15.44240 | -1176.876 | 2365.954 |
| .model | .type | RMSE | MAE | MPE | MAPE |
|---|---|---|---|---|---|
| ARIMA_212_101 | Test | 15.91686 | 14.06998 | 13.58305 | 15.19234 |
| ARIMA_212_101nd | Test | 15.34266 | 13.59274 | 12.68659 | 14.71809 |
| ARIMAauto | Test | 14.88803 | 13.18155 | 12.04396 | 14.29152 |
| ARIMAdynamic | Test | 15.93156 | 14.09905 | 13.46358 | 15.23814 |
Seeing as consumer sentiment has a natural connection to financial data (e.g., consumer spending, GDP, etc.) and displays a large amount of volatility, a GARCH model configuration was appropriate for further consideration. The data from 1/1/1978 forward was reconfigured to calculate the percent change in the consumer sentiment index value; such a change better highlighted the volatility in the data and centered the data around a mean of zero. The plots below demonstrate this observation more clearly.
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
A standard GARCH(1,1) model was fit to the training dataset; this is a standard starting point for GARCH modeling of this kind. A report of the model’s results is below. In summary, the optimal parameters (ar1, ma1, omega, alpha1, beta1) are all statistically significant at \(\alpha = 5\%\). Further, the plots of model results suggest normal residuals and squared standardized residuals that are mostly representative of white noise. These results suggest strength in the model.
##
## *---------------------------------*
## * GARCH Model Fit *
## *---------------------------------*
##
## Conditional Variance Dynamics
## -----------------------------------
## GARCH Model : sGARCH(1,1)
## Mean Model : ARFIMA(1,0,1)
## Distribution : norm
##
## Optimal Parameters
## ------------------------------------
## Estimate Std. Error t value Pr(>|t|)
## mu 0.001723 0.001265 1.3621 0.173155
## ar1 0.721438 0.134108 5.3795 0.000000
## ma1 -0.833667 0.107439 -7.7595 0.000000
## omega 0.000060 0.000030 1.9666 0.049231
## alpha1 0.095935 0.024784 3.8709 0.000108
## beta1 0.884641 0.026076 33.9261 0.000000
##
## Robust Standard Errors:
## Estimate Std. Error t value Pr(>|t|)
## mu 0.001723 0.001359 1.2674 0.205008
## ar1 0.721438 0.139442 5.1737 0.000000
## ma1 -0.833667 0.120100 -6.9414 0.000000
## omega 0.000060 0.000033 1.8281 0.067536
## alpha1 0.095935 0.024351 3.9397 0.000082
## beta1 0.884641 0.022504 39.3107 0.000000
##
## LogLikelihood : 688.0045
##
## Information Criteria
## ------------------------------------
##
## Akaike -3.2246
## Bayes -3.1672
## Shibata -3.2250
## Hannan-Quinn -3.2019
##
## Weighted Ljung-Box Test on Standardized Residuals
## ------------------------------------
## statistic p-value
## Lag[1] 1.240 0.2654
## Lag[2*(p+q)+(p+q)-1][5] 1.517 0.9977
## Lag[4*(p+q)+(p+q)-1][9] 2.717 0.9288
## d.o.f=2
## H0 : No serial correlation
##
## Weighted Ljung-Box Test on Standardized Squared Residuals
## ------------------------------------
## statistic p-value
## Lag[1] 0.00151 0.9690
## Lag[2*(p+q)+(p+q)-1][5] 1.03052 0.8527
## Lag[4*(p+q)+(p+q)-1][9] 3.42081 0.6879
## d.o.f=2
##
## Weighted ARCH LM Tests
## ------------------------------------
## Statistic Shape Scale P-Value
## ARCH Lag[3] 0.2776 0.500 2.000 0.5983
## ARCH Lag[5] 1.9227 1.440 1.667 0.4886
## ARCH Lag[7] 4.0151 2.315 1.543 0.3444
##
## Nyblom stability test
## ------------------------------------
## Joint Statistic: 0.5071
## Individual Statistics:
## mu 0.07157
## ar1 0.09883
## ma1 0.11384
## omega 0.10390
## alpha1 0.07072
## beta1 0.11216
##
## Asymptotic Critical Values (10% 5% 1%)
## Joint Statistic: 1.49 1.68 2.12
## Individual Statistic: 0.35 0.47 0.75
##
## Sign Bias Test
## ------------------------------------
## t-value prob sig
## Sign Bias 1.0427 0.2977
## Negative Sign Bias 0.2283 0.8196
## Positive Sign Bias 0.3139 0.7537
## Joint Effect 1.4203 0.7008
##
##
## Adjusted Pearson Goodness-of-Fit Test:
## ------------------------------------
## group statistic p-value(g-1)
## 1 20 16.10 0.65049
## 2 30 25.58 0.64775
## 3 40 51.61 0.08512
## 4 50 67.90 0.03813
##
##
## Elapsed time : 0.05231595
##
## please wait...calculating quantiles...
Simulations were conducted to predict the path of changes in consumer sentiment 106 months (e.g., test dataset length) from the end of the training dataset; these simulated changes were translated to Consumer Sentiment Index values using the actual consumer sentiment at 2/1/2022 (\(76.4\)) as the starting point. A plot of the 30 simulations (gray lines) along with actual data (red lines) is below; overall, the simulated results cover the range of the test set results.
## [1] "RMSE of GARCH(1,1) model, Simulated Average: 12.58"
The plots below are intended to be side by side comparisons of the results of the auto-generated ARIMA model with no predictors and the GARCH(1,1) model. With the GARCH model having an improved RMSE of \(12.58\) vs. \(14.89\), and a plot that allows for stronger variability in forecasted Consumer Sentiment values, the GARCH model is preferred.
University of Michigan, University of Michigan: Consumer Sentiment [UMCSENT], retrieved from FRED, Federal Reserve Bank of St. Louis; https://fred.stlouisfed.org/series/UMCSENT, April 24, 2022
## Series: UMCSENT
## Model: ARIMA(2,1,2)(1,0,1)[12] w/ drift
##
## Coefficients:
## ar1 ar2 ma1 ma2 sar1 sma1 constant
## 0.5682 0.1587 -0.6035 -0.2469 0.4365 -0.3112 -0.0023
## s.e. 0.4666 0.5320 0.4617 0.5308 0.2877 0.3087 0.0197
##
## sigma^2 estimated as 15.52: log likelihood=-1176.81
## AIC=2369.61 AICc=2369.96 BIC=2401.99
## Series: UMCSENT
## Model: ARIMA(2,1,2)(1,0,1)[12]
##
## Coefficients:
## ar1 ar2 ma1 ma2 sar1 sma1
## 0.5742 0.1566 -0.6092 -0.244 0.4380 -0.3123
## s.e. 0.4683 0.5293 0.4639 0.529 0.2868 0.3079
##
## sigma^2 estimated as 15.48: log likelihood=-1176.81
## AIC=2367.63 AICc=2367.9 BIC=2395.96
## Series: UMCSENT
## Model: ARIMA(2,1,1)(1,0,1)[12]
##
## Coefficients:
## ar1 ar2 ma1 sar1 sma1
## 0.7322 -0.0863 -0.7701 0.453 -0.3377
## s.e. 0.2124 0.0632 0.2101 0.314 0.3309
##
## sigma^2 estimated as 15.45: log likelihood=-1176.87
## AIC=2365.74 AICc=2365.94 BIC=2390.02
## Series: UMCSENT
## Model: LM w/ ARIMA(1,1,1)(1,0,1)[12] errors
##
## Coefficients:
## ar1 ma1 sar1 sma1 QTR_GDP_CHG
## 0.9128 -0.9757 0.5086 -0.3696 0.3287
## s.e. 0.1063 0.0689 0.2699 0.2806 0.3700
##
## sigma^2 estimated as 15.44: log likelihood=-1176.88
## AIC=2365.75 AICc=2365.95 BIC=2390.04
knitr::opts_chunk$set(echo = FALSE)
local({
hook_source <- knitr::knit_hooks$get('source')
knitr::knit_hooks$set(source = function(x, options) {
x <- x[!grepl('# SECRET!!$', x)]
hook_source(x, options)
})
})
#INVOKE APPROPRIATE LIBRARIES
library("feasts")
library("seasonal")
library("tsibble")
library("tsibbledata")
library("dplyr")
library("ggplot2")
library("forecast")
library("fable")
library("fpp3")
library("sqldf")
library("psych")
library("PerformanceAnalytics")
library("car")
library("kableExtra")
library("glmnet")
library("ISLR")
library("leaps")
#For GARCH Modeling
library("lubridate")
library("quantmod")
library("xts")
library("rugarch")
#Import Consumer Sentiment Data (University of Michigan...UMCSENT)
csent_data <- read.csv(paste0(csv_path,
"CSENTIMENT.csv"))
csent_data_df <-
csent_data %>%
mutate(DATE = as.Date(DATE),
MONTH = yearmonth(DATE),
QTR = as.factor(yearquarter(DATE))) %>%
filter(DATE >= '1978-01-01') %>%
mutate(UMCSENT = as.numeric(UMCSENT)) %>%
data.frame() %>%
select(DATE,
QTR,
UMCSENT)
csent_data_df <-
csent_data_df %>%
mutate(UMCSENT_CHG = UMCSENT/lag(UMCSENT, 1L) - 1)
#Import Nominal GDP data -> explore potential relationship with CSENT and GDP
#Comparison will be at the level of changes in CSENT with changes in GDP
gdp_data <- read.csv(paste0(csv_path,
"GDP.csv"),
stringsAsFactors = TRUE)
gdp_data_df <-
gdp_data %>%
mutate(QTR = as.factor(yearquarter(as.Date(DATE))),
GDP = as.double(GDP),
GDP_CHG_PCT = (GDP/lag(GDP, n = 1L)-1)*100) %>%
filter(as.Date(DATE) >= '1978-01-01') %>%
data.frame() %>%
select(QTR,
GDP_CHG_PCT)
# gdp_data_df2 <-
# gdp_data_df %>%
# mutate(GDP_CHG82 = gdp_data_df2$GDP_CHG_PCT[gdp_data_df2$QTR == '1982 Q1'],
# GDP_IDX82 = abs(GDP_CHG_PCT)/abs(GDP_CHG82)*100)
#Combine Consumer Sentiment and GDP change data; convert to timeseries type
data_ts <- sqldf('
SELECT C.DATE
, C.QTR
, C.UMCSENT
, C.UMCSENT_CHG
, G.GDP_CHG_PCT AS QTR_GDP_CHG
FROM csent_data_df C
LEFT JOIN gdp_data_df G
ON G.QTR = C.QTR
')
data_ts2 <-
data_ts %>%
mutate(MONTH = yearmonth(DATE)) %>%
select(MONTH,
UMCSENT,
QTR_GDP_CHG,
UMCSENT_CHG) %>%
as_tsibble(index = MONTH)
train_end <- round(0.8*length(rownames(data_ts2)), 0)
test_start <- train_end + 1
test_end <- length(rownames(data_ts2))
data_ts_train <- data_ts2[1:train_end,]
data_ts_test <- data_ts2[test_start:test_end,]
#Plot of Consumer Sentiment values over time
data_ts_train %>%
autoplot(UMCSENT) +
labs(x = "Month",
y = "Level",
title = "Monthly Consumer Sentiment",
subtitle = "University of Michigan Compiled, 1982-1983 = 100") +
geom_line(aes(y = 100),
col = "red",
lty = "dashed")
#Exploration of stationarity - NO DIFFERENCES
data_ts_ndiffs <-
data_ts_train %>%
features(UMCSENT, unitroot_ndiffs)
data_ts_nsdiffs <-
data_ts_train %>%
features(difference(UMCSENT), unitroot_nsdiffs)
print(paste("Differencing of non-seasonal data: ", data_ts_ndiffs$ndiffs))
print(paste("Differencing of seasonal data: ", data_ts_nsdiffs$nsdiffs))
data_ts_train %>%
gg_tsdisplay(difference(UMCSENT), plot_type = 'partial')
#Build ARIMA models
data_ts_ARIMA <-
data_ts_train %>%
model(ARIMA_212_101 = ARIMA(UMCSENT ~ 1 + pdq(2,1,2) + PDQ(1,0,1)),
ARIMA_212_101nd = ARIMA(UMCSENT ~ 0 + pdq(2,1,2) + PDQ(1,0,1)),
ARIMAauto = ARIMA(UMCSENT),
ARIMAdynamic = ARIMA(UMCSENT ~ QTR_GDP_CHG))
data_ts_future <- new_data(data_ts_train, length(rownames(data_ts_test))) %>%
mutate(QTR_GDP_CHG = mean(data_ts_train$QTR_GDP_CHG))
data_ts_fc <-
data_ts_ARIMA %>%
forecast(new_data = data_ts_future)
data_ts_fc %>%
autoplot(data_ts_test) +
geom_line(data = fitted(data_ts_ARIMA) %>% filter(.model == "ARIMA_212_101"),
aes(x = MONTH,
y = .fitted),
col = "red") +
geom_line(data = fitted(data_ts_ARIMA) %>% filter(.model == "ARIMA_212_101nd"),
aes(x = MONTH,
y = .fitted),
col = "green") +
geom_line(data = fitted(data_ts_ARIMA) %>% filter(.model == "ARIMAauto"),
aes(x = MONTH,
y = .fitted),
col = "blue") +
geom_line(data = fitted(data_ts_ARIMA) %>% filter(.model == "ARIMAdynamic"),
aes(x = MONTH,
y = .fitted),
col = "purple") +
geom_line(data = data_ts_train,
aes(x = MONTH,
y = UMCSENT),
col = "black",
lty = "dotted") +
theme_classic() +
labs(x = "Month",
y = "Level",
title = "Monthly Consumer Sentiment - w/ Forecast",
subtitle = "University of Michigan, 1982-1983 = 100") +
geom_line(aes(y = 100),
col = "red",
lty = "dotted")
ARIMA_model_results <- glance(data_ts_ARIMA) %>%
select(.model,
sigma2,
log_lik,
AICc)
forecast_df <- data.frame(rbind(
data_ts_fc %>% filter(.model == "ARIMA_212_101") %>% accuracy(data_ts_test) %>%
select(.model, .type, RMSE:MAPE),
data_ts_fc %>% filter(.model == "ARIMA_212_101nd") %>% accuracy(data_ts_test) %>%
select(.model, .type, RMSE:MAPE),
data_ts_fc %>% filter(.model == "ARIMAauto") %>% accuracy(data_ts_test) %>%
select(.model, .type, RMSE:MAPE),
data_ts_fc %>% filter(.model == "ARIMAdynamic") %>% accuracy(data_ts_test) %>%
select(.model, .type, RMSE:MAPE)
))
kable(ARIMA_model_results) %>%
kable_styling(latex_options = "striped") %>%
kable_styling(latex_options = "HOLD_position")
kable(forecast_df) %>%
kable_styling(latex_options = "striped") %>%
kable_styling(latex_options = "HOLD_position")
data_ts_ARIMA %>%
select(ARIMA_212_101) %>%
gg_tsresiduals() +
labs(title = "Residual Plots",
subtitle = data_ts_ARIMA$ARIMA_212_101)
data_ts_ARIMA %>%
select(ARIMA_212_101nd) %>%
gg_tsresiduals() +
labs(title = "Residual Plots",
subtitle = data_ts_ARIMA$ARIMA_212_101nd)
data_ts_ARIMA %>%
select(ARIMAauto) %>%
gg_tsresiduals() +
labs(title = "Residual Plots",
subtitle = data_ts_ARIMA$ARIMAauto)
data_ts_ARIMA %>%
select(ARIMAdynamic) %>%
gg_tsresiduals() +
labs(title = "Residual Plots",
subtitle = data_ts_ARIMA$ARIMAdynamic)
data_ts_train2 <-
data_ts_train %>%
filter(MONTH > yearmonth('1978-01-01')) %>%
select(MONTH,
UMCSENT_CHG) %>%
as.ts()
data_ts_test2 <-
data_ts_test %>%
select(MONTH,
UMCSENT_CHG) %>%
as.ts()
data_ts_train %>%
gg_tsdisplay(UMCSENT_CHG, plot_type = 'partial') +
labs(title = "Monthly Percent Change, Consumer Sentiment")
ggplot(data = data_ts_train,
aes(x = UMCSENT_CHG)) +
geom_histogram(aes(y = ..density..),
col = "black",
fill = "grey") +
geom_density(alpha = .2, fill = "#FF6666") +
theme_classic() +
labs(x = "Consumer Sentiment - Percent Change Bucket",
y = "Density",
title = "Histogram of Percent Change in Consumer Sentiment",
subtitle = "2/1/1978 - 2/1/2022")
data_train_gspec <- ugarchspec(mean.model=list(armaOrder = c(1,1)))
data_train_gfit <- ugarchfit(data_train_gspec, data = data_ts_train2)
print(data_train_gfit)
plot(data_train_gfit, which = "all")
sfinal <- data_train_gspec
setfixed(sfinal) <- as.list(coef(data_train_gfit))
data_gfit_sim <- ugarchpath(spec = sfinal,
m.sim = 30,
n.sim = length(rownames(data_ts_test)),
rseed = 1234)
CSENT_fc_transform <- data_ts_train[length(rownames(data_ts_train)),]$UMCSENT *
apply(fitted(data_gfit_sim), 2, 'cumsum') +
data_ts_train[length(rownames(data_ts_train)),]$UMCSENT
CSENT_GARCH_sim <- data.frame(data_ts_test[,1],
CSENT_fc_transform)
sim_average <- c()
for(i in 1:length(rownames(CSENT_GARCH_sim))) {
vector_house <- as.vector(CSENT_fc_transform[i,])
sim_average[i] <- mean(vector_house)
}
CSENT_GARCH_simavg <- data.frame(data_ts_test[,1],
sim_average,
data_ts_test[,2],
(sim_average - data_ts_test[,2])^2)
colnames(CSENT_GARCH_simavg) <- c("MONTH", "sim_average", "UMCSENT", "SE")
ggplot(data = CSENT_GARCH_sim) +
geom_line(aes(x = MONTH,
y = X2),
col = "gray75") +
geom_line(aes(x = MONTH,
y = X3),
col = "gray75") +
geom_line(aes(x = MONTH,
y = X4),
col = "gray75") +
geom_line(aes(x = MONTH,
y = X5),
col = "gray75") +
geom_line(aes(x = MONTH,
y = X6),
col = "gray75") +
geom_line(aes(x = MONTH,
y = X7),
col = "gray75") +
geom_line(aes(x = MONTH,
y = X8),
col = "gray75") +
geom_line(aes(x = MONTH,
y = X9),
col = "gray75") +
geom_line(aes(x = MONTH,
y = X10),
col = "gray75") +
geom_line(aes(x = MONTH,
y = X11),
col = "gray75") +
geom_line(aes(x = MONTH,
y = X12),
col = "gray75") +
geom_line(aes(x = MONTH,
y = X13),
col = "gray75") +
geom_line(aes(x = MONTH,
y = X14),
col = "gray75") +
geom_line(aes(x = MONTH,
y = X15),
col = "gray75") +
geom_line(aes(x = MONTH,
y = X16),
col = "gray75") +
geom_line(aes(x = MONTH,
y = X17),
col = "gray75") +
geom_line(aes(x = MONTH,
y = X18),
col = "gray75") +
geom_line(aes(x = MONTH,
y = X19),
col = "gray75") +
geom_line(aes(x = MONTH,
y = X20),
col = "gray75") +
geom_line(aes(x = MONTH,
y = X21),
col = "gray75") +
geom_line(aes(x = MONTH,
y = X22),
col = "gray75") +
geom_line(aes(x = MONTH,
y = X23),
col = "gray75") +
geom_line(aes(x = MONTH,
y = X24),
col = "gray75") +
geom_line(aes(x = MONTH,
y = X25),
col = "gray75") +
geom_line(aes(x = MONTH,
y = X26),
col = "gray75") +
geom_line(aes(x = MONTH,
y = X27),
col = "gray75") +
geom_line(aes(x = MONTH,
y = X28),
col = "gray75") +
geom_line(aes(x = MONTH,
y = X29),
col = "gray75") +
geom_line(aes(x = MONTH,
y = X30),
col = "gray75") +
geom_line(data = CSENT_GARCH_simavg,
aes(x = MONTH,
y = sim_average),
col = "black") +
geom_line(data = data_ts_train,
aes(x = MONTH,
y = UMCSENT),
col = "red") +
geom_line(data = data_ts_test,
aes(x = MONTH,
y = UMCSENT),
col = "red",
lty = "dashed") +
theme_classic() +
labs(x = "Month",
y = "Level",
title = "Monthly Consumer Sentiment - w/ Forecast",
subtitle = "University of Michigan, 1982-1983 = 100")
print(paste("RMSE of GARCH(1,1) model, Simulated Average: ",
round(sqrt(mean(CSENT_GARCH_simavg$SE)), 2)))
data_ts_fc %>%
filter(.model == "ARIMAauto") %>%
autoplot(data_ts_test) +
geom_line(data = fitted(data_ts_ARIMA) %>% filter(.model == "ARIMAauto"),
aes(x = MONTH,
y = .fitted),
col = "blue") +
geom_line(data = data_ts_train,
aes(x = MONTH,
y = UMCSENT),
col = "black",
lty = "dotted") +
theme_classic() +
labs(x = "Month",
y = "Level",
title = "Monthly Consumer Sentiment - w/ Forecast",
subtitle = data_ts_ARIMA$ARIMAauto) +
geom_line(aes(y = 100),
col = "red",
lty = "dotted")
ggplot(data = CSENT_GARCH_sim) +
geom_line(aes(x = MONTH,
y = X2),
col = "gray75") +
geom_line(aes(x = MONTH,
y = X3),
col = "gray75") +
geom_line(aes(x = MONTH,
y = X4),
col = "gray75") +
geom_line(aes(x = MONTH,
y = X5),
col = "gray75") +
geom_line(aes(x = MONTH,
y = X6),
col = "gray75") +
geom_line(aes(x = MONTH,
y = X7),
col = "gray75") +
geom_line(aes(x = MONTH,
y = X8),
col = "gray75") +
geom_line(aes(x = MONTH,
y = X9),
col = "gray75") +
geom_line(aes(x = MONTH,
y = X10),
col = "gray75") +
geom_line(aes(x = MONTH,
y = X11),
col = "gray75") +
geom_line(aes(x = MONTH,
y = X12),
col = "gray75") +
geom_line(aes(x = MONTH,
y = X13),
col = "gray75") +
geom_line(aes(x = MONTH,
y = X14),
col = "gray75") +
geom_line(aes(x = MONTH,
y = X15),
col = "gray75") +
geom_line(aes(x = MONTH,
y = X16),
col = "gray75") +
geom_line(aes(x = MONTH,
y = X17),
col = "gray75") +
geom_line(aes(x = MONTH,
y = X18),
col = "gray75") +
geom_line(aes(x = MONTH,
y = X19),
col = "gray75") +
geom_line(aes(x = MONTH,
y = X20),
col = "gray75") +
geom_line(aes(x = MONTH,
y = X21),
col = "gray75") +
geom_line(aes(x = MONTH,
y = X22),
col = "gray75") +
geom_line(aes(x = MONTH,
y = X23),
col = "gray75") +
geom_line(aes(x = MONTH,
y = X24),
col = "gray75") +
geom_line(aes(x = MONTH,
y = X25),
col = "gray75") +
geom_line(aes(x = MONTH,
y = X26),
col = "gray75") +
geom_line(aes(x = MONTH,
y = X27),
col = "gray75") +
geom_line(aes(x = MONTH,
y = X28),
col = "gray75") +
geom_line(aes(x = MONTH,
y = X29),
col = "gray75") +
geom_line(aes(x = MONTH,
y = X30),
col = "gray75") +
geom_line(data = CSENT_GARCH_simavg,
aes(x = MONTH,
y = sim_average),
col = "black") +
geom_line(data = data_ts_train,
aes(x = MONTH,
y = UMCSENT),
col = "red") +
geom_line(data = data_ts_test,
aes(x = MONTH,
y = UMCSENT),
col = "red",
lty = "dashed") +
theme_classic() +
labs(x = "Month",
y = "Level",
title = "Monthly Consumer Sentiment - w/ Forecast",
subtitle = "<GARCH(1,1)>")
data_ts_ARIMA %>%
select(ARIMA_212_101) %>%
fabletools::report()
data_ts_ARIMA %>%
select(ARIMA_212_101nd) %>%
fabletools::report()
data_ts_ARIMA %>%
select(ARIMAauto) %>%
fabletools::report()
data_ts_ARIMA %>%
select(ARIMAdynamic) %>%
fabletools::report()