I am trying to plot a garch model in R. However my results are showing as observation numbers instead of the date. I have tried ammending my csv file and adjusting the dates here with no solution. Is there a solution in R itself as I have seen that it should pick up dates automatically?
Here is a segment of my data csv file.
SWA<- ugarchspec(variance.model = list(model = "sGARCH",
garchOrder=c(1,1), external.regressors = data.matrix(dummy_x2)), mean.model = list(armaOrder=c(1,0)),
distribution.model = "std")
# fit model
# ugarchfit(spec, data)
SWA_fit<- ugarchfit(SWA, data = r_SW)
SWA_fit
#plot volatility
SWA_rhat<-SWA_fit@fit$fitted.values
plot.ts(SWA_rhat)
SWA_hhat<-ts(SWA_fit@fit$sigma^2)
plot.ts(SWA_hhat)