Description Usage Arguments Details Value Note Author(s) References See Also Examples
View source: R/getSymbols.cfe.R
Load Data from the CBOE Futures Exchange website
1 2 3 4 |
Symbols |
vector of names of instruments formated
like e.g. "VX_U09", "GV_Z10", etc. OR if |
Months |
optional vector of months. Can be numerical
or the names of the months in English. If any element of
|
Years |
optional vector of years. Can either be 2 or
4 digits each. If any element of |
from |
retrieve data no earlier than this data (2004-06-01) |
to |
retrieve data through this data (Sys.Date()) |
nonzero.close |
if |
rescale |
Should data from before March 26, 2007 be
adjusted? See Details and References. Only applicable if
|
env |
where to create objects (.GlobalEnv) |
return.class |
class of returned object |
index.class |
class of returned object index (xts only) |
... |
additional arguments |
Download Symbols
to specified env
from
‘cfe.cboe.com’. This method is not to be called
directly; instead, a call to getSymbols(symbols,
src='cfe')
will in turn call this method. This is a
wrapper to get end-of-day historical data for the futures
that are, or have been, listed on the CBOE Futures
Exchange.
Symbols
can be a vector of symbols formatted like
VX_U11, or GV_M10. Alternatively, the symbol roots can be
used (e.g. 'VX', 'GV') and values can be provided for
Months
and Years
. If roots are provided,
but Years
and Months
is NULL
, the
current year as reported by Sys.Date()
will be
used, and either the current month, or, for "VT" and "VA"
(which are quarterly contracts), the month of the end of
the last quarter, or, for "RPXC", (which is biannual),
the most recent March or Sep contract. See examples.
The raw data will contain zero values for the first few
rows. Also, the last row will have zeros in every column
except the ‘Settle’ column. By default, these
rows, along with any other rows that have a zero Close
price will be removed. If you would like to keep these
rows (e.g. if you need the final settlement value) use
nonzero.close=FALSE
.
On March 26, 2007, The prices of VX and DV futures
contracts were rescaled (divided by 10) “to bring
the traded futures contract prices in line with the
underlying index values...” If rescale=TRUE
(Default) prices for these instruments from prior to
March 26, 2007 will be divided by 10 ("rescaled"). See
References.
will load data into the specified environment – one object for each file downloaded.
Currently listed contracts:
VSW - CBOE Short Term Volatility Index Futures (VSW)
VX - CBOE S&P 500 Volatility Index (VIX) Futures
VU - CBOE Russell 2000 Volatility Index (RVX) Futures
VN - CBOE Nasdaq-100 Volatility Index (VXN) Futures (was delisted in 2009 and relisted in July 2012)
VA - S&P 500 Variance Futures (product launched December 10th, 2012)
VXEM - CBOE Emerging Markets ETF Volatility Index (VXEEM) Security Futures
VXEW - CBOE Brazil ETF Volatility Index (VXEWZ) Security Futures
GV - CBOE Gold ETF Volatility Index (GVZ) Security Futures
OV - CBOE Crude Oil ETF Volatility Index (OVX) Security Futures
Delisted contracts:
VM - CBOE Mini-VIX Futures
RPXC - Radar Logic 28-Day Real Estate Index (RPX) Future
VT - CBOE S&P 500 3-Month Variance Futures
BX - CBOE S&P 500 BuyWrite Index Futures (BX)
VR - RUSSELL 2000 Volatility Index Futures (VR)
VA - CBOE S&P 500 12-Month Variance Futures (VA) (product delisted March 18, 2011)
DV - CBOE DJIA Volatility Index (DV)
Garrett See, based on Jeff Ryan's quantmod framework
http://cfe.cboe.com/Data/HistoricalData.aspx#VT,
http://tinyurl.com/CFE-VIX-VXN-Rescaling
remove_zero_rows
for removing rows where a
column has zero values. getSymbols
,
setSymbolLookup
1 2 3 4 5 6 7 8 9 10 11 12 | ## Not run:
getSymbols(c("VX_U11", "VX_V11"),src='cfe')
#all contracts expiring in 2010 and 2011.
getSymbols("VX",Months=1:12,Years=2010:2011,src='cfe')
#getSymbols("VX",Months=1:12,Years=10:11,src='cfe') #same
#The contracts expiring this month:
getSymbols(c("VM","GV"),src='cfe')
setSymbolLookup(VX='cfe') #so we don't have to specify src anymore
getSymbols("VX",Months=1:3,Years=2005)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.