trading.signals:
Discretize a set of values into a set of trading signals
Description
This function transforms a set of numeric values into a set of trading
signals according to two thresholds: one that establishes the limit
above which any value will be transformed into a buy signal ('b'), and
the other that sets the value below which we have a sell signal
('s'). Between the two thresholds we will have a hold signal ('h').
Usage
trading.signals(vs, b.t, s.t)
Arguments
vs
A vector with numeric values
b.t
A number representing the buy threshold
s.t
A number representing the sell threshold
Value
A factor with three possible values 'b' (buy), 's' (sell) or 'h' (hold)
References
Torgo, L. (2010) Data Mining using R: learning with case studies,
CRC Press (ISBN: 9781439810187).