8 Essential FRED Indicators to Gauge Market Sentiment (Python)
In this post I wanted to write about some of the essential indicators provided by the St. Louis Federal Reserve (FRED) that can be easily incorporated in your portfolio management plans, asset allocation decisions and trading strategies to gauge market sentiment.
We will discuss what these indices represent, their significance for quant finance and how they may be used in your trading strategies. In addition, I’m going to show you how to easily access them in Python for free.
But let’s cut the chit-chat and jump right in!
This story is solely for general information purposes, and should not be relied upon for trading recommendations or financial advice. Source code and information is provided for educational purposes only, and should not be relied upon to make an investment decision. Please review my full cautionary guidance before continuing.
CBOE Volatility Index: VIX
Overview
The CBOE Volatility Index, known as the VIX, is a market index representing provided by the Chicago Board of Options Exchange and is a measure of market volatility over the coming 30 days. It is calculated using the bid and ask prices of S&P 500 index options. The VIX FRED data is updated daily on market close. The CBOE also provides more volatility indexes for target markets such as NASDAQ 100 or Russell 1000.
How to use it
According to Investopedia.com, a VIX higher than 30 corresponds to more volatile markets whereas a VIX below 20 indicates more stable markets. Changes in this index may prompt you to adapt your portfolio diversification or asset allocation to shift into assets and market sectors less affected by market volatility. When dealing with index spikes, you may want to even consider halting trading altogether to not affect trading strategies that rely on low market volatility.
The chart below shows the VIX over the last 5 years. You can clearly see the effect of the 2020 Coronavirus Market Crash on the volatility of the markets.
Chicago Board Options Exchange, CBOE Volatility Index: VIX [VIXCLS], retrieved from FRED (March 28, 2024)
How to retrieve it
You can easily retrieve this indicator for free using the pandas datareader library using a one-liner. All you need to do is specify the FRED code, set ‘fred’ as the data source and specify a start and end date:
import pandas_datareader.data as pdr
data_df = pdr.DataReader('VIXCLS', 'fred', "2019-01-01", "2020-01-01")