Rate Hikes and Bond Funds

This program uses python to estimate the impact of rate hikes/cuts on bond funds

DATA SOURCE

Yahoo Finance

YEAR

2022

INDUSTRY

Finance

Scenario Analysis: Rate Hikes and Bond funds

Disclaimer: None of the following is financial advice. It is solely for education and entertainment purposes.

Background

To effectively manage risk and returns, it is important to know how a rate hike/cut will impact the price of bonds in a portfolio.

A major component of a bond's price is its yield.

Bond yields have two major components:

  • The risk free rate
  • The market risk premium

When the Fed changes interest rates, it changes the risk free rate.

Duration is a measure of how sensitive a bond's price is to changes in interest rates. Calculating duration is complicated and beyond the scope of this python program.

Bond funds are required to disclose duration and the information can be accessed through Yahoo Finance.

Application

The following formula is used to calculate how much a bond's price will change in response to a rate cut/hike:


Defining the Function

The function pulls the fund's price, yield, and duration info from Yahoo Finance.

It then uses the above formula to calculate the effect of the rate change on the price of the bond.

Using the function

Given a bond fund and a rate hike, the function will calculate the rest.

Example: 

  • bnd = fund_scenario('bnd', 0.01)

Fund Name: Vanguard Total Bond Market ETF 

  • Current Yield: 1.95% 
  • Fund Maturity: 8.7 
  • Fund Duration: 6.84 
  • If interest rates rise/fall 1.00%, the price is projected to rise/fall by -6.71%.

A list of funds can be used for efficency's sake.

  • securities = ['tlt', 'splb', 'spsb', 'shyg'] 
  • rate_hike = 0.01 
  • for security in securities: fund_scenario(security, rate_hike) 

Fund Name: iShares 20+ Year Treasury Bond 

  • Current Yield: 1.5% 
  • Fund Maturity: 26.28 
  • Fund Duration: 18.9 
  • If interest rates rise/fall 1.00%, the price is projected to rise/fall by -18.62%. 

Fund Name: SPDR Portfolio Long Term Corpor 

  • Current Yield: 2.97% 
  • Fund Maturity: 23.7 
  • Fund Duration: 15.45 
  • If interest rates rise/fall 1.00%, the price is projected to rise/fall by -15.00%. 

Fund Name: SPDR Portfolio Short Term Corpo 

  • Current Yield: 1.34% 
  • Fund Maturity: 1.98 
  • Fund Duration: 1.81 
  • If interest rates rise/fall 1.00%, the price is projected to rise/fall by -1.79%. 

Fund Name: iShares 0-5 Year High Yield Cor 

  • Current Yield: 4.99% 
  • Fund Maturity: 1.87 
  • Fund Duration: 1.81 
  • If interest rates rise/fall 1.00%, the price is projected to rise/fall by -1.72%.

Analysis

As per the above examples, funds with a higher duration are more sensitive to changes in interest rates.

Interestingly, funds with lower interest rates are more sensitive to interest rate changes. A lower interest rate means a 1% rate increase is a higher percentage of the current yield, causing the price to change more dramatically.

© 2023 Andrew Hattling
Powered by Webnode
Create your website for free! This website was made with Webnode. Create your own for free today! Get started