Learn R Programming

quantmod (version 0.4.20)

options.expiry: Calculate Contract Expirations

Description

Return the index of the contract expiration date. The third Friday of the month for options, the last third Friday of the quarter for futures.

Usage

options.expiry(x)
futures.expiry(x)

Value

A numeric vector of values to index on.

Arguments

x

a time-indexed zoo object

Author

Jeffrey A. Ryan

Details

Designed to be used within a charting context via addExpiry, the values returned are based on the description above. Exceptions, though rare, are not accounted for.

References

~put references to the literature/web site here ~

See Also

addExpiry

Examples

Run this code
if (FALSE) {
getSymbols("AAPL")

options.expiry(AAPL)
futures.expiry(AAPL)

AAPL[options.expiry(AAPL)]
}

Run the code above in your browser using DataLab