Bond portfolio analytics engine with Macaulay duration, yield-curve visualization, and portfolio composition analysis using live Treasury data.
Comprehensive fixed income analysis tool that models a multi-bond portfolio, computes Macaulay duration for each position, calculates weighted portfolio duration, and overlays live US Treasury yield curve data (5Y, 10Y, 30Y). Built for fixed income analysts who need duration-based risk assessment and yield-curve monitoring in one workflow.
- Bond Portfolio Modeling — Face value, coupon rate, maturity, market price, and YTM per bond
- Macaulay Duration — Present-value-weighted average time to receive cash flows
- Portfolio Duration — Market-value-weighted aggregate duration across all holdings
- Yield Curve Visualization — Fetches live 5Y, 10Y, 30Y Treasury yields and plots movements over time
- Portfolio Composition Charts — Pie chart showing allocation by market value
- Coupon Payment Calculation — Annual coupon payments derived from face value and coupon rate
| Component | Technology |
|---|---|
| Language | Python 3.9+ |
| Data | yfinance (^TNX, ^FVX, ^TYX) |
| Analytics | pandas, NumPy, SciPy |
| Visualization | Matplotlib |
git clone https://github.com/RHarmit/Fixed-Income-Portfolio-Monitoring-Risk-Analysis-Tool.git cd Fixed-Income-Portfolio-Monitoring-Risk-Analysis-Tool pip install yfinance pandas numpy scipy matplotlib python "portfolio Analyst.PY"