book
Checkout our new book! Hands on AI Trading with Python, QuantConnect, and AWS Learn More arrow

Federal Reserve Bank of St Louis

US Interest Rate

Introduction

The US Interest Rate dataset provides the primary credit rate from the Federal Open Market Committee (FOMC). The data starts in January 2003 and is updated on a daily frequency. This dataset is created using information from the FOMC meetings.

For more information about the US Interest Rate dataset, including CLI commands and pricing, see the dataset listing.

About the Provider

The Federal Reserve Bank of St. Louis, often referred to as the St. Louis Fed, is one of the 12 regional banks that make up the United States Federal Reserve System. It is responsible for the Eighth Federal Reserve District, which includes the states of Arkansas, Illinois, Indiana, Kentucky, Mississippi, Missouri, and Tennessee, as well as portions of eastern Kansas and southern Illinois.

The St. Louis Fed, like other regional banks, participates in the formulation and implementation of monetary policy in the United States. It contributes to the Federal Open Market Committee (FOMC) meetings, where key decisions regarding interest rates and other monetary policy tools are made.

Getting Started

The following snippet demonstrates how to access data from the US Interest Rate dataset:

Select Language:
interest_rate = self.risk_free_interest_rate_model.get_interest_rate(self.time)

To find the average interest rate between two dates, call the GetRiskFreeRate method.

Select Language:
avg_risk_free_rate = RiskFreeInterestRateModelExtensions.get_risk_free_rate(
    self.risk_free_interest_rate_model, 
    self.time-timedelta(365), self.time
)

Data Summary

The following table describes the dataset properties:

PropertyValue
Start DateJanuary 2003
Data DensitySparse
ResolutionDaily
TimezoneNew York

Example Applications

The US Interest Rate dataset provides an important economic indicator. Examples include the following applications:

  • Accurately calculating indicators that are a function of the risk free rate, like Sharpe ratios.
  • Forming a portfolio of assets that have a history of outperforming when the rate is increasing/decreasing.
  • Canceling orders in a Risk Management model when the expected return of the asset is less than the risk-free rate.

For more example algorithms, see Examples.

Requesting Data

You don't need any special code to request US Interest Rate data. QCAlgorithm automatically subscribes to the data by setting its default risk free interest rate model.

Accessing Data

To get the current US Interest Rate data, call the get_interest_rate method of the RiskFreeInterestRateModel object with the current time.

Select Language:
interest_rate = self.risk_free_interest_rate_model.get_interest_rate(self.time)

Historical Data

To get the average risk free interest rate for a window of time, call the get_risk_free_rate method with the start date and end date.

Select Language:
risk_free_rate = RiskFreeInterestRateModelExtensions.get_risk_free_rate(
    self.risk_free_interest_rate_model, 
    self.time-timedelta(365), self.time
)

To get the average risk free interest rate for a set of dates, call the get_average_risk_free_rate method with the list of dates.

Select Language:
risk_free_rate = RiskFreeInterestRateModelExtensions.get_average_risk_free_rate(
    self.risk_free_interest_rate_model, 
    [self.time, self.time-timedelta(180), self.time-timedelta(365)]
)

Example Applications

The US Interest Rate dataset provides an important economic indicator. Examples include the following applications:

  • Accurately calculating indicators that are a function of the risk free rate, like Sharpe ratios.
  • Forming a portfolio of assets that have a history of outperforming when the rate is increasing/decreasing.
  • Canceling orders in a Risk Management model when the expected return of the asset is less than the risk-free rate.

For more example algorithms, see Examples.

You can also see our Videos. You can also get in touch with us via Discord.

Did you find this page helpful?

Contribute to the documentation: