fixed-income

Price bonds and compute duration, convexity, and DV01 with Python.

33|6|Updated Mar 17, 2026
One-click install
npx skills add https://github.com/xjtulyc/awesome-rosetta-skills --skill fixed-income-xjtulyc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: fixed-income
Source: https://github.com/xjtulyc/awesome-rosetta-skills/tree/main/skills/08-finance-academic/fixed-income
Command: npx skills add https://github.com/xjtulyc/awesome-rosetta-skills --skill fixed-income-xjtulyc

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires numpy, scipy, pandas, matplotlib.

What problem does it solve?

Fixed income analysis is difficult to do correctly by hand, especially when you need accurate bond pricing, risk measures, yield curve construction, and credit spread modeling.

Core Features & Use Cases

  • Bond pricing & risk metrics: compute bond prices, YTM, modified duration, convexity, and DV01.
  • Yield curve construction: bootstrap spot/zero rates from par yields and derive discount factors and forward rates.
  • Curve modeling & credit spread analysis: fit Nelson-Siegel (and optionally Svensson) yield curve models and estimate credit spreads via hazard-rate CDS approximations.

Quick Start

Use the fixed-income skill to price a 10Y bond, compute duration/convexity/DV01, bootstrap the spot curve from par yields, and fit a Nelson-Siegel curve for those observed yields.

Frequently Asked Questions about fixed-income

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I calculate bond duration, convexity, and DV01 in Python?

You can calculate bond duration, convexity, and DV01 using Python with numpy and scipy for numerical pricing. This process derives fixed-income risk metrics directly from bond prices and yield data.

How do I bootstrap spot rates and forward rates from par yields?

Bootstrapping spot rates and forward rates from par yields uses Python with numpy and scipy to derive discount factors through numerical interpolation. This constructs the spot curve for subsequent financial analysis.

What is the Nelson-Siegel model and how do I fit a yield curve with it?

The Nelson-Siegel model is a parametric method for yield curve fitting that constructs smooth forward rate curves. You fit it using scipy optimization workflows to match observed market yields.

Can I estimate credit spreads and CDS pricing using numpy and scipy?

Yes, you can estimate credit spreads and CDS pricing using numpy and scipy through hazard-rate approximations. This models the default probability and derives the corresponding spread.

How do I visualize a bootstrapped yield curve alongside the original par yields?

You visualize a bootstrapped yield curve alongside original par yields by using matplotlib for plotting and pandas for organizing the tabular pricing data. This generates visual outputs for fixed-income analysis.