Data:
dput(head(mydata))
structure(list(DATE = structure(c(-315619200, -312940800, -310435200,
-307756800, -305164800, -302486400), tzone = "UTC", class = c("POSIXct",
"POSIXt")), RF = c(0.33, 0.29, 0.35, 0.19, 0.27, 0.24), RMRF = c(-6.99,
0.99, -1.46, -1.7, 3.08, 2.09), SMB = c(2.13, 0.71, -0.65, 0.32,
1.42, -0.24), UMD = c(-3.28, 3.59, 1.85, 2.6, 4.77, 1.03), HML = c(2.65,
-2.15, -2.69, -2.22, -3.83, -0.3), JANDUM = c(1, 0, 0, 0, 0,
0), R4 = c(-4.57, 1.5, -2.83, -1.98, 3.54, 2.15)), row.names = c(NA,
-6L), class = c("tbl_df", "tbl", "data.frame"))
My data contains:
R4 is the percentage return of a portfolio, RF is the return of a good without risk (risk free rate), RMRF is the excess return of portfolio Market Portfolio, SMB, UMD, and HML are 3 factors, and JANDUM is a dummy variable for January (January Dummy).
The data is on a monthly frequency from 1/1960 to 12/2003 (there are 528 observations totaly).
I build the following code for the purpose of "Regress portfolio excess return (R4-RF) to one constant and all other variables (RMRF, SMB, UMD, HML, and JANDUM)".
mydata$PER <-mydata$R4 - mydata$RF
mydata$JANDUM <- as.factor(mydata$JANDUM)
# Fit regression model
model <- lm(PER ~ DATE + RMRF + SMB + UMD + HML + JANDUM, data = mydata)
summary(model)
I want to build Garch models and see whats the best model using AIC.
model1 <- garch (model$residuals, c(1,1), trace =False)
model2 <- garch (model$residuals, c(2,1), trace =False)
Whats the procedure i must follow ?
question from:
https://stackoverflow.com/questions/65924334/choose-garch-model-using-aic