Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

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)

Arguments

x

a time-indexed zoo object

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.

Value

A numeric vector of values to index on.

Note

There is currently no accounting for holidays that may interfere with the general rule. Additionally all efforts have been focused on US equity and futures markets.

Author(s)

Jeffrey A. Ryan

References

~put references to the literature/web site here ~

See Also

Examples

## Not run: 
getSymbols("AAPL")

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

AAPL[options.expiry(AAPL)]

## End(Not run)

quantmod

Quantitative Financial Modelling Framework

v0.4.18
GPL-3
Authors
Jeffrey A. Ryan [aut, cph], Joshua M. Ulrich [cre, aut], Wouter Thielen [ctb], Paul Teetor [ctb], Steve Bronder [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.