Learn R Programming

lazytrade (version 0.4.4)

rl_write_control_parameters: Function to find and write the best control parameters.

Description

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.

Usage

rl_write_control_parameters(
  x,
  path_control_files,
  num_trades_to_consider = 100
)

Arguments

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

Value

Function writes best control parameters to be used by the Reinforcement Learning Function

Details

Function is used by the R script Adapt_RL_control.R

Examples

Run this code
# NOT RUN {
# }
# NOT RUN {
dir <- normalizePath(tempdir(),winslash = "/")
#test lasts 15 sec:
library(dplyr)
library(readr)
library(ReinforcementLearning)
library(magrittr)
library(lazytrade)
data(data_trades)
x <- data_trades
rl_write_control_parameters(x = data_trades,
                            path_control_files = dir,
                            num_trades_to_consider = 20)

# }
# NOT RUN {
# }

Run the code above in your browser using DataLab