Description Usage Arguments Details Value Author(s) Examples
View source: R/aml_simulation.R
Function is designed to evaluate several different inputs.
1 2 3 4 5 6 7 8 | aml_simulation(
timeframe = 60,
path_sim_input,
path_sim_result,
par_simulate1 = 10,
par_simulate2 = 16,
demo_mode = FALSE
)
|
timeframe |
Integer, Data timeframe e.g. 60 min. This will be equal to 1 bar |
path_sim_input |
String, Path to the folder where csv files will be placed, typically AI_RSIADXAUDCAD60.csv |
path_sim_result |
String, Path to the folder where all results from simulations shall be written |
par_simulate1 |
Integer, Parameter that can be used in simulation |
par_simulate2 |
Integer, Parameter that can be used in simulation |
demo_mode |
Boolean, Simplify function test. When TRUE no simulation will be made |
Function is using several other functions to perform sets of operations designed to test several inputs. Designed to validate model settings.
Update: New function structure to allow quicker simulation of parameters to find best performing input
Function is writing file into Decision Support System folders
(C) 2021 Vladimir Zhbanko
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.