Today, give a try to Techtonique web app, a tool designed to help you make informed, data-driven decisions using Mathematics, Statistics, Machine Learning, and Data Visualization. Here is a tutorial with audio, video, code, and slides: https://moudiki2.gumroad.com/l/nrhgb. 100 API requests are now (and forever) offered to every user every month, no matter the pricing tier.
Remark: There’s now a button for copying the code chunks. It’s useful; I needed it.
This post is a sequel of Beyond ARMA-GARCH: leveraging model-agnostic Machine Learning and conformal prediction for nonparametric probabilistic stock forecasting (ML-ARCH) and Python version of Beyond ARMA-GARCH: leveraging model-agnostic Quasi-Randomized networks and conformal prediction for nonparametric probabilistic stock forecasting (ML-ARCH).
The novelty in this post is that: you can use any statistical model (meaning Theta, ARIMA, exponential smoothing, etc.) for volatility forecasting. It will be adapted to the Python version (previous link) in the next few days. Remember that the models used below are not tuned, and that you need to tune them to reduce the forecasting uncertainty.
Installing the package
options(repos = c(
techtonique = "https://r-packages.techtonique.net",
CRAN = "https://cloud.r-project.org"
))
install.packages("ahead")
Theta
# Default model for volatility (Ridge regression for volatility)
(obj_ridge <- ahead::mlarchf(fpp2::goog200, h=20L, B=500L, ml=FALSE, stat_model=forecast::thetaf))
plot(obj_ridge)
Mean forecast
(obj_ridge <- ahead::mlarchf(fpp2::goog200, h=20L, B=500L, ml=FALSE, stat_model=forecast::meanf))
plot(obj_ridge)
Auto ARIMA
(obj_ridge <- ahead::mlarchf(fpp2::goog200, h=20L, B=500L, ml=FALSE, stat_model=forecast::auto.arima))
plot(obj_ridge)
Exponential smoothing
(obj_ridge <- ahead::mlarchf(fpp2::goog200, h=20L, B=500L, ml=FALSE, stat_model=forecast::ets))
plot(obj_ridge)
Comments powered by Talkyard.