A collection of Python tools and visualizations for exploring core fixed-income concepts, including bond pricing, duration, convexity, spot rates, and implied forward rates.
This repository contains scripts developed to apply fixed-income theory programmatically and visualize how changes in interest rates affect bond prices and risk measures.
The duration_convexity directory contains tools for analyzing bond price sensitivity to changes in yield, including:
- Macaulay duration
- Modified duration
- Convexity
- Price-yield relationships
- Duration and convexity approximations
- Comparisons across bonds with different characteristics
The term_structure directory contains tools for working with the term structure of interest rates, including:
- Spot-rate calculations
- Implied forward-rate calculations
- Multi-period term structure relationships
The examples directory contains example output and presentation material generated from the analysis.
- Python
- NumPy
- pandas
- Matplotlib
- SciPy
Install the required Python packages with:
pip install -r requirements.txt