dual_momentum: Implements the dual momentum strategy as implied by...

Description Usage Arguments

Description

If no interest bearing cash instrument is provided, then it is possible that all assets will have negative momentum. In such case, the function will go to cash and return no interest (daily returns = 0)

Usage

1
dual_momentum(prices, assets, relmom, absmom)

Arguments

prices

An xts of prices for all assets

assets

A vector of the asset symbols to use as the module's dual_momentum universe. All symbols should correspond to a column in the prices xts. If an interest bearing cash instrument is desired, then it should be included here also and always produce a positive momentum via interest.

relmom

Either a numeric or an xts containing the momentum values for all assets used to compare between assets (relative). If a numeric value, then it is assumed to be the momentum period in days and a momentum matrix will be computed from the prices matrix.

absmom

Either a numeric or an xts containing the momentum values for all assets used to apply the absolute momentum filter. An asset must have positive momentum to be considered. If a numeric value, then it is assumed to be the momentum period in days and a momentum matrix will be computed from the prices matrix.


jeanmarcgp/xtsanalytics documentation built on May 19, 2019, 12:38 a.m.