We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello guys!
Greetings from Lima, Peru, South America
I've run the predict method as: ############################# ``
library(quantmod) library(MSGARCH) library(zoo) library(ggplot2) library(tidyr) library(comprehenr)
getSymbols('MSFT', src = 'yahoo', from = "1990-01-01", to = "2023-08-26")
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
The text was updated successfully, but these errors were encountered:
No branches or pull requests
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
The text was updated successfully, but these errors were encountered: