predict_momentum_LOAD: Test momentum prediction using LOAD strategy

Description Usage Arguments Value

View source: R/momentum_prediction.R

Description

Test LOAD's strategy of predicting momentum. Returns each momentum prediction. See evaluate_momentum_at_window for a description of momentum

Usage

1
2
3
4
5
6
7
predict_momentum_LOAD(
  aggregated_momentum_data,
  regularization_factor,
  momentum_threshold,
  max_cv_window = NULL,
  momentum_colname = "momentum"
)

Arguments

aggregated_momentum_data

A tibble of class @eval{AGG_WINDOW_CLASS_NAME} as returned from aggregate_price_and_mean_windows, with an added column of column name momentum_colname holding the momentum.

regularization_factor

A regularization factor used in the LOAD prediction, if a vector then cross-validates (at each step choosing the factor that had the least error over previous time, random first time)

momentum_threshold

The threshold to be classified as with momentum. If a vector then cross-validates. (at each step choosing the factor that had the least error over previous time, random first time)

max_cv_window

If NULL then checks over all past error, otherwise only checks the past max_cv_window time steps to determine error.

momentum_colname

The name of the column holding the true momentum values (as a string), defaults to "momentum". Should be nonnegative momentum values (see evaluate_momentum_at_window)

Value

aggregated_momentum_data with added columns: LOAD_prediction holding LOAD's predicted momentum for that time, regularization_factor holding the regularization factor used in that prediction, momentum_threshold holding the momentum threshold used in that prediction.


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