/wealth-management:fixed-income-sovereignfrom wealth-management
Performs US Treasury bond pricing, yield curve construction, duration, convexity, TIPS analysis, and forward/spot rate derivation for interest rate risk assessment.
Ships in wealth-management. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Scope: US Treasuries and rates analytics. Sovereign credit risk — emerging market debt, default analysis, country risk spreads — is out of scope for this skill.
The price of a bond is the present value of its future cash flows:
P = sum(t=1 to n) [C / (1+y)^t] + F / (1+y)^n
where C = coupon payment per period, y = yield to maturity per period, F = face value, n = total number of periods. For semi-annual bonds, divide the annual coupon by 2 and the annual yield by 2, and double the number of years to get n.
The discount rate y that solves the bond pricing equation — the single rate that equates the bond's market price to the present value of all future cash flows. Assumes reinvestment of coupons at the YTM rate. It is the standard yield measure for bonds.
Current Yield = Annual Coupon / Price. A simple income measure that ignores capital gains/losses and the time value of money.
The spot curve gives zero-coupon yields for each maturity. The par curve gives coupon rates at which bonds would price at par. Forward rates are implied future rates derived from spot rates. The three curves contain equivalent information and can be derived from one another.
Extract spot (zero-coupon) rates from par yields by starting at the shortest maturity and working outward. Each step uses previously derived spot rates to solve for the next spot rate.
The implied rate between two future dates derived from spot rates:
f(t1,t2) = [(1+s_t2)^t2 / (1+s_t1)^t1]^(1/(t2-t1)) - 1
where s_t1 and s_t2 are spot rates for maturities t1 and t2.
The weighted average time to receive cash flows, where weights are the present value of each cash flow as a proportion of the bond's price:
D_mac = (1/P) × sum(t × CF_t / (1+y)^t)
Measured in years. Longer maturity, lower coupon, and lower yield all increase duration.
D_mod = D_mac / (1 + y/m)
where m = number of coupon periods per year. Gives the approximate percentage price change for a 1 percentage point change in yield: dP/P ≈ -D_mod × dy.
The dollar change in price for a 1 basis point change in yield:
DV01 ≈ -D_mod × P × 0.0001
Used for hedging — match DV01 exposures to immunize a portfolio against parallel rate shifts.
Measures the curvature of the price-yield relationship (second derivative):
C = (1/P) × sum(t(t+1) × CF_t / (1+y)^(t+2))
For option-free bonds, convexity is always positive — duration alone overstates losses and understates gains.
ΔP/P ≈ -D_mod × Δy + 0.5 × Convexity × (Δy)²
The convexity term is a correction that becomes important for large yield changes.
Principal adjusts with CPI. The coupon rate is fixed but applied to the inflation-adjusted principal. Real yield = TIPS yield. Breakeven inflation = nominal Treasury yield - TIPS real yield. TIPS have a deflation floor that protects par value at maturity.
Sensitivity to specific points on the yield curve (e.g., 2yr, 5yr, 10yr, 30yr). Allows analysis of non-parallel yield curve shifts such as steepening, flattening, or butterfly moves. Sum of key rate durations equals effective duration.
| Formula | Expression | Use Case |
|---|---|---|
| Bond Price | P = sum C/(1+y)^t + F/(1+y)^n | Price from yield |
| Current Yield | Annual Coupon / Price | Simple income measure |
| Forward Rate | f(t1,t2) = [(1+s_t2)^t2 / (1+s_t1)^t1]^(1/(t2-t1)) - 1 | Implied future rate |
| Macaulay Duration | (1/P) × sum(t × CF_t / (1+y)^t) | Weighted avg time to cash flows |
| Modified Duration | D_mac / (1 + y/m) | % price sensitivity to yield |
| DV01 | D_mod × P × 0.0001 | Dollar price change per 1bp |
| Convexity | (1/P) × sum(t(t+1) × CF_t / (1+y)^(t+2)) | Curvature of price-yield curve |
| Price Change | ΔP/P ≈ -D_mod×Δy + 0.5×Convexity×(Δy)² | Estimate price impact of rate move |
Given: Face = $1,000, coupon = 4% (semi-annual), YTM = 5%, maturity = 5 years Calculate: Bond price Solution: Semi-annual coupon = $1,000 × 4% / 2 = $20 Semi-annual yield = 5% / 2 = 2.5% Number of periods = 5 × 2 = 10 P = $20 × [(1 - (1.025)^(-10)) / 0.025] + $1,000 / (1.025)^10 P = $20 × 8.7521 + $1,000 × 0.7812 P = $175.04 + $781.20 = $956.24
The bond trades at a discount ($956.24 < $1,000) because the coupon rate (4%) is below the market yield (5%).
Given: A bond with Macaulay duration = 4.5 years, YTM = 5% (semi-annual), price = $956.24, convexity = 22.5 Calculate: Estimated price change for a +50bp rate increase Solution: D_mod = 4.5 / (1 + 0.05/2) = 4.5 / 1.025 = 4.39 years ΔP/P ≈ -4.39 × 0.005 + 0.5 × 22.5 × (0.005)² ΔP/P ≈ -0.02195 + 0.000281 = -0.02167 = -2.167% ΔP ≈ -2.167% × $956.24 = -$20.72 New price ≈ $956.24 - $20.72 = $935.52
Duration alone would estimate -2.195%; the convexity correction reduces the estimated loss by about 3bp.
uv run scripts/fixed_income_sovereign.py # run the demo (uses PEP 723 inline deps)
uv run scripts/fixed_income_sovereign.py --verify # check demo outputs against the worked examples (exit 1 on mismatch)
python3 scripts/fixed_income_sovereign.py # alternative (requires: pip install numpy scipy)
The demo prints the calculations covered above; its values match the worked examples in this skill. Run --help for a list of the classes and functions. For programmatic use, import the module rather than running it — the demo only executes under python fixed_income_sovereign.py.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub joellewis/finance_skills --plugin wealth-management38 skills in this plugin
/alternativesAnalyze alternative investments including hedge funds, private equity, and venture capital. Use when the user asks about hedge fund strategies (long/short, macro, event-driven), PE or VC performance metrics (IRR, TVPI, DPI), fee structures ('2-and-20', carry, hurdle rates), the J-curve effect, illiquidity premiums, lock-up periods, or hedge fund replication. Also trigger when users mention 'managed futures', 'CTA', 'fund of funds', 'vintage year', 'capital calls', 'distributions', 'carried interest', or ask how to evaluate an alternative investment manager./asset-allocationDetermine how to distribute capital across asset classes using strategic and tactical allocation frameworks. Use when the user asks about portfolio allocation, mean-variance optimization, Black-Litterman, risk parity, glide paths, or target-date strategies. Also trigger when users mention 'how much in stocks vs bonds', '60/40 portfolio', 'policy portfolio', 'core-satellite', 'liability-driven investing', 'asset-liability matching', or ask how to split their money across investments./bet-sizingDetermine how much capital to allocate to individual positions within a portfolio. Use when the user asks about position sizing, the Kelly criterion, fractional Kelly, risk budgeting, or conviction weighting. Also trigger when users mention 'how much to put in one stock', 'maximum position size', 'how concentrated should my portfolio be', 'number of holdings', 'VaR budget per position', 'how big a bet', or ask about scaling position sizes with volatility./commoditiesAnalyze commodity markets including futures curve dynamics, roll yield, and supply/demand fundamentals. Use when the user asks about commodity investing, commodity ETFs, contango, backwardation, roll yield, commodity indices (GSCI, BCOM), or commodities as an inflation hedge. Also trigger when users mention 'oil prices', 'gold as a safe haven', 'agricultural futures', 'convenience yield', 'storage costs', 'natural gas', 'copper demand', or ask why commodity ETF returns differ from spot price changes./currencies-and-fxAnalyze currency markets, exchange rate mechanics, and FX risk management for international portfolios. Use when the user asks about exchange rates, FX hedging, interest rate parity, carry trades, forward premiums, cross rates, or currency overlay programs. Also trigger when users mention 'strong dollar', 'weak euro', 'hedging foreign stocks', 'purchasing power parity', 'currency risk in my portfolio', 'EUR/USD', 'yen carry trade', or ask whether to hedge international investments./debt-managementProvide frameworks for managing and paying off personal debt effectively. Use when the user asks about debt payoff strategies (avalanche vs snowball), refinancing decisions, debt consolidation, debt-to-income ratios, or the opportunity cost of paying off debt vs investing. Also trigger when users mention 'which debt to pay first', 'should I refinance', 'credit card debt', 'student loan payoff', 'DTI for mortgage', 'balance transfer', 'good debt vs bad debt', or ask how to get out of debt faster.Other plugins' skills for the same job