superfluous_filter {atmi}R Documentation

arrange buy and sell signals

Description

Successively arranges buy and sell signals of a trading strategy.

Usage

superfluous_filter(datavec, buy, sell)

Arguments

datavec a vector of security prices.
buy a vector of indices of a data vector, where the buy signals occurred.
sell a vector of indices of a data vector, where the sell signals occurred.

Details

It is not allowed, that a buy and a sell signal occur on the same day.

Value

buy vector of the buy signals.
sell vector of the sell signals.

Author(s)

Waldemar Kemler, Peter Schaffner

See Also

atmirsi, atmimacd, atmimomentum

Examples

datavec<-c(20,25,30,27,22,18,18,24,25,27)
superfluous_filter(datavec, buy=c(NA,2,NA,6), sell=c(26,1,8,9,15,18,NA))

[Package atmi version 1.0 Index]