analyze-bond-basis

analyze-bond-basis is a command for Claude Code from yuping322/financial-services-plugins-new. It costs 18 tokens per session (512 once invoked), scanned A, original, Apache-2.0.

An analysis of the price difference between a bond futures contract and the bond that can be delivered under it. It identifies the cheapest-to-deliver bond, meaning the delivery option that is most economical for the futures seller.

In plain words
What is it for?
Use it to calculate gross and net basis, implied repo rate, carry, contract risk measures, and a trade assessment from market data.
Why use it?
It helps explain whether the futures contract and deliverable bond are fairly priced and whether the difference may support a basis trade.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is This command uses LSEG bond future pricing, bond pricing, yield curves, and historical data tools. See [CONNECTORS.md](../CONNECTORS.md) for available tools..

Part of the lseg plugin — 8 skills, 8 commands shipped together

Good fit Use it to calculate gross and net basis, implied repo rate, carry, contract risk measures, and a trade assessment from market data.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/yuping322/financial-services-plugins-new
agentmods
npx agentmods add commands/yuping322/financial-services-plugins-new/analyze-bond-basis

Made for: Claude Code.

Or install lseg, the plugin that ships this one along with the rest of its 8 skills, 8 commands.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for analyze-bond-basis

README.md
[![agentmods](https://agentmods.dev/badge/commands/yuping322/financial-services-plugins-new/analyze-bond-basis/github.svg)](https://agentmods.dev/commands/yuping322/financial-services-plugins-new/analyze-bond-basis)
Your own site
<a href="https://agentmods.dev/commands/yuping322/financial-services-plugins-new/analyze-bond-basis"><img src="https://agentmods.dev/badge/commands/yuping322/financial-services-plugins-new/analyze-bond-basis/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for analyze-bond-basis

Your own site · 80×15
<a href="https://agentmods.dev/commands/yuping322/financial-services-plugins-new/analyze-bond-basis"><img src="https://agentmods.dev/badge/commands/yuping322/financial-services-plugins-new/analyze-bond-basis.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 18 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 512 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00018 $0.00512
Opus 5 $0.00009 $0.00256
Sonnet 5 $0.00004 $0.00102
Haiku 4.5 $0.00002 $0.00051

Measured 10d ago against content hash 36886543620f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

analyze-bond-basis scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

partner-built/lseg/commands/analyze-bond-basis.md · 59 lines

What it actually says

Analyze Bond Futures Basis

This command uses LSEG bond future pricing, bond pricing, yield curves, and historical data tools. See CONNECTORS.md for available tools.

Analyze the bond futures basis by pricing the future, identifying the cheapest-to-deliver bond, computing gross and net basis, and assessing basis trade opportunities.

See the bond-futures-basis skill for domain knowledge on basis mechanics and trading strategies.

Workflow

1. Gather Input

Ask the user for:

  • Bond future RIC (required) — e.g., FGBLc1 (Euro Bund), TYc1 (US 10Y Note), FFIc1 (UK Gilt)
  • Market data date (optional, defaults to today)

2. Price the Bond Future

Call bond_future_price with the future RIC.

Extract: fair price, CTD bond identifier, delivery basket with conversion factors, contract DV01, delivery dates.

3. Price the CTD Bond

Call bond_price for the CTD identifier from Step 2.

Extract: clean/dirty price, yield, duration, DV01, accrued interest, coupon.

Compute: gross basis, invoice price, carry, net basis.

4. Compute Implied Repo Rate

Call interest_rate_curve (list then calculate) for the future's currency. Use short-end rate as repo proxy.

Compute implied repo rate and compare to market repo.

5. Track Historical Basis

Call tscc_historical_pricing_summaries for both the future and CTD bond with tenor: "3M", interval: "P1D".

Assess: basis trend, volatility, and historical range.

6. Sovereign Credit Context

Call credit_curve for the relevant sovereign (e.g., "DE" for Bund, "US" for Treasury).

7. Synthesize the Report

Present: future summary table, CTD bond analytics, basis calculation table (gross/net basis, implied repo vs market repo), historical context, and trade recommendation (long basis / short basis / neutral).

Output Format

Lead with the basis trade assessment (long/short/neutral) and implied repo comparison. Follow with detailed analytics tables.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 59 lines · 18 tokens per session scan A 36886543620f

Subscribe to this mod's changes

analyze-bond-basis is a command published in the GitHub repository yuping322/financial-services-plugins-new (17 stars, last pushed 6mo ago), licensed Apache-2.0. It adds 18 tokens to every session and 512 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.