momRankMembers: Function for ranking assets on momentum that require index...

Description Usage Arguments Note

Description

Function to rank assets based on price momentum, but only consider those that have index membership at *time of ranking*. Function performs ranking on last *trading day* of period. Future versions to include the option to perform rankings at different days of period/month.

Usage

1
2
momRankMembers(df, n = 6, s = 0, hist_members = newHM, on = "months",
  ind = NULL)

Arguments

df

xts object containing price series of assets to rank. Every column will be treated as an independent asset. Column names of assets to rank must also appear in column names of 'hist_members'

n

Formation period e.g. '6' with ‘on'=months’ for 6 month formation period. (integer)

s

Skip period (integer). This is the time between the end of formation period and ranking (and presumably investment) date).

hist_members

xts object containing membership data. Column names are assumed to be asset names corresponding to those in df. Note: All entries not NA are assumed to represent active membership.

on

Desired return periodicity (string). Passed to xts::endpoints.

Note

NEED TO REMOVE Automatic NYSE trading days.


T-Marty/trademartyr documentation built on May 31, 2019, 5:10 p.m.