Learn R Programming

FRAPO (version 0.3-7)

trdbilson: Bilson Trend

Description

Calculation of the Bilson Trend as a technical trading indicator.

Usage

trdbilson(y, exponent)

Arguments

y
Objects of classes: numeric, matrix, data.frame, ts, mts, timeSeries, zoo and xts are supported.
exponent
Numeric, the value for $\alpha$ in the equation below.

Value

  • An object of the same class as y, containing the computed Bilson trend values.

concept

  • Bilson
  • Trend
  • Bilson Trend

Details

The Bilson trend is calculated according to the formula: $$z = sign(y) \times |y|^{(1 - |y|^\alpha)}$$

See Also

trdbinary, trdes, trdhp, trdsma, trdwma, capser

Examples

Run this code
data(StockIndex)
y <- StockIndex[, "SP500"]
yret <- diff(log(y))
bilson <- trdbilson(yret, exponent = 2)
head(bilson)

Run the code above in your browser using DataLab