predict_price_LOAD: predicts price for asset according to LOAD strategy

Description Usage Arguments Value Note

View source: R/backtest_strategy.R

Description

predicts next price for one asset given previous prices according to LOAD strategy (see paper mentioned in description of backtest_LOAD)

Usage

1
2
3
4
5
6
predict_price_LOAD(
  prev_prices,
  historic_mean,
  regularization_factor,
  momentum_threshold
)

Arguments

prev_prices

a numeric vector of previous prices

historic_mean

The historic mean of the 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.

Value

the predicted next price

Note

NO TYPE CHECKING IS PERFORMED... be careful


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