label_meta: Meta labeling, including three options: triple barriers,...

Description Usage Arguments Value Author(s)

View source: R/labels.R

Description

Meta labeling, including three options: triple barriers, upper and vertical barriers, and lower and vertical barriers.

Usage

1
label_meta(x, events, ptSl, n_ex = 0)

Arguments

x

a vector of prices series to be labeled.

events

a dataframe that has the following columns:

  • t0: event's starting time index.

  • t1: event's ending time index; if t1==Inf then no vertical barrier, i.e., last observation in x is the vertical barrier.

  • trgt: the unit absolute return used to set up the upper and lower barriers.

  • side: 0: both upper and lower barriers; 1: only upper; -1: only lower.

ptSl

a vector of two multipliers for the upper and lower barriers, respectively.

n_ex

number of excluded observations at the begining of x; default is 0.

Value

data frame with the following columns:

Author(s)

Larry Lei Hua


larryleihua/fmlr documentation built on Jan. 31, 2020, 8:55 a.m.