f_trade: Stock trading based on xgboost predictions

Description Usage Arguments Value

View source: R/f_trade.R

Description

Stock trading based on xgboost predictions

Usage

1
f_trade(test_data, buy_cut = 0.6, sell_cut = 0.4)

Arguments

test_data

data. Should be a data.table object with predictions from f_predict

buy_cut

cut off determining when to buy. Should be a number between 0 and 1

sell_cut

cut off determining when to sell. Should be a number between 0 and 1

Value

list with trades made and earnings


kristian-bak/kb.modelling documentation built on Dec. 21, 2021, 7:46 a.m.