getAction: Returns a data.frame with profitable actions

Description Usage Arguments Value Examples

Description

Says "buy", "sell" or do "nothing" for data when it profitable

Usage

1
getAction(df, range.up, range.down)

Arguments

df

A given data.frame for testing. Must have a "High", "Low" and "Close" columns

range.up

The level for take profit. If contains then action is successfully.

range.down

The level for stop loss. If contains then action is not successfully.

Value

action

1 for buy, 0.5 for do nothing and 0 for sell

action.factor

Factor with 3 levels: buy, sell, nothing

buy

1 for buy and 0 for others

nothing

1 for nothing and 0 for others

sell

1 for sell and 0 for others

Examples

1
2
data(aapl)
getAction(aapl, range.up = 0.06, range.down = 0.025)

arkada38/GFUAPI documentation built on May 10, 2019, 1:28 p.m.