-
-
Save joshuaulrich/3915891 to your computer and use it in GitHub Desktop.
pulls csv files from the CBOE and converts them to xts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(quantmod) | |
# we're pulling the Google VIX index (VXGOG) but this also works for VXAPL, VXGS etc. | |
# see http://www.cboe.com/micro/equityvix/introduction.aspx | |
url <- "http://www.cboe.com/publish/ScheduledTask/mktdata/datahouse/VXGOGDailyPrices.csv" | |
# use read.zoo to read the data directly into a zoo object | |
z <- read.zoo(url, header=TRUE, sep=",", skip=1, FUN=as.Date, format="%m/%d/%Y") | |
# convert to xts | |
x <- xts(z, frequency="d") | |
chart_Series(x) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment