FinancialInstrument (version 1.3.1)

expires.xts: xts expires extraction method

Description

determines (or estimates) the expiration from an xts object by either finding the last row that is not NA or by passing the name/symbol of the xts object to expires.character

Usage

# S3 method for xts
expires(x, Date, expired = TRUE, silent = FALSE,
  src = c("data", "instrument"), ...)

Arguments

src

either “data” or “instrument”.

Value

If src is “data”, the returned value will be the index of the last price that is not NA (price is determined by quantmod:::getPrice. getPrice arguments symbol and prefer can be passed through dots.)

If src is “instrument” the symbol of the xts object will be passed to expires.character

See Also

expires.instrument, expires