Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
pulls csv files from the CBOE and converts them to xts
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
You can’t perform that action at this time.