knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)
library(xgboost)
library(drake)
library(tidymodels)
library(modeltime)
library(tidyverse)
library(tidyquant)
library(lubridate)
library(timetk)
library(modeltime.ensemble)
library(dplyr)
# R.utils::sourceDirectory("D:/R/bml_stocks/R/")
# R.utils::sourceDirectory("R/")
interactive <- FALSE

Forecast ACB price

Plot

readd(data_ACB) %>%
  plot_time_series(date, value, .interactive = interactive)

Divide data to train/ test

readd(splits_ACB) %>%
  tk_time_series_cv_plan() %>%
  plot_time_series_cv_plan(date, value, .interactive = FALSE)

Modeltime Table

readd(models_tbl_ACB)

Calibration

readd(calibration_tbl_ACB)

Forecast (Testing Set)

readd(forecast_tbl_ACB) %>% 
  plot_modeltime_forecast(.legend_max_width = 25, 
                           .interactive      = interactive)

Accuracy table

readd(accuracy_tbl_ACB)$`_data`

Next week forecast

readd(two_week_fc_ACB)


nguyenngocbinh/bml_stocks documentation built on March 20, 2022, 7:11 a.m.