tte: Calculate Time To Expiration

Description Usage Arguments Details Value Note Author(s) References See Also Examples

View source: R/osi.R

Description

Find number of calendar days until expiration given a contract specification.

Usage

1
tte(osi, from = Sys.Date())

Arguments

osi

A character string formatted per OSI specification or osi object.

from

A time object or string in CCYY-MM-DD format to be used as reference date.

Details

This calculates the difference between an option contract's expiration date and the date indicated with from.

Value

An integer number of days until expiration. May be negative if from is before expiration.

Note

The value returned is in calendar days, not trading days.

Author(s)

Jeffrey A. Ryan

References

OSI Specification

See Also

osi

Examples

1
tte("AAPL  120122C00450000","2011-12-03")

joshuaulrich/greeks documentation built on May 19, 2019, 8:54 p.m.