NextBusinessDay: Next Business Day

Description Usage Arguments Value Note Author(s) Examples

View source: R/miscellaneous.R

Description

Compute the next business day on the New York Stock Exchange (NYSE) that follows at the end of a time series. The function is mainly used internally by functions within this package, but may be useful for other purposes as well.

Usage

1
NextBusinessDay(x, exchange = "UnitedStates/NYSE")

Arguments

x

An object of class zoo.

exchange

A string identifying one of the supported QuantLib calendars. Default is "UnitedStates/NYSE". See Details in Calendars for further options.

Value

An object of class date.

Note

Objects of other classes than zoo may also be supplied, but are not tested. The function may work for any class for which function end() is defined. Call methods("end") to see for which classes this function is defined.

Author(s)

Bernhard Eder

Examples

1
2
3
4
5
6
7
8
9
# Load returns
data("CRSPday_zoo")
y <- CRSPday_zoo

# End of the sample
end(y)

# Next business day
NextBusinessDay(y)

LFUrmutils documentation built on Jan. 3, 2020, 3 a.m.