The Most Important Business Object in the Debt Markets

John T Foxworthy
4 min readMay 7, 2021

The Yield Curve with Python Programming

Image by Storm Thorgerson

One of the most critical data structures in the Global Financial Markets is a Yield Curve. Whether you are not taking a risk on the sell-side such as a big bank . . . or taking a risk on the buy-side such as a fund manager . . . the Yield Curve is a compound business object that prices many types of products and is a market indicator.

Starting in the 1980s, a new product in London called Interest Rate Swaps exchanged two sets of cash flows and relied on a series of rates for pricing. The motivation was the Yield Curve to price interest rate products rather than a single point like a corporate bond. Private companies, in particular, wanted more flexibility on their debt arrangements, so a formal product was originated. There is a lot more here, but let’s keep it short.

Fax machines were the first operational device to trade interest rate swaps forty years ago, but soon programming languages like C and especially C++ in the 1990s when interest rate derivative products become popular in the Financial Markets began to code up swaps. Today, Python has taken over in a big way.

I originally got introduced to market curves in 2007 with single and multi–name credit default swaps that traded with fixed income products, but my first implementation was a decade ago with interest rate swaps.

The Yield Curve in each country differs by what is the most represented interest rate product for each maturity point. The most developed market is the US, which has the most options of interest rate products to be placed in a Yield Curve. For ease of implementation, I will use deposit rates and bond rates.

The generic bootstrapping process here . . . can always go back and change the interest rate products to 90-day bond futures, interest rate swaps, etc.

On the trading desk, you would need to grab the specific point on the yield curve to price your swap or bond, which is an interpolation. There are multiple interpolation methods that rely on the practice of numerical mathematics, but here are a few below.

Not bad, but not perfect either . . . but caution is required here to understand the business.

An imporant caveat is the US Treasury Curve. Since the majority of US Dollars and US Debt is outside the US for the past half century since the Eurodollar system was created in the 1970s, you need an FX curve to append and analyze in Euros, Japanese Yen, etc. Non — US participants affect the changes in the US Treasury Curve much more than US participants. Globalization since the 1980s, the variety of debt products invented in the past decades, both publicly traded and privately bilateral, and the Shadow Banking System all play a role in influencing US Yield Curves.

Please also check out my prior write up on Option Adjusted Spreads . . .

--

--

John T Foxworthy

Machine Learning Management Consultant & Data Science Manager with a M.S. in Data Science