Description Usage Arguments Details Value Author(s) References See Also Examples
Constructor function to create an option contract object from component elements, or from related classes.
1 2 3 4 5 6 7 8 | contract(underlying., expiry., strike., right.)
as.contract(x, ...)
## S3 method for class 'character'
as.contract(x, ...)
## S3 method for class 'osi'
as.contract(x, ...)
|
underlying. |
The character string of the underlying symbol. |
expiry. |
The expiration date of the contract. May be a time object of class POSIXt or Date, or a character string coercible to. |
strike. |
Numeric value up to the limit of the OSI. |
right. |
The right confered, ‘p’ or ‘put’ for puts, or ‘c’ or ‘call’ for calls. Case insensitive. |
x |
Object to convert. |
... |
Unused. |
This function allows for automatic generation of arbitrary contract details as required by the OSI identifier format. There are no checks for sanity beyond the input type validation.
An object of type contract
.
Jeffrey A. Ryan
http://www.theocc.com/components/docs/initiatives/symbology/symbology_initiative_v1_8.pdf
1 2 3 4 5 6 7 8 9 | ppl <- contract("PPL", # Pennsylvania Power and Light underlying
"2012-10-20", # Expiration date (third Saturday)
29, # Striking price
"c") # Call
ppl
as.contract("PPL 121020P00029000")
as.contract(as.osi("PPL 121020P00029000"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.