evaluate_momentum_at_window: Evaluate momentum of the price

Description Usage Arguments Details Value

View source: R/momentum_data.R

Description

We propose two estimators for the next price, and define its momentum by whichever is closest: the max of previous prices is momentum +1, and the historical mean is momentum 0

Usage

1
evaluate_momentum_at_window(price_window, next_price, historic_price_mean)

Arguments

price_window

of asset in period t-τ+1,...t

next_price

price of asset in period t+1

historic_price_mean

historic price mean at period t. For some α\in[0,1], the historic price mean is MA_t = α p_t + (1-α) MA_{t-1}, with MA_1 = p_1.

Details

Note that this definition of momentum is scale-invariant, i.e. if all the prices are scaled (and the historic price means computed on these scaled prices) the momentum results are identical.

Value

the momentum defined in the description if all arguments are present. If any of the first three arguments are NA, returns NA.


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