Comments (1)
This is done. We can yet tune univariate time series.
Example
library(garchmodels)
library(timetk)
library(tidyverse)
library(tidymodels)
rIBM_extended <- rIBM %>%
future_frame(.length_out = 24, .bind_data = TRUE)
rIBM_train <- rIBM_extended %>% drop_na()
rIBM_future <- rIBM_extended %>% filter(is.na(daily_returns))
# Model Spec
model_spec <-garchmodels::garch_reg(mode = "regression",
arch_order = tune(),
garch_order = tune(),
tune_by = "sigmaFor") %>%
set_engine("rugarch")
# Recipe spec
recipe_spec <- recipe(daily_returns ~ date, data = rIBM_train)
resamples <- timetk::time_series_cv(rIBM_train,
date_var = date,
initial = "6 years",
assess = "24 months",
skip = "24 months",
cumulative = TRUE,
slice_limit = 3)
timetk::plot_time_series_cv_plan(resamples, .date_var = date, .value = daily_returns)
# Workflow
wflw <- workflow() %>%
add_recipe(recipe_spec) %>%
add_model(model_spec)
tune_results <- tune_grid(
object = wflw,
resamples = resamples,
param_info = parameters(wflw),
grid = 5,
control = control_grid(verbose = TRUE, allow_par = TRUE, parallel_over = "everything")
)
tune_results %>% show_best(metric = "rmse")
from garchmodels.
Related Issues (10)
- Garchmodels Roadmap
- Warnings/Errors when Running the Examples to Tune the Parameters HOT 2
- GARCH Models in R with Dummy variables
- Multivariate Engine Unification
- Support for Tuning Multivariate Models
- Problems in validating the arguments. HOT 2
- loadNamespace() Error HOT 5
- Error: package or namespace load failed for ‘garchmodels’ HOT 5
- Garchmodels Installation Fails HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from garchmodels.