債券・利回り・DeFi金利分析
債券価格の算出、利回り曲線やデュレーション・コンベクシティ分析、DeFiにおける貸出金利のモデル化など、債券投資に関する様々な分析や予測をビジネスの意思決定に活用するSkill。
📜 元の英語説明(参考)
[STUB] Bond pricing, yield curves, duration and convexity analysis, and DeFi lending rate modeling
🇯🇵 日本人クリエイター向け解説
債券価格の算出、利回り曲線やデュレーション・コンベクシティ分析、DeFiにおける貸出金利のモデル化など、債券投資に関する様々な分析や予測をビジネスの意思決定に活用するSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o fixed-income.zip https://jpskill.com/download/10411.zip && unzip -o fixed-income.zip && rm fixed-income.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/10411.zip -OutFile "$d\fixed-income.zip"; Expand-Archive "$d\fixed-income.zip" -DestinationPath $d -Force; ri "$d\fixed-income.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
fixed-income.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
fixed-incomeフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 1
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
債券
ステータス: STUB — このスキルは、基本的な債券計算機と計画されている機能の概要を提供します。完全な実装は、コミュニティの貢献を待っています。
債券分析は、従来の債券数学とDeFiの貸出金利モデリングを結びつけます。債券価格の基礎(キャッシュフローの現在価値、イールドカーブ、デュレーション、コンベクシティ)は、預金者が暗号資産に対して変動金利または固定金利を獲得するDeFi貸出プロトコルの分析に直接応用できます。
Solanaでは、Marginfi、Kamino、Solendなどの貸出プロトコルが変動金利での貸出/借入を提供しています。期間構造と金利の変動を理解することで、イールドファーミング戦略を最適化し、プロトコル間の機会を比較することができます。
このスキルは、情報提供と分析のみを目的としています。金融アドバイスや取引の推奨を提供するものではありません。
現在の機能
このスタブには、価格、最終利回り、デュレーション、コンベクシティの計算機能を備えた債券計算機が含まれています。実装については、scripts/bond_calculator.pyを参照してください。
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
デモを実行します。
python scripts/bond_calculator.py --demo
計画されている機能
完全に実装されると、このスキルは以下をカバーします。
債券価格
| 概念 | 説明 |
|---|---|
| Clean/Dirty Price | 未経過利息を含まない/含む価格 |
| Accrued Interest | 最後のクーポン日からの経過利息 |
| Day Count Conventions | 30/360, ACT/360, ACT/365, ACT/ACT |
| Zero-Coupon Bonds | 定期的なクーポンがない割引債 |
利回り指標
| 利回り指標 | ユースケース |
|---|---|
| Yield to Maturity (YTM) | 満期まで保有した場合の総収益 |
| Current Yield | 年間クーポン / 価格 |
| Yield to Call | 最初のコール日にコールされた場合の収益 |
| Spread to Benchmark | 無リスク金利に対する信用リスクプレミアム |
デュレーションとコンベクシティ
| 指標 | 測定 |
|---|---|
| Macaulay Duration | キャッシュフローまでの加重平均時間 |
| Modified Duration | 利回り変化に対する価格感応度 |
| Effective Duration | 組み込みオプション付き債券のデュレーション |
| Convexity | 2次価格感応度 |
| Dollar Duration (DV01) | 1bpの利回り変動あたりのドル変動 |
イールドカーブの構築
| 方法 | 説明 |
|---|---|
| Bootstrap | パー債価格からスポットレートを抽出 |
| Nelson-Siegel | 水準、傾き、曲率を持つパラメトリックモデル |
| Nelson-Siegel-Svensson | 追加の曲率項を持つ拡張モデル |
| Cubic Spline | ノンパラメトリック補間 |
DeFi貸出金利分析
| プロトコル | チェーン | タイプ |
|---|---|---|
| Marginfi | Solana | 変動金利 |
| Kamino | Solana | 変動金利 |
| Solend | Solana | 変動金利 |
| Aave | Ethereum/Multi | 変動 + 安定金利 |
| Compound | Ethereum | 変動金利 |
計画されているDeFi機能:
- 貸出金利の時系列分析
- プロトコル間の供給/借入APYの比較
- 貸出金利に対する稼働率の影響
- 固定金利と変動金利の比較(固定金利プロトコルが利用可能な場合)
- 金利裁定機会の検出
前提条件
# 完全な実装の場合
uv pip install numpy scipy
# 可視化の場合
uv pip install matplotlib
含まれているscripts/bond_calculator.pyは、Python標準ライブラリのみを使用し、依存関係なしで実行されます。
ユースケース
イールドファーミングの比較
固定金利分析を使用して、プロトコル間のDeFi貸出金利を比較します。変動金利を年換算し、複利頻度を考慮した実効利回りを計算し、最も資本効率の高い機会を特定します。
貸出金利分析
貸出金利を長期的に追跡して、金利の変動を理解します。預金を最適にタイミングを計るために、金利圧縮(低稼働率)と金利拡大(高稼働率)の期間を特定します。
金利裁定
あるプロトコルでより低い金利で借り入れ、別のプロトコルでより高い金利で貸し出します。デュレーションとコンベクシティの概念は、裁定取引の保有期間中の金利変動のリスクを評価するのに役立ちます。
リスク評価
デュレーションを使用して、金利の変動に応じて貸出ポジションの価値がどのように変化するかを見積もります。デュレーションが高いほど、金利変動に対する感応度が高くなります。
クイックリファレンス:債券価格の公式
債券価格(キャッシュフローの現在価値):
P = Σ [C / (1+y)^t] + F / (1+y)^n
t=1..n
ここで:
C = 定期的なクーポン支払い = Face * coupon_rate / frequency
y = 定期的な利回り = YTM / frequency
F = 額面価格
n = 総期間数
マコーレーデュレーション:
D_mac = (1/P) * Σ [t * C / (1+y)^t] + (n * F) / ((1+y)^n * P)
修正デュレーション:
D_mod = D_mac / (1 + y)
コンベクシティ:
Convexity = (1/P) * Σ [t*(t+1) * C / (1+y)^(t+2)] + [n*(n+1)*F] / [(1+y)^(n+2) * P]
価格変動の近似:
ΔP/P ≈ -D_mod * Δy + 0.5 * Convexity * (Δy)²
ファイル
| ファイル | 説明 |
|---|---|
references/planned_features.md |
計画されている機能、債券の公式、DeFiプロトコル、および実装の優先順位 |
scripts/bond_calculator.py |
債券価格、YTM、デュレーション、およびコンベクシティ計算機 |
貢献
このスキルは、完全な実装を待っているスタブです。貢献するには:
- 市場データからイールドカーブのブートストラップを実装します
- Nelson-Siegelイールドカーブフィッティングを追加します
- DeFiレン
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
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.
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:
python scripts/bond_calculator.py --demo
Planned Capabilities
When fully implemented, this skill will cover:
Bond Pricing
| Concept | Description |
|---|---|
| Clean/Dirty Price | Price excluding/including accrued interest |
| Accrued Interest | Interest earned since last coupon date |
| Day Count Conventions | 30/360, ACT/360, ACT/365, ACT/ACT |
| Zero-Coupon Bonds | Discount bonds with no periodic coupons |
Yield Measures
| Yield Measure | Use Case |
|---|---|
| Yield to Maturity (YTM) | Total return if held to maturity |
| Current Yield | Annual coupon / price |
| Yield to Call | Return if called at first call date |
| Spread to Benchmark | Credit risk premium over risk-free rate |
Duration and Convexity
| Metric | Measures |
|---|---|
| Macaulay Duration | Weighted average time to cash flows |
| Modified Duration | Price sensitivity to yield changes |
| Effective Duration | Duration for bonds with embedded options |
| Convexity | Second-order price sensitivity |
| Dollar Duration (DV01) | Dollar change per 1bp yield move |
Yield Curve Construction
| Method | Description |
|---|---|
| Bootstrap | Extract spot rates from par bond prices |
| Nelson-Siegel | Parametric model with level, slope, curvature |
| Nelson-Siegel-Svensson | Extended model with additional curvature term |
| Cubic Spline | Non-parametric interpolation |
DeFi Lending Rate Analysis
| Protocol | Chain | Type |
|---|---|---|
| Marginfi | Solana | Variable rate |
| Kamino | Solana | Variable rate |
| Solend | Solana | Variable rate |
| Aave | Ethereum/Multi | Variable + stable rate |
| Compound | Ethereum | Variable 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
# 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
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
| File | Description |
|---|---|
references/planned_features.md |
Planned features, bond formulas, DeFi protocols, and implementation priorities |
scripts/bond_calculator.py |
Bond price, YTM, duration, and convexity calculator |
Contributing
This skill is a stub awaiting full implementation. To contribute:
- Implement yield curve bootstrapping from market data
- Add Nelson-Siegel yield curve fitting
- Build DeFi lending rate data fetcher (Marginfi, Kamino APIs)
- Add day count convention support for accurate accrued interest
- 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.