# \donttest{
library(dplyr)
library(magrittr)
library(readr)
library(h2o)
library(lazytrade)
library(lubridate)
library(stats)
path_input <- normalizePath(tempdir(),winslash = "/")
path_sim_input <- file.path(path_input, "path_sim_input")
dir.create(path_sim_input)
path_sim_result <- file.path(path_input, "path_sim_result")
dir.create(path_sim_result)
file.copy(from = system.file("extdata", "AI_RSIADXCADCHF60.csv", package = "lazytrade"),
to = file.path(path_sim_input, "AI_RSIADXCADCHF60.csv"), overwrite = TRUE)
file.copy(from = system.file("extdata", "AI_RSIADXEURNZD60.csv", package = "lazytrade"),
to = file.path(path_sim_input, "AI_RSIADXEURNZD60.csv"), overwrite = TRUE)
# start h2o engine
h2o.init(nthreads = 2)
# simulation of different epoch values
aml_simulation(timeframe = 60,
path_sim_input = path_sim_input,
path_sim_result = path_sim_result,
par_simulate1 = 10,
par_simulate2 = 10,
demo_mode = FALSE)
Sys.sleep(5)
# stop h2o engine
h2o.shutdown(prompt = FALSE)
#set delay to insure h2o unit closes properly before the next test
Sys.sleep(5)
# }
Run the code above in your browser using DataLab