Agent skill

Fixed Income

by agiprolabs in agiprolabs/claude-trading-skills

[STUB] Bond pricing, yield curves, duration and convexity analysis, and DeFi lending rate modeling

MITAuto-check passedBusiness, Finance & HR

Install Fixed Income

skills CLI
$ npx skills add agiprolabs/claude-trading-skills --skill fixed-income -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install agiprolabs/claude-trading-skills fixed-income --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/agiprolabs/claude-trading-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/fixed-income .claude/skills/fixed-income && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
fixed-income
GitHub stars
410
Token cost
~1.6k tokens
SKILL.md length
606 words
Files
3 (incl. scripts, references)
Skills in repo
68
Repo updated
First seen
Licence
MIT

At a glance

[STUB] Bond pricing, yield curves, duration and convexity analysis, and DeFi lending rate modeling

  • Works in 5 steps: Implement yield curve bootstrapping from… → Add Nelson-Siegel yield curve fitting → Build DeFi lending rate data fetcher… → …
  • Tasks that involve Banking and insurance
  • SKILL.md covers Current Capabilities, Planned Capabilities, Prerequisites and Use Cases, plus 3 more sections
  • Runs Python scripts from its folder; calls uv and python

What it does

Fixed Income is an agent skill from agiprolabs/claude-trading-skills. [STUB] Bond pricing, yield curves, duration and convexity analysis, and DeFi lending rate modeling

Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including scripts and reference files (for example `references/planned_features.md` and `scripts/bond_calculator.py`).

It sits in Business, Finance & HR, covering Banking and insurance and Crypto and DeFi analysis. The repository describes itself as: 68 trading, DeFi, and quantitative finance Agent Skills. Works with Claude Code, Cursor, Codex, Gemini CLI, and 30+ other tools. The licence is MIT.

When your agent uses it

  • Tasks that involve Banking and insurance
  • Tasks that involve Crypto and DeFi analysis

Example prompts

  • “/fixed-income”

Requirements

  • Python 3

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Implement yield curve bootstrapping from market data
  2. Add Nelson-Siegel yield curve fitting
  3. Build DeFi lending rate data fetcher (Marginfi, Kamino APIs)
  4. Add day count convention support for accurate accrued interest
  5. Create rate comparison dashboard across protocols

What it can do on your machine

Read from SKILL.md and the folder at commit 981e1d7. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • uv
    • python

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use uv, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Fixed Income loads about 1.6k tokens when it runs, and up to ~3.2k if it reads all its reference files. Until then it costs about 28 tokens; SKILL.md has 606 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~28
When it runs · the whole SKILL.md, loaded when a task matches
~1.6k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from agiprolabs/claude-trading-skills at commit 981e1d7, republished under its MIT licence (© agiprolabs). 606 words, ~1,650 tokens.

Download SKILL.mdSave it as .claude/skills/fixed-income/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
fixed-income
description
[STUB] Bond pricing, yield curves, duration and convexity analysis, and DeFi lending rate modeling

Fixed Income

Status: STUB — This skill provides a basic bond calculator and an overview of planned capabilities. Full implementation is awaiting community contribution.

Fixed income analysis bridges traditional bond mathematics with DeFi lending rate modeling. Bond pricing fundamentals — present value of cash flows, yield curves, duration, and convexity — translate directly to analyzing DeFi lending protocols where depositors earn variable or fixed rates on crypto assets.

On Solana, lending protocols like Marginfi, Kamino, and Solend offer variable-rate lending/borrowing. Understanding term structure and rate dynamics helps optimize yield farming strategies and compare opportunities across protocols.

This skill is informational and analytical only. It does not provide financial advice or trading recommendations.


Current Capabilities

This stub includes a working bond calculator with price, yield-to-maturity, duration, and convexity computations. See scripts/bond_calculator.py for the implementation.

