Retrieving the VIX term structure in R

  Much of my time lately has gone into analyzing and trading products in the volatility complex.  As a result, I regularly watch the VIX term structure for continuations or deviations from trend.  To make analysis simpler, I’ve written some R code that rips the term structure off the CBOE VIX term structure page and parses it into a table with proper typing.  You can view this code in the embedded gist below:

1 Comment

  1. Garrett

    You’ll likely be interested in the getSymbols.cfe method in my qmao package (

    The following comes from the examples section of ?getSymbols.cfe

    getSymbols(c(“VX_U11”, “VX_V11”),src=’cfe’)
    #all contracts expiring in 2010 and 2011.
    #getSymbols(“VX”,Months=1:12,Years=10:11,src=’cfe’) #same
    #The contracts expiring this month:

    If you are not familiar with quantmod/getSymbols, by default, it assigns the data to an environment (.GlobalEnv by default) instead of returning it. So, e.g. after running getSymbols(“VX_H12”) the data will be in a variable named VX_H12.

Leave a Comment

Your email address will not be published. Required fields are marked *