Description Usage Arguments Details Value See Also
This function is the creator for an S3 class of structured dataset on options.
1 2 | addOptions(stocksData, optionNames = NULL, underlyingNames, Date = NULL,
impVol, strike, moneyness, callput, maturity)
|
stocksData |
a |
optionNames |
a character vector, the symbols of the options. |
underlyingNames |
a character vector of the same length as |
Date |
a Date vector, which specifies the dates of options data. |
impVol |
the implied volatility of each option for each date. |
strike, moneyness |
a numerical vector that specifies the strike or moneyness of the options. |
callput |
a character vector which can either take |
maturity |
time to maturity of the options. |
This function builds an options dataset by organizing raw options data and underlying stocks data
into a structured form.
If optionsNames==NULL
, the options will be automatically named as "OP1"
, "OP2"
, and so on.
If Date==NULL
, the options data is regarded as in reverse chronological order with the same dates as in stocksData
.
An object of class optionsData
, which stores the structured data of options and stocks.
stocks
for building stocksData
objects.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.