labeling_fixed_time: labeling_fixed_time

Description Usage Arguments Value Examples

View source: R/labeling_fixed_time.R

Description

Labeling time series data on fixed horizont Originally described in the book Advances in Financial Machine Learning, Chapter 3.2, p.43-44.

Usage

1
labeling_fixed_time(prices, threshold = 0.01, horizont = 1L)

Arguments

prices

vector of prices

threshold

double, if return greater (lower )than threshold than 1 (-1), other 0

horizont

integer, number of steps to the future

Value

vector of labels

Examples

1
2
data("spy")
head(labeling_fixed_time(spy$close, 0.05, 10000))

MislavSag/mlfinance documentation built on Sept. 14, 2021, 1:11 p.m.