-
Notifications
You must be signed in to change notification settings - Fork 29
Description
Hello guys!
Greetings from Lima, Peru, South America
I've run the predict method as:
#############################
``
Load required libraries
library(quantmod)
library(MSGARCH)
library(zoo)
library(ggplot2)
library(tidyr)
library(comprehenr)
Import data from Yahoo Finance
getSymbols('MSFT', src = 'yahoo', from = "1990-01-01", to = "2023-08-26")
Calculate daily log returns
returns <- diff(log(Ad(MSFT)))[-1]
colnames(returns) <- "returns"
spec <- CreateSpec(
variance.spec = list(model = c("sGARCH", "sGARCH", "sGARCH")),
distribution.spec = list(distribution = c("std", "std", "std")),
switch.spec = list(do.mix = FALSE)
)
fit <- FitML(spec, data = as.numeric(returns))
pred <- predict(object = fit, nahead = 1L, do.return.draw = TRUE)
``
########################
Even though I set do.return.draw to TRUE, I'm not able to have the predicted draws.
Could you please fix that?
Thanks and Regards,
José Carlos