Skip to main content
command CX Codex official · Anthropic

analyze-swap-curve — Claude Code command: curve analysis

The analyze-swap-curve Claude Code command analyzes swap curves against government yields and inflation breakevens. It calculates spreads and curve metrics, then identifies possible trades.

Apache-2.0 ★ 41,441 updated 2026-09-21

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin marketplace add anthropics/financial-services
/plugin install lseg@claude-for-financial-services
Open on GitHub

What analyze-swap-curve does

The command builds an interest rate swap curve and compares it with government yields and inflation breakevens. It uses LSEG tools ir_swap, interest_rate_curve, and inflation_curve to retrieve rates, DV01, and inflation data. The swap-curve-strategy skill supplies domain knowledge.

It first finds swap templates, then prices standard tenors: 2Y, 5Y, 7Y, 10Y, 20Y, and 30Y. The analysis calculates government spreads, real swap rates, 2s10s and 5s30s slopes, and the 2s5s10s butterfly. Output includes a curve table and trade ideas with DV01-neutral ratios.

Currency is required; the index and valuation date are optional. The date defaults to today. Trade ideas are based on current levels relative to historical norms.

What it helps with

  • build a swap curve for a selected currency
  • compare swap rates with government yields
  • calculate real swap rates and inflation breakevens
  • measure curve slopes and the 2s5s10s butterfly
  • compare trade ideas using DV01-neutral ratios

Example prompts for the agent

  • Analyze the EUR swap curve with the ESTR index.
  • Compare swap and government curves for USD.
  • Calculate the GBP curve for valuation date 2025-01-15.

How to install analyze-swap-curve

1Plugin marketplace

/plugin marketplace add anthropics/financial-services
/plugin install lseg@claude-for-financial-services

2Manually: put the files in place

.claude/commands/analyze-swap-curve.md

Call it with /analyze-swap-curve. For all projects use ~/.claude/commands/

Questions about analyze-swap-curve

How do I install analyze-swap-curve in Claude Code?

Run /plugin marketplace add anthropics/financial-services, then run /plugin install lseg@claude-for-financial-services.

What does analyze-swap-curve do?

It builds a swap curve, overlays government yields and inflation breakevens, and calculates curve metrics and trade ideas.

What does analyze-swap-curve need to run?

It needs the LSEG tools ir_swap, interest_rate_curve, and inflation_curve, plus the swap-curve-strategy skill. A currency is required; an index is optional.

Source text

analyze-swap-curve.md · Apache-2.0
---
description: Analyze the swap curve with government and inflation overlays to identify curve trade opportunities
argument-hint: "<currency e.g. EUR> [index e.g. ESTR]"
---

# Analyze Swap Curve

> This command uses LSEG swap pricing, interest rate curves, and inflation curve tools. See [CONNECTORS.md](../CONNECTORS.md) for available tools.

Build and analyze the interest rate swap curve, overlay government yields and inflation breakevens, and identify curve trade opportunities.

See the **swap-curve-strategy** skill for domain knowledge on curve analysis and trade construction.

## Workflow

### 1. Gather Input

Ask the user for:
- Currency (required) — e.g., EUR, USD, GBP, CHF, JPY
- Reference rate index (optional) — e.g., ESTR, SOFR, SONIA, TONA
- Valuation date (optional, defaults to today)

### 2. Discover Swap Templates

Call `ir_swap` in list mode with the currency and optional index.

Extract: available template references, index details, conventions.

### 3. Build the Swap Curve

Call `ir_swap` in price mode for standard tenors: 2Y, 5Y, 7Y, 10Y, 20Y, 30Y.

Extract: par swap rate and DV01 at each tenor.

### 4. Overlay the Government Curve

Call `interest_rate_curve` (list then calculate) for the same currency.

Compute swap spread = swap rate minus government yield at each tenor.

### 5. Decompose Real Rates

Call `inflation_curve` (search then calculate) for the currency.

Compute real swap rate = nominal swap rate minus inflation breakeven at each tenor.

### 6. Synthesize Curve Strategy Views

Compute curve metrics: 2s10s slope, 5s30s slope, 2s5s10s butterfly.

Identify opportunities: steepener, flattener, butterfly, or swap spread trades based on current levels vs historical norms.

Present: swap curve table with government overlay, curve metrics, real rate decomposition, and trade recommendations with DV01-neutral ratios.

## Output Format

Lead with curve shape summary and key metrics (2s10s, butterfly). Follow with detailed tables and trade idea section.

© LSEG · Apache-2.0 · anthropics/financial-services

Similar slash commands

All slash commands for Finance and business →

From the same set116

The whole set →
earnings earnings — a command for Claude Code, Codex, GitHub Copilot and Gemini CLI that compiles quarterly financial results and generates an equity research report in DOCX. CX Codex +1 ★ 41,441repo stars review-fi-portfolio The review-fi-portfolio Claude Code command reviews fixed-income portfolios using prices, cashflows, and rate scenarios. Supply bond identifiers to start the analysis. CX Codex +1 ★ 41,441repo stars research-equity research-equity is a Claude Code command that compiles equity research summaries using consensus estimates, company fundamentals, and price data. Runs when analyzing a stock by ticker. CX Codex +1 ★ 41,441repo stars macro-rates The macro-rates Claude Code command builds a macro and rates dashboard for a selected country. It covers economic indicators, yield curves, real rates, and swap spreads. CX Codex +1 ★ 41,441repo stars analyze-option-vol The analyze-option-vol Claude Code command analyzes option volatility through volatility surfaces, Greeks, and an implied-versus-realized comparison. For FX pairs, it selects a separate surface tool. CX Codex +1 ★ 41,441repo stars analyze-fx-carry The analyze-fx-carry Claude Code command evaluates FX carry for a currency pair using forwards, volatility, and historical pricing. Give it a pair to get a tenor-by-tenor carry profile and a summary report. CX Codex +1 ★ 41,441repo stars analyze-bond-rv analyze-bond-rv — a Claude Code command for relative value bond analysis against yield and credit spread curves. It runs parallel rate shock scenarios and determines rich or cheap valuation. CX Codex +1 ★ 41,441repo stars analyze-bond-basis The analyze-bond-basis command for Claude Code analyzes bond futures basis. It assesses trading opportunities by identifying cheapest-to-deliver bonds and calculating implied repo rates. CX Codex +1 ★ 41,441repo stars

Project sponsors

Companies that keep this analytics open