python
def bond_price(
    face: float, coupon_rate: float, ytm: float, periods: int, freq: int = 2
) -> float:
    """Calculate bond price as present value of all cash flows.

    Args:
        face: Face (par) value of the bond.
        coupon_rate: Annual coupon rate (decimal, e.g., 0.05 for 5%).
        ytm: Yield to maturity (annual, decimal).
        periods: Number of coupon periods remaining.
        freq: Coupon frequency per year (2 = semi-annual).

    Returns:
        Bond price (dirty price).
    """
    coupon = face * coupon_rate / freq
    y = ytm / freq
    pv_coupons = sum(coupon / (1 + y) ** t for t in range(1, periods + 1))
    pv_face = face / (1 + y) ** periods
    return pv_coupons + pv_face

Run the demo:

bash
python scripts/bond_calculator.py --demo

Planned Capabilities

When fully implemented, this skill will cover:

Bond Pricing
ConceptDescription
Clean/Dirty PricePrice excluding/including accrued interest
Accrued InterestInterest earned since last coupon date
Day Count Conventions30/360, ACT/360, ACT/365, ACT/ACT
Zero-Coupon BondsDiscount bonds with no periodic coupons
Yield Measures
Yield MeasureUse Case
Yield to Maturity (YTM)Total return if held to maturity
Current YieldAnnual coupon / price
Yield to CallReturn if called at first call date
Spread to BenchmarkCredit risk premium over risk-free rate
Duration and Convexity
MetricMeasures
Macaulay DurationWeighted average time to cash flows
Modified DurationPrice sensitivity to yield changes
Effective DurationDuration for bonds with embedded options
ConvexitySecond-order price sensitivity
Dollar Duration (DV01)Dollar change per 1bp yield move
Yield Curve Construction
MethodDescription
BootstrapExtract spot rates from par bond prices
Nelson-SiegelParametric model with level, slope, curvature
Nelson-Siegel-SvenssonExtended model with additional curvature term
Cubic SplineNon-parametric interpolation
DeFi Lending Rate Analysis
ProtocolChainType
MarginfiSolanaVariable rate
KaminoSolanaVariable rate
SolendSolanaVariable rate
AaveEthereum/MultiVariable + stable rate
CompoundEthereumVariable rate

Planned DeFi features:

  • Lending rate time series analysis
  • Supply/borrow APY comparison across protocols
  • Utilization rate impact on lending rates
  • Fixed vs variable rate comparison (when fixed-rate protocols available)
  • Rate arbitrage opportunity detection

Prerequisites

bash
# For full implementation
uv pip install numpy scipy

# For visualization
uv pip install matplotlib

The included scripts/bond_calculator.py uses only the Python standard library and runs without any dependencies.


Use Cases

Show full SKILL.md (242 more words)Show less
Yield Farming Comparison

Compare DeFi lending rates across protocols using fixed income analytics. Annualize variable rates, compute effective yields accounting for compounding frequency, and identify the most capital-efficient opportunities.

Lending Rate Analysis

Track lending rates over time to understand rate dynamics. Identify periods of rate compression (low utilization) vs rate expansion (high utilization) to time deposits optimally.

Rate Arbitrage

Borrow at lower rates on one protocol and lend at higher rates on another. Duration and convexity concepts help assess the risk of rate changes during the arbitrage holding period.

Risk Assessment

Use duration to estimate how lending positions change in value as rates move. Higher duration means greater sensitivity to rate changes.


Quick Reference: Bond Pricing Formulas

Bond price (present value of cash flows):

P = Σ [C / (1+y)^t] + F / (1+y)^n
    t=1..n

Where:
  C = periodic coupon payment = Face * coupon_rate / frequency
  y = periodic yield = YTM / frequency
  F = face value
  n = total number of periods

Macaulay Duration:

D_mac = (1/P) * Σ [t * C / (1+y)^t] + (n * F) / ((1+y)^n * P)

Modified Duration:

D_mod = D_mac / (1 + y)

Convexity:

