naFillFrom: Function to replace NAs on last trading day of month with...

Description Usage Arguments Note

Description

Function to replace NAs on last trading day of month with value from previous or next trading day, up to 'ndays'. Only replaces data on endpoints (option for start points). Within-period NAs will not be filled.

Usage

1
2
naFillFrom(df, firstDay = FALSE, fromNext = FALSE, ndays = 2,
  ind = NULL, on = "months")

Arguments

df

xts object containing price series of assets to rank. Every column will be treated as an independent asset.

firstDay

If TRUE, replaces NAs on first trading day of month.

fromNext

If True, replaces NAs with value from next business day.

ndays

The maximum number of days from NA from which to find data.

Note

NEED TO REMOVE Automatic NYSE trading days.


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