pre_correct: Calculate correct rate of buy and sell signal, based on stock...

Description Usage Arguments Value

Description

Calculate correct rate of buy and sell signal, based on stock price

Usage

1
pre_correct(stock.price = NA, strategy.b = NA, strategy.s = NA)

Arguments

stock.price

a one dimension vector of numeric data, which represents a time series of stock price.

strategy.b

the trade signal of buy operation consists of a one dimension vector contians integer values of -1,0,1, of which '-1' equals to 'sell','0' equals to 'hold' and '1' equals to 'buy'.

strategy.s

the trade signal of sell operation consists of a one dimension vector contians integer values of -1,0,1, of which '-1' equals to 'sell','0' equals to 'hold' and '1' equals to 'buy'.

Value

a vector with two values represent


purplezippo/quantler documentation built on May 15, 2019, 4:27 p.m.