Convexity = (1/P) * Σ [t*(t+1) * C / (1+y)^(t+2)] + [n*(n+1)*F] / [(1+y)^(n+2) * P]

Price change approximation:

ΔP/P ≈ -D_mod * Δy + 0.5 * Convexity * (Δy)²

Files

FileDescription
references/planned_features.mdPlanned features, bond formulas, DeFi protocols, and implementation priorities
scripts/bond_calculator.pyBond price, YTM, duration, and convexity calculator

Contributing

This skill is a stub awaiting full implementation. To contribute:

  1. Implement yield curve bootstrapping from market data
  2. Add Nelson-Siegel yield curve fitting
  3. Build DeFi lending rate data fetcher (Marginfi, Kamino APIs)
  4. Add day count convention support for accurate accrued interest
  5. Create rate comparison dashboard across protocols

See references/planned_features.md for the full feature list and implementation priorities.


This skill provides analytical tools and mathematical models for informational purposes only. It does not constitute financial advice. Fixed income and DeFi lending involve risk of loss.

© agiprolabs, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (scripts, references) in skills/fixed-income of agiprolabs/claude-trading-skills.

  • SKILL.md
  • references/planned_features.md
  • scripts/bond_calculator.py

Open the folder on GitHubat commit 981e1d7

Compare with similar skills

Fixed Income next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Fixed Income compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Fixed Income this skillagiprolabs/claude-trading-skills410—~1.6kAutomated safety check: PassMIT
Swapper Depositswapperfinance/swapper-toolkit852—~1.8kAutomated safety check: PassMIT
Okx Cex Earnokx/agent-skills1872 repos~3.3kAutomated safety check: PassMIT
Oracle Flashloan Analysisquillai-network/quillshield_skills130—~2.8kAutomated safety check: PassMIT
Squadsinternet-court/internet-court-skill6.6k2 repos~5.9kAutomated safety check: PassApache-2.0
Starknet Defiinternet-court/internet-court-skill6.6k1 repos~2.3kAutomated safety check: NotesApache-2.0

Similar skills

  • Swapper Deposit

    swapperfinance/swapper-toolkit

    Deposit and bridge funds into a wallet or protocol using Swapper Finance.

    852 GitHub stars~1.8k tokensUpdated 6 mo ago
    Business, Finance & HRAuto-check passed
  • Okx Cex Earn

    okx/agent-skills

    Manages OKX Simple Earn (flexible savings/lending), Flash Earn, On-chain Earn (staking/DeFi), Dual Investment (DCD/双币赢), and AutoEarn (自动赚币) via the okx CLI.

    187 GitHub starsUsed in 2 repos~3.3k tokens
    Business, Finance & HRAuto-check passed
  • Oracle Flashloan Analysis

    quillai-network/quillshield_skills

    Detects price oracle manipulation and flash loan attack vectors in DeFi smart contracts.

    130 GitHub stars~2.8k tokensUpdated 6 mo ago
    Business, Finance & HRAuto-check passed
  • Squads

    internet-court/internet-court-skill

    Complete guide for Squads Protocol - Solana's leading smart account and multisig infrastructure.

    6.6k GitHub starsUsed in 2 repos~5.9k tokens
    Business, Finance & HRAuto-check passed
  • Starknet Defi

    internet-court/internet-court-skill

    Execute DeFi operations on Starknet including token swaps via avnu aggregator, DCA recurring buys, STRK staking, and lending/borrowing.

    6.6k GitHub starsUsed in 1 repo~2.3k tokens
    Business, Finance & HRAuto-check: notes
  • Defi Connector

    Signal-Execution-Labs/forex-trading-ai-agent

    Connect to DeFi protocols for staking, lending, yield farming, and liquidity provision.

    162 GitHub stars~2.4k tokensUpdated 27 days ago
    Business, Finance & HRAuto-check passed

More from agiprolabs/claude-trading-skills

