eomData: get the latest value in the month

Description Usage Arguments Value Examples

View source: R/auxilary.R

Description

get the latest value in the month

Usage

1
eomData(xTs = NULL)

Arguments

xTs

xts object (currently) eomData only works on single column xtx objects

Value

xts object of the last observation with the month date rounded up to the last day of the month

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run: 
# library(xts)
# > xTs <- xts(c(1,NA_real_,2), zoo::as.Date(c(1,11,21)))
# > xTs
#            [,1]
# 1970-01-02    1
# 1970-01-12   NA
# 1970-01-22    2
#
# > eomData(xTs = xTs)
#            [,1]
# 1970-01-31    2

## End(Not run)

AndreMikulec/tradeModel documentation built on May 23, 2019, 8 p.m.