predict_window_momentum_LOAD: predicts momentum for asset according to LOAD strategy

Description Usage Arguments Value Note

View source: R/momentum_prediction.R

Description

predicts next momentum for one asset given previous prices according to LOAD strategy (see paper mentioned in description of backtest_LOAD), momentu is defined in evaluate_momentum_at_window.

Usage

1
2
3
4
5
6
predict_window_momentum_LOAD(
  prev_prices,
  regularization_factor,
  momentum_threshold,
  min_var = .Machine$double.eps^0.5
)

Arguments

prev_prices

a numeric vector of previous prices

regularization_factor

λ in the referenced paper, the regularization coeffecient for weight decay when regressing the prices in the recent time window. Must be non-negative

momentum_threshold

η in the referenced paper. If the regressed slope is greater than η we say the stock has momentum. This must be greater than 0.

min_var

(OPTIONAL) minimum variance to be determined non-constant

Value

the predicted next momentum (1 or 0)

Note

NO TYPE CHECKING IS PERFORMED... be careful


benSepanski/pfselect documentation built on May 1, 2020, 1:57 p.m.