Function to find and write the best control parameters.
Function to find and write the best control parameters.
This function is supposed to run on a weekly basis. Purpose of this function is to perform RL and trading simulation and find out the best possible control parameters for the RL function.
x: * dataset containing the trading results for one trading robot
path_control_files: * path where control parameters will be saved
num_trades_to_consider: * number of last trades to use for RL modeling simulations, default value 100
Returns
Function writes best control parameters to be used by the Reinforcement Learning Function
Details
Function is used by the R script Adapt_RL_MT_control.R
Examples
# test lasts 15 sec:dir <- normalizePath(tempdir(),winslash ="/")library(dplyr)library(readr)library(ReinforcementLearning)library(magrittr)library(lazytrade)data(trading_systemDF)# use optimal control parameters found by auxiliary functionrl_write_control_parameters_mt(x = trading_systemDF, path_control_files = dir, num_trades_to_consider =100)