top of page

US Elections and VIX Term Structures

Updated: Oct 9, 2020

US elections are a major event for investors across the globe. US markets offer diversified and attractive opportunities to investors across the globe so that it is natural that the financial world will scrutinize the market with higher attention during political change season. This post is inspired by this other post regarding VIX term structures and elections periods.

VIX futures can provide a good indication on the expected volatility generated by the outcome of the elections or the lack of a clear outcome. Using Quantconnect´s research environment we can call for the history of VIX futures:

First we import some necessary modules and set the shape of the plots we are going to use:

import seaborn as sns
import numpy as np
import matplotlib.dates as mdates
import matplotlib.pyplot as plt
from datetime import time
from IPython.core.display import HTML

qb = QuantBook()
#Center the plots in Jupyter Notebook:
HTML("""<style>.output_png {display: table-cell;text-align: center;vertical-align: middle;}</style>""")

Future histories can be pulled using "AddFuture" method, we can get all the futures contracts expiring 500 days from today and we will get the history for these contracts in the past 90 days:

future = qb.AddFuture(Futures.Indices.VIX)
future.SetFilter(timedelta(0), timedelta(days=500))
start = - timedelta(days=90) 
end =
future_history = qb.GetFutureHistory(future.Symbol, start, end)
history = future_history.GetAllData()[['close']]

By default this history will be in minute resolution, and this is probably too much detail for our analysis, so we can remove unneeded data by splitting the time and the date in data times and expiry dates and get only the 23:00 data for each day, acting as a proxy for end of day closing price of the future.

close_prices = history.reset_index()
close_prices['hour'] = close_prices['time'].dt.time
close_prices['Expiry'] = close_prices['expiry']
close_prices['date'] = close_prices['time']
close_prices = close_prices[ close_prices['hour'] == time(23,0,0) ]
close_prices.drop(columns = ['time', 'expiry', 'symbol', 'hour'], inplace=True)
close_prices.set_index('Expiry', inplace = True)

The dataframe obtained after this process is this, we have the "closing" prices in a daily series for each of the futures contract expiry dates:

We will next generate a history of the prices according to contract expirations dates. We need to know the last date we have in the dataframe and then we will request data for that date (T minus 0) and every 7 days after that (T minus 7 to T minus 21):

last_date = close_prices['date'].iloc[-1]
past_days = [0, 7, 14, 21]
vix_futures_structure = {}

for past in past_days:
    req_dates = close_prices['date'] == (last_date - timedelta(days=past))
    vix_futures_structure[past] = close_prices[['close']][req_dates]
    vix_futures_structure[past].columns = ['T -'+str(past)]
all_dates = pd.concat(vix_futures_structure.values(), axis=1).dropna()

The closing price structure for VIX futures for the past three weeks for all expiry dates is this:

The price structure can be plotted using pandas plot (matplotlib) utilities, we are importing the colormap module to use more distinguishable colors and reduce the difficulty of reading the plot:

from matplotlib import cm
plt.rcParams["figure.figsize"] = (14, 7)'dark_background')
cmap = cm.get_cmap('Spectral')
all_dates.plot(cmap = cmap)
plt.xlabel('Expiration Date')
monthyearFmt = mdates.DateFormatter('%Y %B')
_ = plt.xticks(rotation=45)

This code yields the following rolling futures structure:

As time has passed since three weeks ago, at time T-21 days, the VIX futures price has been steadily declining, with the price peak moving from end of October 2020 to November 2020 and dropping a little bit in the process.

This is what the market is facing today, what was the shape of these structures in the past elections? We can just modify the start date in the code we have presented:

The time structure of the futures was inverted. Volatility futures increased in price from T-21 days to October 1st 2016, peaking at T-14 and settling back. Then the medium term futures hinted at slightly increasing volatilities. The medium term structure can be explained by the current COVID19 reaction, when a vaccine or reliable treatmen for the virus is possibly expected. The inverted time-wise structure is more difficult to explain.

And before the 2012 elections:

This 2020 elections period seems to be unusual in terms of volatility hedging and risk expectations. A volatility level similar to that of the 2012 elections is expected beginning 2021, in this case in a ramp-down movement, compared to the expected ramp-ups of the 2012 and 2016 elections.

And now, to finalize, what did really happen with the VIX in these 2 past elections, and where are we today?

This is a month-to-month overlap of the VIX value for the past two elections and the current year as of publication. Are the futures showing signs of overreaction? It is a possibility that the convergence of the COVID19 effects in the stock market together with the uncertainty of the elections are resulting in a distorted perception of the post-election volatility and masking the situation at the end of the year. In the two previous elections VIX futures prices one month before the election undershoot the election date volatility as reported by VIX. It is a possibility that even with the current future valley election volatility together with COVID19 volatility are under-priced and that higher volatility will manifest from today to election date.

This coming election period is very unclear for the stock market, there are too many additional effects coexisting. For the time being remember that no information in constitutes financial advice, we do not hold positions in any of the companies or assets that we mention in our posts at the time of posting. If you are in need of asset management model development, deployment, verification or validation do not hesitate and contact us.

16 views0 comments

Recent Posts

See All


bottom of page