Bond Market Research
A research assistant that analyzes bond market data, credit spreads, and macro news to publish a client-ready weekly publication.
Overview
This project is an AI-powered fixed income research assistant that curates a weekly market analysis report. It starts with structured data collection, synthesizes market-moving events, treasury curve dynamics, and credit spread movements into a publication-quality report, ready for clients.
Why I Built This
While talking with a Sloan classmate who came from Public Credit, they mentioned that they used to spend an entire day each week to manually produce a bond market summary for clients. Their workflow required pulling Treasury yields and credit spreads from Bloomberg Terminal, reading through dozens of news sources to identify Fed speaker stances and geopolitical events, synthesize the narrative into structured thoughts, and format the final publication. He believed that AI could handle 80% of this work but didn't know how to exactly create a project to do it.
We sat down on a Saturday morning to map out his exact workflow step by step and automated every stage.
Approach
This project is a Python pipeline that runs on a weekly GitHub Actions schedule.
- Parallel data collection: Five async workers pull the week's treasury yields, credit spreads, and MTD total returns from the Federal Reserve Economic Data (FRED) database while a Tavily API searches Fed speaker statements and geopolitical events from the week's news.
- Validation gate: A structured JSON payload is assembled and validated so no stale or out-of-range figures reach the report.
- Report synthesis: A senior fixed income persona writes a the "Word on the Desk" intro and 5–7 detailed bullets, based strictly on the validated payload and styled based on sample reports we fed it.
- QA fact-check: A second Claude call verifies every numeric figure against the payload and triggers a retry with flagged issues before the report is sent.
- Report generation: ReportLab assembles the final report with a KPI strip at the top of the report, yield curve chart, MTD returns chart, and data appendix with full sources.
Tech stack: Python, GitHub Actions, FRED API, Tavily, Anthropic Claude API, ReportLab, Matplotlib
Outcome
We were able to create a full analyst day into an automated, institutionally-styled report delivered every Friday evening, after the week's Treasury data posts.
Next Credit Project: As a next step, we plan on creating a Portfolio Attribution Engine that matches excess returns of a bond portfolio against a benchmark index and uses a machine learning model to identify the dominant factors (credit quality, sector, duration) for a given period and quantifies each factor's contribution to the excess returns.