All 68 skills in this repo
  • Backtrader

    agiprolabs/claude-trading-skills

    Event-driven backtesting with bar-by-bar execution, complex order types, multiple analyzers, and custom indicators

    410 GitHub stars~2.4k tokensUpdated 1 mo ago
    Auto-check passed
  • Birdeye API

    agiprolabs/claude-trading-skills

    Solana token market data via Birdeye — prices, OHLCV, trades, token metadata, security checks, and trader activity

    410 GitHub stars~1.8k tokensUpdated 1 mo ago
    Auto-check passed
  • Coingecko API

    agiprolabs/claude-trading-skills

    Broad crypto market data from CoinGecko covering 13,000+ tokens.

    410 GitHub stars~1.6k tokensUpdated 1 mo ago
    Auto-check passed
  • Cointegration Analysis

    agiprolabs/claude-trading-skills

    Cointegration testing for pairs trading using Engle-Granger, Johansen, and rolling stability analysis

    410 GitHub stars~2.1k tokensUpdated 1 mo ago
    Auto-check passed
  • Copy Trading

    agiprolabs/claude-trading-skills

    Wallet evaluation, monitoring, and copy-trade strategy design for Solana DEX trading

    410 GitHub stars~2.4k tokensUpdated 1 mo ago
    Auto-check passed
  • Correlation Analysis

    agiprolabs/claude-trading-skills

    Cross-asset correlation analysis including rolling correlation, hierarchical clustering, tail dependence, and regime-dependent correlation

    410 GitHub stars~2.4k tokensUpdated 1 mo ago
    Auto-check passed

Questions about Fixed Income

What does Fixed Income do?

[STUB] Bond pricing, yield curves, duration and convexity analysis, and DeFi lending rate modeling. Fixed Income is an agent skill from agiprolabs/claude-trading-skills.

When should I use Fixed Income?

Fixed Income fits situations like: tasks that involve Banking and insurance; tasks that involve Crypto and DeFi analysis.

How do I install Fixed Income in Claude Code?

Run `npx skills add agiprolabs/claude-trading-skills --skill fixed-income -a claude-code`. Or copy the skill folder (skills/fixed-income in agiprolabs/claude-trading-skills) into .claude/skills/fixed-income in your project. Claude Code loads it when a task matches its description.

How do I install Fixed Income in Codex?

Run `npx skills add agiprolabs/claude-trading-skills --skill fixed-income -a codex`. Or copy the skill folder (skills/fixed-income in agiprolabs/claude-trading-skills) into .agents/skills/fixed-income in your project. Codex loads it when a task matches its description.

Can I use Fixed Income in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add agiprolabs/claude-trading-skills --skill fixed-income -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/fixed-income, .gemini/skills/fixed-income, .github/skills/fixed-income and .opencode/skills/fixed-income in your project.

What does Fixed Income need to run?

Going by SKILL.md and its folder, Fixed Income needs Python for the scripts in its folder and the command-line tools its instructions call (uv and python). Our summary lists: Python 3.

Does Fixed Income access the network?

SKILL.md contains no URLs. Its commands use uv, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Fixed Income safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Fixed Income use?

Fixed Income is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Fixed Income use?

About 1.6k tokens (SKILL.md is roughly 6.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.6k tokens, read only when the agent opens those files.

What are the alternatives to Fixed Income?

Skills that share tags, products or a category with Fixed Income: Swapper Deposit (swapperfinance/swapper-toolkit, 852 stars), Okx Cex Earn (okx/agent-skills, 187 stars), Oracle Flashloan Analysis (quillai-network/quillshield_skills, 130 stars) and Squads (internet-court/internet-court-skill, 6.6k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Fixed Income?

agiprolabs (a GitHub user) maintains it in agiprolabs/claude-trading-skills, which has 410 GitHub stars. The repository holds 68 skills in this directory. The repository was last updated on September 3, 2026.

Source: agiprolabs/claude-trading-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.