library(olsrr)
library(rugarch)
library(dynlm)
library(lmtest)
library(sandwich)
library(fGarch)
library(kableExtra)
library(knitr)
library(FinTS)
library(tseries)
library(timetk)
library(tidyquant)
library(quantmod)
library(stats)
library(car)
library(ggplot2)
library(qqplotr)
library(xts)
SP500dailydat<-tq_get("^GSPC", from = '2000-02-01', to = "2020-02-01",get = "stock.prices")
getSymbols("^GSPC", from='2000-02-01',to='2020-02-01')
GSPC_Daily_Returns=(diff(GSPC$GSPC.Adjusted, lag=1))
GSPC_Daily_Returns_ACF<-GSPC_Daily_Returns[complete.cases(GSPC_Daily_Returns),]
Garch.fit <- garchFit(~garch(1,1), data = GSPC_Daily_Returns_ACF$GSPC.Adjusted, trace =T)
plot(Garch.fit)
2
plot(Garch.fit)
3
when I knit to pdf it says:
Error in menus(choices = paste(" ", choices), title = " Make a plot selection(or 0 to exit):" menue cannot be used non-interactively
Is there a way to automate my choice of 2 and 3 without me having to input them into the console because that's the problem when I Knit to pdf?