{"id":"eee8b180-d15c-48f5-9f71-fe2ba74bcef4","entityType":"agent","slug":"clawhub-gechengling-security-bond-analysis","name":"Security Bond Analysis","canonicalUrl":"https://www.xpersona.co/agent/clawhub-gechengling-security-bond-analysis","canonicalPath":"/agent/clawhub-gechengling-security-bond-analysis","generatedAt":"2026-10-11T17:42:36.781Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"editorial-content","verified":true,"confidence":"high","updatedAt":"2026-10-11T15:43:20.497Z","emptyReason":null},"description":"AI-powered bond analysis for China market including valuation, yield, duration, convexity, credit spread analysis, and bond portfolio management. Skill: Security Bond Analysis Owner: gechengling Summary: AI-powered bond analysis for China market including valuation, yield, duration, convexity, credit spread analysis, and bond portfolio management. Tags: latest:3.0.3, security-bond-analysis:3.0.3 Version history: v3.0.3 | 2026-10-08T05:21:37.017Z | user 3.0.3: content update v3.0.2 | 2026-09-13T14:55:03.922Z | user 内容增强：新增债券估值结果解读、久期凸性组合效应对照与三类常见计算错误；信用分析补财务指标四","descriptionLabel":"Technical summary","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 1K downloads reported by the source. Last updated 10/11/2026.","installCommand":"clawhub skill install s17ewqc4f2s6gpcbm88hy7fgvn85kg1g:security-bond-analysis","sourceUrl":"https://clawhub.ai/gechengling/security-bond-analysis","homepage":"https://clawhub.ai/gechengling/skills/security-bond-analysis","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/gechengling/security-bond-analysis","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/gechengling/skills/security-bond-analysis","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":60,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"AI-powered bond analysis for China market including valuation, yield, duration, convexity, credit spread analysis, and bond portfolio management. Skill: Securit"},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-11T15:43:20.497Z","emptyReason":null},"protocols":[{"protocol":"OPENCLEW","label":"OpenClaw","status":"self-declared","notes":"Declared in the public agent profile."}],"capabilities":[],"verifiedCount":0,"selfDeclaredCount":1,"capabilityMatrix":{"rows":[{"key":"OPENCLEW","type":"protocol","support":"unknown","confidenceSource":"profile","notes":"Listed on profile"}],"flattenedTokens":"protocol:OPENCLEW|unknown|profile"}},"adoption":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-11T15:43:20.497Z","emptyReason":null},"stars":null,"forks":null,"downloads":1036,"packageName":null,"latestVersion":"3.0.3","tractionLabel":"1K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-11T15:43:20.427Z","emptyReason":null},"lastUpdatedAt":"2026-10-11T15:43:20.497Z","lastCrawledAt":"2026-10-11T15:43:20.427Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-12T15:43:20.427Z","lastVerifiedAt":null,"highlights":[{"version":"3.0.3","createdAt":"2026-10-08T05:21:37.017Z","changelog":"3.0.3: content update","fileCount":3,"zipByteSize":15491},{"version":"3.0.2","createdAt":"2026-09-13T14:55:03.922Z","changelog":"内容增强：新增债券估值结果解读、久期凸性组合效应对照与三类常见计算错误；信用分析补财务指标四级分层阈值表、城投区域五维分析表、利差分位解读表与示例测算；组合管理新增利率情景损益表、久期免疫匹配表与组合复核清单；新增可转债分析模块（转股价值/溢价率/双低值/条款触发进度与强赎风险提示）；新增风控与合规检查清单及信用利差、可转债、城投复核指令示例；监管动态扩充至6项并更新至 2026-09-13","fileCount":3,"zipByteSize":11063},{"version":"3.0.1","createdAt":"2026-05-25T03:41:23.160Z","changelog":"- Added a \"证券监管最新动态\" section with up-to-date regulatory news (as of 2026-05-25) relevant to bond analysis in the China market. - Updated version to 3.0.1 in the skill metadata. - No changes to core analytical features or code examples; content update focused on regulatory environment.","fileCount":3,"zipByteSize":5465},{"version":"2.0.0","createdAt":"2026-05-11T15:40:23.173Z","changelog":"**Major update: Expanded scope with full-featured bond analysis for the China market.** - Comprehensive bond valuation engine with price, YTM, duration, and convexity calculations. - Standardized frameworks for yield analysis, credit spread analysis, and credit rating evaluation. - Dedicated modules for managing and analyzing bond portfolios, including risk and credit exposure. - Enhanced support for China-specific bond types and market conventions, with relevant trigger keywords in both English and Chinese. - Clear documentation on industry pain points and how the skill addresses them.","fileCount":2,"zipByteSize":3998}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s17ewqc4f2s6gpcbm88hy7fgvn85kg1g:security-bond-analysis","setupComplexity":"low","setupSteps":["Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.","Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-gechengling-security-bond-analysis/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-gechengling-security-bond-analysis/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-gechengling-security-bond-analysis/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-gechengling-security-bond-analysis/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-gechengling-security-bond-analysis/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-gechengling-security-bond-analysis/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"CLAWHUB","generatedAt":"2026-10-11T17:42:36.780Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-gechengling-security-bond-analysis/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-gechengling-security-bond-analysis/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-gechengling-security-bond-analysis/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-gechengling-security-bond-analysis/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"high","updatedAt":"2026-10-11T15:43:20.497Z","emptyReason":null},"readme":"Skill: Security Bond Analysis\n\nOwner: gechengling\n\nSummary: AI-powered bond analysis for China market including valuation, yield, duration, convexity, credit spread analysis, and bond portfolio management.\n\nTags: latest:3.0.3, security-bond-analysis:3.0.3\n\nVersion history:\n\nv3.0.3 | 2026-10-08T05:21:37.017Z | user\n\n3.0.3: content update\n\nv3.0.2 | 2026-09-13T14:55:03.922Z | user\n\n内容增强：新增债券估值结果解读、久期凸性组合效应对照与三类常见计算错误；信用分析补财务指标四级分层阈值表、城投区域五维分析表、利差分位解读表与示例测算；组合管理新增利率情景损益表、久期免疫匹配表与组合复核清单；新增可转债分析模块（转股价值/溢价率/双低值/条款触发进度与强赎风险提示）；新增风控与合规检查清单及信用利差、可转债、城投复核指令示例；监管动态扩充至6项并更新至 2026-09-13\n\nv3.0.1 | 2026-05-25T03:41:23.160Z | auto\n\n- Added a \"证券监管最新动态\" section with up-to-date regulatory news (as of 2026-05-25) relevant to bond analysis in the China market.\n- Updated version to 3.0.1 in the skill metadata.\n- No changes to core analytical features or code examples; content update focused on regulatory environment.\n\nv2.0.0 | 2026-05-11T15:40:23.173Z | auto\n\n**Major update: Expanded scope with full-featured bond analysis for the China market.**\n\n- Comprehensive bond valuation engine with price, YTM, duration, and convexity calculations.\n- Standardized frameworks for yield analysis, credit spread analysis, and credit rating evaluation.\n- Dedicated modules for managing and analyzing bond portfolios, including risk and credit exposure.\n- Enhanced support for China-specific bond types and market conventions, with relevant trigger keywords in both English and Chinese.\n- Clear documentation on industry pain points and how the skill addresses them.\n\nArchive index:\n\nArchive v3.0.3: 3 files, 15491 bytes\n\nFiles: skill-card.md (1991b), SKILL.md (35657b), _meta.json (141b)\n\nFile v3.0.3:SKILL.md\n\n---\r\nname: Bond Analysis Expert\r\nslug: security-bond-analysis\r\ndescription: AI-powered bond analysis expert for China market — bond pricing and YTM, Macaulay/modified duration and convexity, DV01, credit spread percentiles, LGFV (城投) regional review, convertible bond metrics and portfolio interest-rate scenarios. Scope: fixed-income analytics on China onshore bonds; not equity research, not credit rating issuance. Keywords: bond pricing and YTM, duration and convexity, DV01, credit spread percentile, LGFV regional analysis, convertible bond metrics, interest rate scenario P&L, 债券估值, 到期收益率, 久期与凸性, DV01, 信用利差分位, 城投区域分析, 可转债指标, 利率情景损益.\r\nversion: \"3.0.3\"\r\n---\r\n\r\n# Bond Analysis Expert / 债券分析专家\r\n\r\n> **English:** AI-powered bond analysis expert — covers bond valuation, yield analysis, duration/convexity calculation, credit spread analysis, and bond portfolio management. Built for fixed income professionals.\r\n>\r\n> **中文:** 债券分析专家——覆盖债券估值、收益率分析、久期/凸性计算、信用利差分析、债券组合管理。适用：固收分析师、债券交易员、组合管理人。\r\n\r\n\r\n## 数据最小化声明与执行边界 / Data Minimisation & Execution Boundary\r\n\r\n**数据最小化前置声明：** 使用本技能时，请只提供债券分析所必需的输入——债券代码或简称、票面利率、剩余期限、付息频率、市场净价或YTM、主体评级、组合权重（用百分比或\"约1000万\"这类量级）。**不要**粘贴账户持仓明细、交易对手信息、客户身份信息、未公开的发行文件内部版本或未经授权的内幕信息。\r\n\r\n**保存与预览确认：** 本技能不执行任何保存动作。若你在自己环境中依据本技能生成估值表、信用分析模板或利率情景损益表，请在落盘或对外报送前**先预览结果、确认全价/净价与付息频率口径一致，再保存或提交**。\r\n\r\n**代码块性质与执行边界**\r\n\r\n| 内容 | 性质 | 谁来执行 |\r\n|------|------|---------|\r\n| `BondAnalyzer` 类（定价/YTM/久期/凸性/DV01） | 固收指标的计算口径说明 | 由固收分析师在自有系统中取数复现；技能不取数、不运行 |\r\n| `CREDIT_ANALYSIS_RATIOS` 与 `analyze_credit_spread()` | 财务分层阈值与利差对照的示意 | 由信用研究员在自有系统中使用 |\r\n| `BondPortfolio` 类（组合久期、利率情景） | 组合层风险度量的算法表达 | 同上，属教学示意 |\r\n| `analyze_convertible()` | 转债指标的测算口径 | 由研究员在自有系统中运行 |\r\n\r\n本技能未配置任何工具调用权限，不执行代码、不读写文件、不访问行情或估值数据源（中债估值等以机构自身订阅为准）、不下单。文中的评级参考利差、分层阈值与占比限额均为示例，机构须按自身风控偏好设定并留档。\r\n\r\n---\r\n\r\n---\r\n\r\n\r\n### 证券监管最新动态 [2026-10-08更新]\r\n\r\n| 动态类型 | 内容摘要 | 影响范围 | 固收侧应对动作 | 优先级 | 复核频率 | |\r\n|---------|---------|---------|-------------|-------|---|\r\n| 银行理财 | 理财\"三清\"（净值清晰、风险清晰、投向清晰）持续推进 | 理财资金的债券配置偏好 | 按期限与评级重估负债稳定性，相应调整组合久期 | 高 | 每月 |\r\n| 地方债务化解 | 一揽子化债安排持续落地，城投平台融资与偿债结构变化 | 城投债定价与估值 | 按区域财力与债务率分级，区分公开债与非标风险 | 高 | 每月 |\r\n| 债券市场统一执法 | 银行间与交易所市场信息披露、违约处置规则趋同 | 违约回收率与估值口径 | 建立违约处置流程台账，跟踪回收进度 | 高 | 每季 |\r\n| 信用风险 | 信用债内部分化加剧，弱资质主体再融资压力上升 | 信用利差分层 | 提高利差分位监控频率，弱资质主体加做压力测算 | 高 | 每月 |\r\n| 流动性 | 做市与报价机制完善，部分品种流动性分层明显 | 交易成本与冲击成本 | 按流动性分层设定单券持仓上限 | 中 | 每季 |\r\n| 可转债 | 可转债条款（修正、赎回、回售）执行与信息披露受关注 | 转债估值与条款风险 | 逐券登记条款触发条件，跟踪强赎公告 | 中 | 每月 |\r\n| 银行理财 | 2026年10月：理财组合的久期与流动性匹配披露要求进一步细化 | 理财资金的债券配置与负债管理 | 按月披露组合久期、高流动性资产占比与赎回压力测试结果 | 高 | 每月 |\r\n| 信用风险 | 2026年四季度初：弱资质主体的债券滚续与展期协商案例增多 | 信用利差分层、违约回收率 | 对AA及以下主体建立滚续跟踪清单，逐券登记到期分布与银行授信变化 | 高 | 每月 |\r\n\r\n> **数据截止**: 2026-10-08 | 来源：证监会、NFRA、交易商协会、中证协、行业公开信息\r\n> **声明**: 以上动态供参考，具体以官方最新发布为准\r\n\r\n**动态解读示例（两类高频场景）**\r\n\r\n- **场景A｜城投估值随政策预期波动**：某区域城投债在中性假设下按 AAA 利差定价；化债政策预期升温阶段，同区域利差两个交易日收窄 12bp，随后因财力数据不及预期又走阔 15bp。**解读**：政策预期驱动的利差波动不等于信用基本面改善，应跟踪区域一般公共预算收入、债务率与再融资滚续能力三项硬指标，而非只跟随消息面。\r\n- **场景B｜转债强赎条款误判**：某转债正股在连续 30 个交易日中已有 15 个交易日收盘价高于转股价 130%，触及强赎条件。若仍按\"转债无到期日、可长期持有\"的思路配置 → 可能被按面值加当期利息强制赎回。**改进动作**：对可转债逐券登记条款触发进度，每周复核一次。\r\n\r\n## Industry Pain Points / 行业痛点\r\n\r\n| Pain Point / 痛点 | Impact / 影响 | Solution / 本Skill解决方案 | 量化基线（示例） |\r\n|------------------|-------------|------------------------|---------------|\r\n| **收益率计算复杂** | 多种收益率指标容易混淆 | 标准化收益率计算框架 | 全组合统一 YTM 口径并记录取值日期 |\r\n| **信用分析耗时** | 发行主体众多，分析量大 | 模板化信用分析框架 | 主体入池前完成五项区域与财务核验 |\r\n| **利率风险难测** | 久期/凸性概念抽象，估算误差大 | 可视化风险分析 | 利率变动 >50bp 必须计入凸性项 |\r\n| **城投债信仰** | 城投刚兑预期与违约现实冲突 | 区域财政分析模型 | 按财力与债务率分级，弱区域不超组合 5% |\r\n| **久期管理难** | 利率变动对组合影响大 | 久期匹配优化工具 | 组合久期偏离基准 ≤0.5 年 |\r\n| **可转债条款复杂** | 强赎/修正/回售条款判断易遗漏 | 逐券条款登记与触发进度表 | 每周复核一次条款触发进度 |\r\n| **估值口径不统一** | 全价净价、付息频率混用导致结果偏差 | 统一定价口径并留痕 | 全组合同一口径 + 记录取值日期 |\r\n\r\n---\r\n\r\n## Trigger Keywords / 触发关键词\r\n\r\n**English Triggers (fixed-income analytics on a bond or bond portfolio only):** bond pricing and YTM, Macaulay/modified duration, convexity, DV01, credit spread percentile, LGFV regional credit review, convertible bond metrics, interest rate scenario P&L\r\n\r\n**English Non-Triggers:** fixed income, bonds, interest rates, credit risk, investing — these alone do **not** route here; the task must compute or interpret a bond metric, spread, or portfolio rate scenario.\r\n\r\n**中文触发词（须落在\"计算或解读债券指标/利差/组合利率情景\"任务上才触发）：** 债券定价 / 到期收益率计算 / 久期计算 / 凸性测算 / DV01 / 信用利差分位 / 城投区域分析 / 财务指标分层核验 / 可转债转股溢价率 / 强赎条款进度 / 组合久期管理 / 利率情景损益测算\r\n\r\n**不触发（Scope Exclusions）：** 以下泛化词单独出现时**不**触发本技能——固收、债券、利率、信用风险、投资。它们只有在明确指向\"对某只债券或债券组合做估值、久期、利差、信用或利率情景分析\"时才路由到本技能；权益研究、宏观利率走势预测请改用对应技能。\r\n\r\n**路由判定三步：** ① 标的是否为债券、转债或债券组合？② 任务是否为定价、算久期凸性、看利差分位、做信用核验或跑利率情景？③ 两者同时为\"是\"才启用。只问债券概念不启用。\r\n\r\n---\r\n\r\n## Core Capabilities / 核心能力\r\n\r\n### 1. Bond Valuation Engine / 债券估值引擎\r\n\r\n```python\r\nimport numpy as np\r\nimport pandas as pd\r\n\r\nclass BondAnalyzer:\r\n    \"\"\"债券分析引擎\"\"\"\r\n    \r\n    @staticmethod\r\n    def calculate_price(face_value: float, coupon_rate: float, \r\n                       ytm: float, years: int, \r\n                       frequency: int = 2) -> float:\r\n        \"\"\"\r\n        债券定价\r\n        Args:\r\n            face_value: 面值（元）\r\n            coupon_rate: 年票面利率\r\n            ytm: 到期收益率\r\n            years: 剩余期限（年）\r\n            frequency: 付息频率（1=年付，2=半年付）\r\n        \"\"\"\r\n        n = years * frequency\r\n        r_per_period = ytm / frequency\r\n        c_per_period = (face_value * coupon_rate) / frequency\r\n        \r\n        # 现金流现值\r\n        pv_coupons = sum([c_per_period / (1 + r_per_period) ** t \r\n                         for t in range(1, n + 1)])\r\n        pv_face = face_value / (1 + r_per_period) ** n\r\n        \r\n        return pv_coupons + pv_face\r\n    \r\n    @staticmethod\r\n    def calculate_ytm(price: float, face_value: float,\r\n                     coupon_rate: float, years: float,\r\n                     frequency: int = 2) -> float:\r\n        \"\"\"\r\n        计算到期收益率（YTM）- 牛顿迭代法\r\n        \"\"\"\r\n        n = years * frequency\r\n        c = (face_value * coupon_rate) / frequency\r\n        \r\n        # 初始猜测\r\n        ytm = coupon_rate\r\n        \r\n        for _ in range(100):\r\n            pv = sum([c / (1 + ytm/frequency) ** t \r\n                     for t in range(1, n + 1)]) + face_value / (1 + ytm/frequency) ** n\r\n            \r\n            diff = price - pv\r\n            \r\n            # 导数（久期近似）\r\n            duration = BondAnalyzer.calculate_duration(\r\n                price, face_value, coupon_rate, ytm, years, frequency\r\n            )\r\n            dv = -duration / (1 + ytm/frequency) * diff\r\n            \r\n            ytm = ytm + diff / dv * 0.5\r\n            \r\n            if abs(diff) < 1e-6:\r\n                break\r\n        \r\n        return ytm\r\n    \r\n    @staticmethod\r\n    def calculate_duration(price: float, face_value: float,\r\n                          coupon_rate: float, ytm: float,\r\n                          years: float, frequency: int = 2) -> float:\r\n        \"\"\"\r\n        计算久期（Macauley Duration）\r\n        \"\"\"\r\n        n = int(years * frequency)\r\n        c = (face_value * coupon_rate) / frequency\r\n        r = ytm / frequency\r\n        \r\n        # 加权平均到期时间\r\n        weighted_time = sum([t * c / (1 + r) ** t for t in range(1, n + 1)])\r\n        weighted_time += n * face_value / (1 + r) ** n\r\n        \r\n        return weighted_time / price / frequency  # 转换为年\r\n    \r\n    @staticmethod\r\n    def calculate_convexity(price: float, face_value: float,\r\n                          coupon_rate: float, ytm: float,\r\n                          years: float, frequency: int = 2) -> float:\r\n        \"\"\"\r\n        计算凸性\r\n        \"\"\"\r\n        n = int(years * frequency)\r\n        c = (face_value * coupon_rate) / frequency\r\n        r = ytm / frequency\r\n        \r\n        weighted_sq = sum([t * (t + 1) * c / (1 + r) ** (t + 2) \r\n                          for t in range(1, n + 1)])\r\n        weighted_sq += n * (n + 1) * face_value / (1 + r) ** (n + 2)\r\n        \r\n        return weighted_sq / price / (frequency ** 2)\r\n    \r\n    @staticmethod\r\n    def price_change_estimate(duration: float, convexity: float,\r\n                             rate_change: float) -> dict:\r\n        \"\"\"\r\n        利率变动对价格的影响估算\r\n        \"\"\"\r\n        # 久期效应\r\n        duration_effect = -duration * rate_change\r\n        \r\n        # 凸性效应\r\n        convexity_effect = 0.5 * convexity * (rate_change ** 2)\r\n        \r\n        total_effect = duration_effect + convexity_effect\r\n        \r\n        return {\r\n            \"duration_effect\": round(duration_effect * 100, 4),\r\n            \"convexity_effect\": round(convexity_effect * 100, 4),\r\n            \"total_effect\": round(total_effect * 100, 4),\r\n            \"approximate_new_price_pct\": round((1 + total_effect) * 100, 4)\r\n        }\r\n```\r\n\r\n#### 1.1 Worked Example / 估值结果解读示例\r\n\r\n**输入**：面值 100 元，票面利率 4.00%，YTM 3.50%，剩余 5 年，年付。\r\n\r\n| 指标 | 示例取值 | 含义 | 解读要点 |\r\n|-----|---------|------|---------|\r\n| price | 102.26 元 | 现金流现值合计 | 高于面值，因票息 4% > 市场利率 3.5% |\r\n| Macaulay duration | 4.62 年 | 加权平均回款时间 | 票息越高、期限越短，久期越小 |\r\n| Modified duration | 4.46 | 利率每变动 1 个百分点，价格反向变动约 4.46% | 风险度量的核心参数 |\r\n| convexity | 24.1 | 久期自身的变动速率 | 凸性为正，利率大幅波动时对持有人有利 |\r\n| DV01 | 0.0456 元/百元面值 | 利率每变动 1bp 的价格变动 | 组合层面即\"每 bp 损益\" |\r\n\r\n**久期与凸性组合效应（利率上行/下行对照）**\r\n\r\n| 利率变动 | 久期效应 | 凸性效应 | 合计 | 说明 | 是否需计入凸性 | |\r\n|---------|--------|--------|------|------|---|\r\n| +100bp | −4.46% | +0.12% | −4.34% | 凸性提供正向缓冲 | 必须计入 |\r\n| +50bp | −2.23% | +0.03% | −2.20% | 小幅变动时凸性影响很小 | 建议计入 |\r\n| −50bp | +2.23% | +0.03% | +2.26% | 收益率下行时价格涨得更多 | 可仅用久期 |\r\n| −100bp | +4.46% | +0.12% | +4.58% | 上涨幅度略大于同幅下跌 | 可仅用久期 |\r\n\r\n> **提示**：利率变动在 ±10bp 以内，仅用久期估算的误差通常在 1bp 价格量级，可以接受；超过 ±50bp 必须加入凸性项，否则会用久期线性外推、系统性夸大上行时的损失。\r\n\r\n**常见计算错误（供复核）**\r\n\r\n- **付息频率与期数不匹配**：半年付息债券 5 年应为 10 期、每期折现率取 YTM/2；直接用年付口径会使价格偏差约 0.1 元以上。\r\n- **全价与净价混淆**：交易报价通常为净价，估值需用全价（净价 + 应计利息）；应计利息 = 票面利率 × 已过计息天数 ÷ 当期计息天数。\r\n- **YTM 反算不收敛**：市场价与票面利率偏离过大时初值取值不佳，可先用\"票面利率 ± 面值/价格修正项\"构造更接近的初值，或改用二分法。\r\n\r\n\r\n**示例｜DV01 在组合层面的换算（从个券到组合）**\r\n\r\n| 债券 | 市值权重 | 修正久期 | 个券DV01（元/百元） | 组合贡献（元/百元） |\r\n|------|---------|---------|------------------|------------------|\r\n| 国债10Y | 40% | 8.20 | 0.0820 | 0.0328 |\r\n| 政金债5Y | 30% | 4.35 | 0.0435 | 0.0131 |\r\n| 信用债3Y | 20% | 2.68 | 0.0268 | 0.0054 |\r\n| 存单1Y | 10% | 0.97 | 0.0097 | 0.0010 |\r\n| **组合** | 100% | 5.72 | — | **0.0523** |\r\n\r\n换算要点：组合DV01 = Σ(权重 × 个券DV01)。组合规模 1,000 万元时，1bp 利率变动对应损益约 1,000万 × 0.0523% = **5,230 元**。风控限额通常写成\"DV01 上限 X 元/bp\"，比\"久期上限 X 年\"更直观，因为前者直接对应金额。\r\n\r\n**示例｜全价与净价的换算错误（最常见的估值事故）**\r\n\r\n| 项目 | 数值 | 说明 |\r\n|------|------|------|\r\n| 净价报价 | 101.20 元 | 交易报价口径 |\r\n| 票面利率 | 4.00% | 年付 |\r\n| 已过计息天数 | 128 天 | 距上次付息日 |\r\n| 当期计息天数 | 365 天 | 年付口径 |\r\n| 应计利息 | 1.40 元 | 100 × 4% × 128/365 |\r\n| 全价 | 102.60 元 | 净价 + 应计利息 |\r\n\r\n错误后果：若把净价 101.20 当作全价用于组合市值计算，1 亿元持仓会低估约 140 万元。付息频率切换（年付/半年付）时计息天数基数也须同步切换，否则应计利息会出现约一倍的偏差。\r\n\r\n### 2. Credit Analysis Framework / 信用分析框架\r\n\r\n```markdown\r\n## 信用债分析模板\r\n\r\n### 一、发债主体概况\r\n| 项目 | 内容 |\r\n|-----|------|\r\n| 公司名称 | |\r\n| 实际控制人 | |\r\n| 主体评级 | |\r\n| 行业分类 | |\r\n| 主营业务 | |\r\n\r\n### 二、财务分析\r\n```python\r\nCREDIT_ANALYSIS_RATIOS = {\r\n    \"盈利能力\": {\r\n        \"毛利率\": \">30%为优质\",\r\n        \"净利率\": \">15%为优质\",\r\n        \"ROE\": \">10%为优质\"\r\n    },\r\n    \"偿债能力\": {\r\n        \"资产负债率\": \"<70%为稳健\",\r\n        \"流动比率\": \">1.5为稳健\",\r\n        \"利息保障倍数\": \">3倍为稳健\"\r\n    },\r\n    \"现金流\": {\r\n        \"经营现金流/带息债务\": \">15%为稳健\",\r\n        \"经营现金流/资本支出\": \">100%为稳健\"\r\n    }\r\n}\r\n```\r\n\r\n#### 2.1 财务指标分层阈值（示例，供交叉验证）\r\n\r\n| 指标 | 优质 | 稳健 | 关注 | 预警 | 说明 | 行业差异提示 | |\r\n|-----|-----|-----|-----|-----|------|---|\r\n| 资产负债率 | <55% | 55%-70% | 70%-80% | >80% | 行业差异大，重资产行业可适度放宽 | 金融与地产不适用通用阈值 |\r\n| 流动比率 | >2.0 | 1.5-2.0 | 1.0-1.5 | <1.0 | 需结合速动比率一并观察 | 金融与地产不适用通用阈值 |\r\n| 利息保障倍数 | >5 倍 | 3-5 倍 | 1.5-3 倍 | <1.5 倍 | 低于 1 倍说明经营利润不足以覆盖利息 | 重资产行业可放宽 |\r\n| 经营现金流/带息债务 | >25% | 15%-25% | 8%-15% | <8% | 比利润指标更难粉饰 | 现金流行业差异极大 |\r\n| 经营现金流/资本支出 | >150% | 100%-150% | 60%-100% | <60% | 长期低于 100% 说明依赖外部融资 | 重资产行业可放宽 |\r\n\r\n#### 2.2 城投主体区域分析维度（示例）\r\n\r\n| 维度 | 具体指标 | 数据来源 | 观察要点 |\r\n|-----|---------|---------|---------|\r\n| 财政实力 | 一般公共预算收入、税收占比、财政自给率 | 地方预算执行报告 | 关注收入质量而非总量 |\r\n| 债务压力 | 地方政府债务率、城投有息债务/综合财力 | 公开统计与评级报告 | 计算口径需全市场统一 |\r\n| 平台地位 | 平台层级、公益性业务占比、政府补助占比 | 募集说明书 | 层级越低、市场化业务越多，政府支持意愿越难判定 |\r\n| 再融资能力 | 近 12 个月债券发行与到期规模、银行授信余额 | 发行公告 | 滚续能力是短期违约的直接决定因素 |\r\n| 外部支持 | 上级政府财力、担保与救助记录 | 公开信息 | 关注是否已有非标违约先例 |\r\n\r\n### 三、信用利差分析\r\n```python\r\ndef analyze_credit_spread(bond_yield: float, treasury_yield: float,\r\n                         rating: str) -> dict:\r\n    \"\"\"\r\n    信用利差分析\r\n    \"\"\"\r\n    spread = bond_yield - treasury_yield\r\n    \r\n    # 评级对应利差参考\r\n    SPREAD_REFERENCE = {\r\n        \"AAA\": 0.50,  # 50bp\r\n        \"AA+\": 0.80,\r\n        \"AA\": 1.20,\r\n        \"AA-\": 1.50,\r\n        \"A+\": 2.00,\r\n        \"A\": 2.50\r\n    }\r\n    \r\n    reference = SPREAD_REFERENCE.get(rating, 2.0)\r\n    \r\n    return {\r\n        \"credit_spread\": round(spread * 100, 2),\r\n        \"reference_spread\": reference,\r\n        \"relative_value\": \"低估\" if spread < reference else \"高估\",\r\n        \"spread_premium\": round((spread - reference) * 100, 2)\r\n    }\r\n```\r\n\r\n#### 2.3 Spread Percentile Reading / 利差分位解读示例\r\n\r\n| 利差绝对水平 | 近 3 年分位 | 评级 | 解读 | 研究结论（示例） | 建议核验动作 | |\r\n|-----------|-----------|------|------|--------------|---|\r\n| 62bp | 15%（低位） | AAA | 利差补偿不充分 | 相对价值偏低，考虑缩短久期或换券 | 核验是否有担保或条款增信 |\r\n| 118bp | 55%（中位） | AA+ | 与评级参考利差基本一致 | 无显著错价，按配置需求决策 | 核对评级与外部评级差异 |\r\n| 265bp | 92%（高位） | AA | 利差含较高风险溢价 | 先排除个体风险（到期结构、负面舆情）再判断是否错价 | 核验到期结构与负面舆情 |\r\n| 430bp | 98%（极值） | AA- | 接近\"准违约\"定价 | 不属于相对价值机会，应进入风险名单复核 | 进入风险名单并复核回收预期 |\r\n\r\n**示例测算**：某 AA+ 城投债 YTM 3.68%，同期限国债 2.50%，利差 118bp；评级参考利差 80bp → 溢价比参考高 38bp。若该主体近 12 个月发行与到期规模大体匹配、区域一般公共预算收入同比小幅增长，可初步判断 **38bp 溢价可能来自流动性与市场情绪而非基本面恶化**——但输出结论时应写成\"需进一步核验\"，并列出核验清单，而非直接给出交易方向判断。\r\n```\r\n\r\n**示例｜城投区域分级的落地打分（把五个维度变成一个数）**\r\n\r\n| 维度 | 权重 | 本区域取值 | 得分 | 依据 |\r\n|------|-----|----------|------|------|\r\n| 财政实力 | 25% | 一般公共预算收入同比 +3.2%，税收占比 71% | 70 | 收入质量尚可但增速偏低 |\r\n| 债务压力 | 30% | 债务率 168%，城投有息债务/综合财力 240% | 45 | 债务压力偏重 |\r\n| 平台地位 | 20% | 地市级主平台，公益性业务占比 62% | 75 | 层级与业务结构较优 |\r\n| 再融资能力 | 15% | 近12个月发行 85 亿、到期 92 亿，净融资为负 | 40 | 滚续出现缺口 |\r\n| 外部支持 | 10% | 上级财力中等，无公开违约先例 | 65 | 中性 |\r\n| **加权得分** | 100% | — | **58.3** | 对应\"关注\"档 |\r\n\r\n分级要点：再融资能力是短期违约的直接决定因素，权重不应低于15%；实践中经常出现\"区域财力不错但当年滚续为负\"的情况，此时应按更谨慎的档位处理。分级结果须随发行与到期数据按月更新，而不是一年定一次。\r\n\r\n**示例｜利差走阔的归因拆分（区分市场与个体）**\r\n\r\n| 时段 | 同评级同期限利差变化 | 本券利差变化 | 个体超额走阔 | 归因 |\r\n|------|-------------------|------------|------------|------|\r\n| 第1周 | +8bp | +8bp | 0bp | 完全由市场/评级层面驱动 |\r\n| 第2周 | +3bp | +15bp | +12bp | 个体因素主导，需排查 |\r\n| 第3周 | −2bp | +20bp | +22bp | 个体风险显著上升 |\r\n\r\n归因要点：把本券利差变化减去同评级同期限的平均变化，得到\"个体超额走阔\"。这个差值持续扩大通常先于评级下调或负面舆情出现，是高价值的预警信号；只跟踪绝对利差会错过这个信息。\r\n\r\n---\r\n\r\n\r\n\r\n### 3. Bond Portfolio Management / 债券组合管理\r\n\r\n```python\r\nclass BondPortfolio:\r\n    \"\"\"债券组合管理\"\"\"\r\n    \r\n    def __init__(self):\r\n        self.bonds = []\r\n    \r\n    def add_bond(self, bond: dict):\r\n        \"\"\"添加债券\"\"\"\r\n        # 计算关键指标\r\n        bond[\"price\"] = self._calculate_bond_price(bond)\r\n        bond[\"ytm\"] = self._calculate_ytm(bond)\r\n        bond[\"duration\"] = self._calculate_duration(bond)\r\n        bond[\"convexity\"] = self._calculate_convexity(bond)\r\n        bond[\"dv01\"] = bond[\"duration\"] * bond[\"price\"] / 100 / 100  # 每bp变化\r\n        \r\n        self.bonds.append(bond)\r\n    \r\n    def portfolio_duration(self) -> float:\r\n        \"\"\"组合久期\"\"\"\r\n        total_value = sum(b[\"market_value\"] for b in self.bonds)\r\n        weighted_duration = sum(\r\n            b[\"duration\"] * b[\"market_value\"] for b in self.bonds\r\n        ) / total_value\r\n        return weighted_duration\r\n    \r\n    def portfolio_credit_breakdown(self) -> dict:\r\n        \"\"\"组合信用分布\"\"\"\r\n        breakdown = {}\r\n        for bond in self.bonds:\r\n            rating = bond.get(\"rating\", \"Unknown\")\r\n            if rating not in breakdown:\r\n                breakdown[rating] = {\"count\": 0, \"value\": 0}\r\n            breakdown[rating][\"count\"] += 1\r\n            breakdown[rating][\"value\"] += bond.get(\"market_value\", 0)\r\n        \r\n        return breakdown\r\n    \r\n    def interest_rate_risk(self, rate_shock: float) -> dict:\r\n        \"\"\"利率风险分析\"\"\"\r\n        port_duration = self.portfolio_duration()\r\n        \r\n        # 纯久期效应\r\n        duration_pnl = -port_duration * rate_shock / 100\r\n        \r\n        # 凸性调整\r\n        port_convexity = sum(\r\n            b[\"convexity\"] * b[\"market_value\"] for b in self.bonds\r\n        ) / sum(b[\"market_value\"] for b in self.bonds)\r\n        convexity_pnl = 0.5 * port_convexity * (rate_shock/100) ** 2\r\n        \r\n        return {\r\n            \"portfolio_duration\": round(port_duration, 3),\r\n            \"rate_shock_bp\": round(rate_shock * 100, 0),\r\n            \"duration_pnl_pct\": round(duration_pnl * 100, 2),\r\n            \"convexity_pnl_pct\": round(convexity_pnl * 100, 2),\r\n            \"total_pnl_pct\": round((duration_pnl + convexity_pnl) * 100, 2)\r\n        }\r\n```\r\n\r\n#### 3.1 Interest Rate Scenario Table / 利率情景损益示例\r\n\r\n**输入**：组合规模 1,000 万元，组合久期 3.8 年，组合凸性 18.6。\r\n\r\n| 情景 | 利率变动 | 久期损益 | 凸性调整 | 合计损益 | 说明 |\r\n|-----|--------|--------|--------|--------|------|\r\n| 大幅下行 | −50bp | +19.0 万 | +2.3 万 | +21.3 万 | 收益率下行阶段凸性放大收益 |\r\n| 小幅下行 | −20bp | +7.6 万 | +0.4 万 | +8.0 万 | 常见情景 |\r\n| 持平 | 0 | 0 | 0 | 0 | 仅有持有期票息收益 |\r\n| 小幅上行 | +20bp | −7.6 万 | +0.4 万 | −7.2 万 | 凸性小幅缓冲 |\r\n| 大幅上行 | +50bp | −19.0 万 | +2.3 万 | −16.7 万 | 凸性保护在上行时更明显 |\r\n\r\n> **口径说明**：表中损益为价格变动损益，不含持有期票息收入。组合凸性为正时，上行情景的损失被部分抵消，下行收益被小幅放大——这就是\"凸性偏好\"的来源。\r\n\r\n#### 3.2 Immunization / 久期免疫与负债匹配（示例）\r\n\r\n| 负债特征 | 匹配方式 | 关键约束 | 复核频率 |\r\n|---------|--------|---------|---------|\r\n| 单一确定时点支付 | 单期免疫：组合久期 = 剩余期限 | 组合凸性应大于负债凸性 | 每季度 |\r\n| 多期确定支付 | 多期免疫：现金流按期限分层匹配 | 每层久期与对应负债久期偏差 ≤0.2 年 | 每季度 |\r\n| 不确定支取（如理财赎回） | 久期区间管理 + 流动性缓冲 | 保留 5%-10% 高流动性资产 | 每月 |\r\n| 收益率曲线非平行变动 | 关键利率久期（KRD）管理 | 各关键期限敞口 ≤总敞口 30% | 每月 |\r\n\r\n#### 3.3 Portfolio Review Checklist / 组合复核清单\r\n\r\n| 检查项 | 阈值（示例） | 触发动作 | 复核频率 | |\r\n|-------|-----------|---------|---|\r\n| 组合久期偏离基准 | ±0.5 年以内 | 超出则再平衡 | 每月 |\r\n| 单一主体集中度 | ≤5% | 超限则减仓或专项说明 | 每月 |\r\n| 弱资质主体（AA 及以下）占比 | ≤15% | 超限须专项审批 | 每月 |\r\n| 高流动性资产占比 | ≥5% | 低于则补充 | 每周 |\r\n| 估值偏离中债估值 | ±30bp 以内 | 偏离需说明原因 | 每日 |\r\n| 到期滚续缺口 | 未来 3 个月到期 ≤可动用资金 | 存在缺口须提前安排 |\r\n\r\n\r\n**示例｜组合久期再平衡的两种做法**\r\n\r\n| 做法 | 操作 | 交易成本 | 适用场景 |\r\n|------|------|---------|---------|\r\n| 现券调仓 | 卖出长久期券、买入短久期券 | 较高（买卖价差+冲击） | 偏离较大（>0.5年）时 |\r\n| 衍生品对冲 | 用国债期货或利率互换调节 | 较低（保证金占用） | 临时偏离或需快速调整时 |\r\n| 增量配置 | 新资金按目标久期配置 | 无额外成本 | 有持续现金流流入时 |\r\n\r\n选择要点：衍生品对冲改变的是组合的有效久期，不改变现券持仓的信用与流动性结构，因此应明确区分\"久期达标\"与\"结构调整\"。监管对衍生品使用有额度与资格要求，使用前须核对机构自身的业务资格。\r\n\r\n**示例｜收益率曲线非平行移动的 KRD 敞口**\r\n\r\n| 关键期限 | 敞口占比 | 本段利率变动 | 贡献损益（万元） |\r\n|---------|---------|------------|---------------|\r\n| 1年 | 18% | −10bp | +1.8 |\r\n| 3年 | 25% | +5bp | −3.1 |\r\n| 5年 | 32% | +18bp | −8.6 |\r\n| 10年 | 25% | +12bp | −7.5 |\r\n| 合计 | 100% | — | −17.4 |\r\n\r\nKRD要点：只用组合总久期会得出\"利率上行约多少bp、损失约多少\"的单一结论，但实际曲线常呈非平行移动。按关键期限拆分敞口后可以看出，本例损失集中在5年段，再平衡应针对5年段而非整体降久期。 每周 |\r\n\r\n### 4. Convertible Bond Analysis / 可转债分析\r\n\r\n```python\r\ndef analyze_convertible(convert_price: float, stock_price: float,\r\n                        bond_floor: float, market_price: float) -> dict:\r\n    \"\"\"\r\n    可转债关键指标测算（供研究参考）\r\n    \"\"\"\r\n    conversion_value = 100 / convert_price * stock_price   # 每百元面值的转股价值\r\n    premium_rate = (market_price - conversion_value) / conversion_value * 100\r\n    downside_buffer = (market_price - bond_floor) / bond_floor * 100\r\n\r\n    return {\r\n        \"conversion_value\": round(conversion_value, 2),\r\n        \"conversion_premium_rate\": round(premium_rate, 2),   # 转股溢价率\r\n        \"downside_buffer\": round(downside_buffer, 2),        # 相对纯债价值的溢价比\r\n        \"reading\": \"转股溢价率偏高，股性偏弱\" if premium_rate > 30 else \"股性相对较强\"\r\n    }\r\n```\r\n\r\n| 指标 | 计算口径 | 解读要点 |\r\n|-----|---------|---------|\r\n| 转股价值 | 100 ÷ 转股价 × 正股价 | 与转债价格对比得出溢价率 |\r\n| 转股溢价率 | (转债价 − 转股价值) ÷ 转股价值 | 越高说明股性越弱、对正股上涨越不敏感 |\r\n| 纯债价值 | 按同评级同期限信用债 YTM 折现 | 构成转债的价格下限 |\r\n| 双低值 | 转债价 + 转股溢价率 × 100 | 常用的相对估值筛选口径之一 |\r\n| 条款触发进度 | 修正/赎回/回售条款的交易日计数 | 强赎触发后按面值加利息赎回，须重点关注 |\r\n\r\n**示例**：某转债转股价 12.00 元，正股价 13.20 元，转债市场价 128.50 元，同评级纯债价值约 92 元。\r\n- 转股价值 = 100 ÷ 12.00 × 13.20 = 110.00 元；\r\n- 转股溢价率 = (128.50 − 110.00) ÷ 110.00 = 16.8%（股性相对较强）；\r\n- 相对纯债价值的溢价比 = (128.50 − 92.00) ÷ 92.00 = 39.7%（保护垫较薄，正股下跌时回撤空间大）。\r\n\r\n**条款风险提示**：当正股满足\"连续 30 个交易日中至少 15 个交易日收盘价 ≥ 转股价 130%\"时，多数转债条款将触发强赎条件。持有高溢价转债且已触发强赎的，需及时评估转股或卖出，否则可能被按面值加当期利息赎回。\r\n\r\n\r\n**示例｜强赎条款触发进度跟踪表（每周复核）**\r\n\r\n| 转债 | 转股价 | 现价/转股价 | 已满足交易日 | 触发条件 | 剩余空间 | 本周动作 |\r\n|------|-------|-----------|------------|---------|---------|---------|\r\n| 转债A | 12.00 | 138% | 15/15 | 30日中15日 | 已触发 | 评估转股或卖出 |\r\n| 转债B | 20.00 | 121% | 8/15 | 30日中15日 | 需再7日 | 持续跟踪 |\r\n| 转债C | 8.50 | 96% | 0/15 | 30日中15日 | 未启动 | 常规持有 |\r\n| 转债D | 15.00 | 132% | 13/15 | 30日中15日 | 需再2日 | 准备处置预案 |\r\n\r\n跟踪要点：触发计数通常按\"连续30个交易日中至少15个交易日\"计算，交易日计数会随股价回落而重置或不再累加，须逐日更新而非按周估算。已触发强赎的转债若转股溢价率仍高，持有人既不转股也不卖出将面临按面值加利息赎回的损失，这是转债投资中最典型的\"条款踩坑\"。\r\n\r\n**示例｜转债双低筛选的 pitfalls**\r\n\r\n| 筛选口径 | 含义 | 优点 | 盲区 |\r\n|---------|------|------|------|\r\n| 双低值（价格+溢价率×100） | 同时兼顾低价与低溢价 | 快速筛选、可批量 | 不区分信用资质与剩余期限 |\r\n| 纯债溢价率 | 价格相对纯债价值的溢价比 | 反映保护垫厚度 | 高溢价个券在小盘转债中普遍 |\r\n| YTM | 持有到期的收益率 | 直观可比 | 忽略转股期权价值 |\r\n\r\n筛选要点：双低值低的个券可能同时是\"低价格 + 高信用风险\"。应把双低筛选与纯债价值、主体评级、剩余期限三个条件叠加使用，避免机械排序导致集中持弱资质个券。\r\n\r\n---\r\n\r\n## Risk Control Checklist / 风控与合规检查清单\r\n\r\n| 检查项 | 依据/说明 | 通过标准 |\r\n|-------|---------|---------|\r\n| 估值口径统一 | 全价/净价、付息频率、应计利息规则 | 全组合统一并留痕 |\r\n| 数据来源 | 中债估值等公开基准 | 记录取值日期与来源 |\r\n| 评级一致性 | 外部评级与内部评级差异 | 差异超一档须专项说明 |\r\n| 集中度管理 | 单一主体、单一区域、单一行业占比 | 均在预设阈值内 |\r\n| 久期偏离 | 相对基准的久期偏离 | 处于允许区间 |\r\n| 流动性分层 | 单券持仓相对日均成交 | 不超过预设上限 |\r\n| 违约处置预案 | 违约债券处置流程与台账 | 有流程、有责任人 |\r\n| 免责表述 | 分析结果仅供参考，不构成投资建议 | 每份输出均含声明 |\r\n\r\n---\r\n\r\n## Quick Command Templates / 快速指令模板\r\n\r\n**债券定价：**\r\n```\r\n计算债券价格：\r\n- 面值：100元\r\n- 票面利率：4%\r\n- 到期收益率：3.5%\r\n- 剩余期限：5年\r\n- 付息频率：年付\r\n```\r\n\r\n**久期分析：**\r\n```\r\n分析债券组合的久期风险：\r\n- 组合总规模：1000万\r\n- 利率上升50bp时的损益\r\n```\r\n\r\n**信用利差分析：**\r\n```\r\n分析信用利差：\r\n- 债券YTM：3.68%\r\n- 同期限国债收益率：2.50%\r\n- 主体评级：AA+\r\n需要输出：利差绝对值、对应评级参考利差、近3年利差分位、初步判断与需进一步核验清单\r\n```\r\n\r\n**可转债分析：**\r\n```\r\n分析可转债：\r\n- 转股价：12.00元，正股价：13.20元\r\n- 转债市场价：128.50元，同评级纯债价值约92元\r\n输出转股价值、转股溢价率、相对纯债溢价比，并核验强赎条款触发进度\r\n```\r\n\r\n**城投主体复核：**\r\n```\r\n复核某城投主体信用状况：\r\n- 区域：某地级市\r\n- 需要维度：一般公共预算收入、债务率、平台层级、近12个月发行与到期规模\r\n- 要求：给出分级判断与需进一步核验清单\r\n```\r\n\r\n---\r\n\r\n## Changelog / 版本变更\r\n\r\n| 版本 | 日期 | 变更摘要 |\r\n|------|------|---------|\r\n| 3.0.3 | 2026-10-08 | 新增数据最小化声明与执行边界章节；收窄触发词并补充中英文非触发清单与路由判定（SQP-1）；监管动态更新至2026-10-08并新增银行理财、信用风险两条与复核频率列；新增列：是否需计入凸性、财务指标行业差异提示、利差建议核验动作、组合复核频率；新增示例：DV01组合换算、全价净价换算错误、城投区域分级打分、利差走阔归因拆分、久期再平衡两种做法、KRD敞口、强赎触发进度跟踪、双低筛选盲区 |\r\n| 3.0.2 | 2026-09-13 | 新增城投区域分析维度与可转债条款风险提示 |\r\n\r\n---\r\n\r\n\r\n## Disclaimer\r\n\r\nBond analysis involves various risks including interest rate risk and credit risk. This skill provides analysis tools for educational purposes only and does not constitute investment advice.\n\nFile v3.0.3:_meta.json\n\n{\n  \"ownerId\": \"kn74e704j3ygjcygnpf02rdvd185js13\",\n  \"slug\": \"security-bond-analysis\",\n  \"version\": \"3.0.3\",\n  \"publishedAt\": 1791436897017\n}\n\nFile v3.0.3:skill-card.md\n\n## Description:\n\nGuides analysis of China onshore bonds through valuation, yield and duration measures, credit review, convertible bond metrics, and portfolio interest-rate scenarios.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[gechengling](https://clawhub.ai/user/gechengling)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nFixed-income analysts and portfolio managers use the skill to interpret bond pricing, credit spreads, convertible bond terms, and portfolio rate sensitivity for China onshore bonds. Its worked examples are analytical templates, not investment advice.\n\n### Deployment Geography for Use:\n\nGlobal (analysis focused on China onshore bonds)\n\n## Known Risks and Mitigations:\n\nRisk: Illustrative calculations or regulatory and market commentary may be mistaken for current investment advice.\n\nMitigation: Verify inputs and assumptions with licensed market data and the institution's compliance process before making decisions.\n\nRisk: Portfolio analysis requests may expose sensitive holdings or client and counterparty information.\n\nMitigation: Provide only essential bond metrics and approximate portfolio weights; omit sensitive portfolio, client, counterparty, and nonpublic issuer information.\n\n## Reference(s):\n\n- [ClawHub skill listing](https://clawhub.ai/gechengling/skills/security-bond-analysis)\n\n## Skill Output:\n\n**Output Type(s):** [Text, Markdown, Guidance]\n\n**Output Format:** [Markdown analysis with calculations and tables]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Illustrative formulas and examples; no direct market-data access or trade execution.]\n\n## Skill Version(s):\n\n3.0.3 (source: release metadata and skill frontmatter)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nArchive v3.0.2: 3 files, 11063 bytes\n\nFiles: skill-card.md (2115b), SKILL.md (24632b), _meta.json (141b)\n\nFile v3.0.2:SKILL.md\n\n---\r\nname: Bond Analysis Expert\r\nslug: security-bond-analysis\r\ndescription: AI-powered bond analysis expert for China market — covers bond valuation, yield analysis, duration/convexity calculation, credit spread analysis, and bond portfolio management. Built for fixed income analysts, bond traders, and portfolio managers. Keywords: bond analysis, yield curve, duration, convexity, credit spread, China bonds,利率债, 信用债, 国债, 企业债, 城投债, 债券估值, 收益率曲线, 久期, 凸性, 信用利差, 固收, 利率风险, 债券组合.\r\nversion: \"3.0.2\"\r\n---\r\n\r\n# Bond Analysis Expert / 债券分析专家\r\n\r\n> **English:** AI-powered bond analysis expert — covers bond valuation, yield analysis, duration/convexity calculation, credit spread analysis, and bond portfolio management. Built for fixed income professionals.\r\n>\r\n> **中文:** 债券分析专家——覆盖债券估值、收益率分析、久期/凸性计算、信用利差分析、债券组合管理。适用：固收分析师、债券交易员、组合管理人。\r\n\r\n---\r\n\r\n\r\n### 证券监管最新动态 [2026-09-13更新]\r\n\r\n| 动态类型 | 内容摘要 | 影响范围 | 固收侧应对动作 | 优先级 |\r\n|---------|---------|---------|-------------|-------|\r\n| 银行理财 | 理财\"三清\"（净值清晰、风险清晰、投向清晰）持续推进 | 理财资金的债券配置偏好 | 按期限与评级重估负债稳定性，相应调整组合久期 | 高 |\r\n| 地方债务化解 | 一揽子化债安排持续落地，城投平台融资与偿债结构变化 | 城投债定价与估值 | 按区域财力与债务率分级，区分公开债与非标风险 | 高 |\r\n| 债券市场统一执法 | 银行间与交易所市场信息披露、违约处置规则趋同 | 违约回收率与估值口径 | 建立违约处置流程台账，跟踪回收进度 | 高 |\r\n| 信用风险 | 信用债内部分化加剧，弱资质主体再融资压力上升 | 信用利差分层 | 提高利差分位监控频率，弱资质主体加做压力测算 | 高 |\r\n| 流动性 | 做市与报价机制完善，部分品种流动性分层明显 | 交易成本与冲击成本 | 按流动性分层设定单券持仓上限 | 中 |\r\n| 可转债 | 可转债条款（修正、赎回、回售）执行与信息披露受关注 | 转债估值与条款风险 | 逐券登记条款触发条件，跟踪强赎公告 | 中 |\r\n\r\n> **数据截止**: 2026-09-13 | 来源：证监会、NFRA、交易商协会、中证协、行业公开信息\r\n> **声明**: 以上动态供参考，具体以官方最新发布为准\r\n\r\n**动态解读示例（两类高频场景）**\r\n\r\n- **场景A｜城投估值随政策预期波动**：某区域城投债在中性假设下按 AAA 利差定价；化债政策预期升温阶段，同区域利差两个交易日收窄 12bp，随后因财力数据不及预期又走阔 15bp。**解读**：政策预期驱动的利差波动不等于信用基本面改善，应跟踪区域一般公共预算收入、债务率与再融资滚续能力三项硬指标，而非只跟随消息面。\r\n- **场景B｜转债强赎条款误判**：某转债正股在连续 30 个交易日中已有 15 个交易日收盘价高于转股价 130%，触及强赎条件。若仍按\"转债无到期日、可长期持有\"的思路配置 → 可能被按面值加当期利息强制赎回。**改进动作**：对可转债逐券登记条款触发进度，每周复核一次。\r\n\r\n## Industry Pain Points / 行业痛点\r\n\r\n| Pain Point / 痛点 | Impact / 影响 | Solution / 本Skill解决方案 | 量化基线（示例） |\r\n|------------------|-------------|------------------------|---------------|\r\n| **收益率计算复杂** | 多种收益率指标容易混淆 | 标准化收益率计算框架 | 全组合统一 YTM 口径并记录取值日期 |\r\n| **信用分析耗时** | 发行主体众多，分析量大 | 模板化信用分析框架 | 主体入池前完成五项区域与财务核验 |\r\n| **利率风险难测** | 久期/凸性概念抽象，估算误差大 | 可视化风险分析 | 利率变动 >50bp 必须计入凸性项 |\r\n| **城投债信仰** | 城投刚兑预期与违约现实冲突 | 区域财政分析模型 | 按财力与债务率分级，弱区域不超组合 5% |\r\n| **久期管理难** | 利率变动对组合影响大 | 久期匹配优化工具 | 组合久期偏离基准 ≤0.5 年 |\r\n| **可转债条款复杂** | 强赎/修正/回售条款判断易遗漏 | 逐券条款登记与触发进度表 | 每周复核一次条款触发进度 |\r\n| **估值口径不统一** | 全价净价、付息频率混用导致结果偏差 | 统一定价口径并留痕 | 全组合同一口径 + 记录取值日期 |\r\n\r\n---\r\n\r\n## Trigger Keywords / 触发关键词\r\n\r\n**English Triggers:** bond analysis, yield curve, duration, convexity, credit spread, China bonds, fixed income, bond valuation, interest rate risk, credit risk\r\n\r\n**中文触发词（优先）：** 债券分析 / 收益率曲线 / 久期 / 凸性 / 信用利差 / 中国债券 / 固收 / 债券估值 / 利率风险 / 信用风险 / 国债 / 企业债 / 城投债 / 金融债 / 可转债 / 债券回购 / 债券评级 / YTM / 即期收益率 / 到期收益率\r\n\r\n---\r\n\r\n## Core Capabilities / 核心能力\r\n\r\n### 1. Bond Valuation Engine / 债券估值引擎\r\n\r\n```python\r\nimport numpy as np\r\nimport pandas as pd\r\n\r\nclass BondAnalyzer:\r\n    \"\"\"债券分析引擎\"\"\"\r\n    \r\n    @staticmethod\r\n    def calculate_price(face_value: float, coupon_rate: float, \r\n                       ytm: float, years: int, \r\n                       frequency: int = 2) -> float:\r\n        \"\"\"\r\n        债券定价\r\n        Args:\r\n            face_value: 面值（元）\r\n            coupon_rate: 年票面利率\r\n            ytm: 到期收益率\r\n            years: 剩余期限（年）\r\n            frequency: 付息频率（1=年付，2=半年付）\r\n        \"\"\"\r\n        n = years * frequency\r\n        r_per_period = ytm / frequency\r\n        c_per_period = (face_value * coupon_rate) / frequency\r\n        \r\n        # 现金流现值\r\n        pv_coupons = sum([c_per_period / (1 + r_per_period) ** t \r\n                         for t in range(1, n + 1)])\r\n        pv_face = face_value / (1 + r_per_period) ** n\r\n        \r\n        return pv_coupons + pv_face\r\n    \r\n    @staticmethod\r\n    def calculate_ytm(price: float, face_value: float,\r\n                     coupon_rate: float, years: float,\r\n                     frequency: int = 2) -> float:\r\n        \"\"\"\r\n        计算到期收益率（YTM）- 牛顿迭代法\r\n        \"\"\"\r\n        n = years * frequency\r\n        c = (face_value * coupon_rate) / frequency\r\n        \r\n        # 初始猜测\r\n        ytm = coupon_rate\r\n        \r\n        for _ in range(100):\r\n            pv = sum([c / (1 + ytm/frequency) ** t \r\n                     for t in range(1, n + 1)]) + face_value / (1 + ytm/frequency) ** n\r\n            \r\n            diff = price - pv\r\n            \r\n            # 导数（久期近似）\r\n            duration = BondAnalyzer.calculate_duration(\r\n                price, face_value, coupon_rate, ytm, years, frequency\r\n            )\r\n            dv = -duration / (1 + ytm/frequency) * diff\r\n            \r\n            ytm = ytm + diff / dv * 0.5\r\n            \r\n            if abs(diff) < 1e-6:\r\n                break\r\n        \r\n        return ytm\r\n    \r\n    @staticmethod\r\n    def calculate_duration(price: float, face_value: float,\r\n                          coupon_rate: float, ytm: float,\r\n                          years: float, frequency: int = 2) -> float:\r\n        \"\"\"\r\n        计算久期（Macauley Duration）\r\n        \"\"\"\r\n        n = int(years * frequency)\r\n        c = (face_value * coupon_rate) / frequency\r\n        r = ytm / frequency\r\n        \r\n        # 加权平均到期时间\r\n        weighted_time = sum([t * c / (1 + r) ** t for t in range(1, n + 1)])\r\n        weighted_time += n * face_value / (1 + r) ** n\r\n        \r\n        return weighted_time / price / frequency  # 转换为年\r\n    \r\n    @staticmethod\r\n    def calculate_convexity(price: float, face_value: float,\r\n                          coupon_rate: float, ytm: float,\r\n                          years: float, frequency: int = 2) -> float:\r\n        \"\"\"\r\n        计算凸性\r\n        \"\"\"\r\n        n = int(years * frequency)\r\n        c = (face_value * coupon_rate) / frequency\r\n        r = ytm / frequency\r\n        \r\n        weighted_sq = sum([t * (t + 1) * c / (1 + r) ** (t + 2) \r\n                          for t in range(1, n + 1)])\r\n        weighted_sq += n * (n + 1) * face_value / (1 + r) ** (n + 2)\r\n        \r\n        return weighted_sq / price / (frequency ** 2)\r\n    \r\n    @staticmethod\r\n    def price_change_estimate(duration: float, convexity: float,\r\n                             rate_change: float) -> dict:\r\n        \"\"\"\r\n        利率变动对价格的影响估算\r\n        \"\"\"\r\n        # 久期效应\r\n        duration_effect = -duration * rate_change\r\n        \r\n        # 凸性效应\r\n        convexity_effect = 0.5 * convexity * (rate_change ** 2)\r\n        \r\n        total_effect = duration_effect + convexity_effect\r\n        \r\n        return {\r\n            \"duration_effect\": round(duration_effect * 100, 4),\r\n            \"convexity_effect\": round(convexity_effect * 100, 4),\r\n            \"total_effect\": round(total_effect * 100, 4),\r\n            \"approximate_new_price_pct\": round((1 + total_effect) * 100, 4)\r\n        }\r\n```\r\n\r\n#### 1.1 Worked Example / 估值结果解读示例\r\n\r\n**输入**：面值 100 元，票面利率 4.00%，YTM 3.50%，剩余 5 年，年付。\r\n\r\n| 指标 | 示例取值 | 含义 | 解读要点 |\r\n|-----|---------|------|---------|\r\n| price | 102.26 元 | 现金流现值合计 | 高于面值，因票息 4% > 市场利率 3.5% |\r\n| Macaulay duration | 4.62 年 | 加权平均回款时间 | 票息越高、期限越短，久期越小 |\r\n| Modified duration | 4.46 | 利率每变动 1 个百分点，价格反向变动约 4.46% | 风险度量的核心参数 |\r\n| convexity | 24.1 | 久期自身的变动速率 | 凸性为正，利率大幅波动时对持有人有利 |\r\n| DV01 | 0.0456 元/百元面值 | 利率每变动 1bp 的价格变动 | 组合层面即\"每 bp 损益\" |\r\n\r\n**久期与凸性组合效应（利率上行/下行对照）**\r\n\r\n| 利率变动 | 久期效应 | 凸性效应 | 合计 | 说明 |\r\n|---------|--------|--------|------|------|\r\n| +100bp | −4.46% | +0.12% | −4.34% | 凸性提供正向缓冲 |\r\n| +50bp | −2.23% | +0.03% | −2.20% | 小幅变动时凸性影响很小 |\r\n| −50bp | +2.23% | +0.03% | +2.26% | 收益率下行时价格涨得更多 |\r\n| −100bp | +4.46% | +0.12% | +4.58% | 上涨幅度略大于同幅下跌 |\r\n\r\n> **提示**：利率变动在 ±10bp 以内，仅用久期估算的误差通常在 1bp 价格量级，可以接受；超过 ±50bp 必须加入凸性项，否则会用久期线性外推、系统性夸大上行时的损失。\r\n\r\n**常见计算错误（供复核）**\r\n\r\n- **付息频率与期数不匹配**：半年付息债券 5 年应为 10 期、每期折现率取 YTM/2；直接用年付口径会使价格偏差约 0.1 元以上。\r\n- **全价与净价混淆**：交易报价通常为净价，估值需用全价（净价 + 应计利息）；应计利息 = 票面利率 × 已过计息天数 ÷ 当期计息天数。\r\n- **YTM 反算不收敛**：市场价与票面利率偏离过大时初值取值不佳，可先用\"票面利率 ± 面值/价格修正项\"构造更接近的初值，或改用二分法。\r\n\r\n### 2. Credit Analysis Framework / 信用分析框架\r\n\r\n```markdown\r\n## 信用债分析模板\r\n\r\n### 一、发债主体概况\r\n| 项目 | 内容 |\r\n|-----|------|\r\n| 公司名称 | |\r\n| 实际控制人 | |\r\n| 主体评级 | |\r\n| 行业分类 | |\r\n| 主营业务 | |\r\n\r\n### 二、财务分析\r\n```python\r\nCREDIT_ANALYSIS_RATIOS = {\r\n    \"盈利能力\": {\r\n        \"毛利率\": \">30%为优质\",\r\n        \"净利率\": \">15%为优质\",\r\n        \"ROE\": \">10%为优质\"\r\n    },\r\n    \"偿债能力\": {\r\n        \"资产负债率\": \"<70%为稳健\",\r\n        \"流动比率\": \">1.5为稳健\",\r\n        \"利息保障倍数\": \">3倍为稳健\"\r\n    },\r\n    \"现金流\": {\r\n        \"经营现金流/带息债务\": \">15%为稳健\",\r\n        \"经营现金流/资本支出\": \">100%为稳健\"\r\n    }\r\n}\r\n```\r\n\r\n#### 2.1 财务指标分层阈值（示例，供交叉验证）\r\n\r\n| 指标 | 优质 | 稳健 | 关注 | 预警 | 说明 |\r\n|-----|-----|-----|-----|-----|------|\r\n| 资产负债率 | <55% | 55%-70% | 70%-80% | >80% | 行业差异大，重资产行业可适度放宽 |\r\n| 流动比率 | >2.0 | 1.5-2.0 | 1.0-1.5 | <1.0 | 需结合速动比率一并观察 |\r\n| 利息保障倍数 | >5 倍 | 3-5 倍 | 1.5-3 倍 | <1.5 倍 | 低于 1 倍说明经营利润不足以覆盖利息 |\r\n| 经营现金流/带息债务 | >25% | 15%-25% | 8%-15% | <8% | 比利润指标更难粉饰 |\r\n| 经营现金流/资本支出 | >150% | 100%-150% | 60%-100% | <60% | 长期低于 100% 说明依赖外部融资 |\r\n\r\n#### 2.2 城投主体区域分析维度（示例）\r\n\r\n| 维度 | 具体指标 | 数据来源 | 观察要点 |\r\n|-----|---------|---------|---------|\r\n| 财政实力 | 一般公共预算收入、税收占比、财政自给率 | 地方预算执行报告 | 关注收入质量而非总量 |\r\n| 债务压力 | 地方政府债务率、城投有息债务/综合财力 | 公开统计与评级报告 | 计算口径需全市场统一 |\r\n| 平台地位 | 平台层级、公益性业务占比、政府补助占比 | 募集说明书 | 层级越低、市场化业务越多，政府支持意愿越难判定 |\r\n| 再融资能力 | 近 12 个月债券发行与到期规模、银行授信余额 | 发行公告 | 滚续能力是短期违约的直接决定因素 |\r\n| 外部支持 | 上级政府财力、担保与救助记录 | 公开信息 | 关注是否已有非标违约先例 |\r\n\r\n### 三、信用利差分析\r\n```python\r\ndef analyze_credit_spread(bond_yield: float, treasury_yield: float,\r\n                         rating: str) -> dict:\r\n    \"\"\"\r\n    信用利差分析\r\n    \"\"\"\r\n    spread = bond_yield - treasury_yield\r\n    \r\n    # 评级对应利差参考\r\n    SPREAD_REFERENCE = {\r\n        \"AAA\": 0.50,  # 50bp\r\n        \"AA+\": 0.80,\r\n        \"AA\": 1.20,\r\n        \"AA-\": 1.50,\r\n        \"A+\": 2.00,\r\n        \"A\": 2.50\r\n    }\r\n    \r\n    reference = SPREAD_REFERENCE.get(rating, 2.0)\r\n    \r\n    return {\r\n        \"credit_spread\": round(spread * 100, 2),\r\n        \"reference_spread\": reference,\r\n        \"relative_value\": \"低估\" if spread < reference else \"高估\",\r\n        \"spread_premium\": round((spread - reference) * 100, 2)\r\n    }\r\n```\r\n\r\n#### 2.3 Spread Percentile Reading / 利差分位解读示例\r\n\r\n| 利差绝对水平 | 近 3 年分位 | 评级 | 解读 | 研究结论（示例） |\r\n|-----------|-----------|------|------|--------------|\r\n| 62bp | 15%（低位） | AAA | 利差补偿不充分 | 相对价值偏低，考虑缩短久期或换券 |\r\n| 118bp | 55%（中位） | AA+ | 与评级参考利差基本一致 | 无显著错价，按配置需求决策 |\r\n| 265bp | 92%（高位） | AA | 利差含较高风险溢价 | 先排除个体风险（到期结构、负面舆情）再判断是否错价 |\r\n| 430bp | 98%（极值） | AA- | 接近\"准违约\"定价 | 不属于相对价值机会，应进入风险名单复核 |\r\n\r\n**示例测算**：某 AA+ 城投债 YTM 3.68%，同期限国债 2.50%，利差 118bp；评级参考利差 80bp → 溢价比参考高 38bp。若该主体近 12 个月发行与到期规模大体匹配、区域一般公共预算收入同比小幅增长，可初步判断 **38bp 溢价可能来自流动性与市场情绪而非基本面恶化**——但输出结论时应写成\"需进一步核验\"，并列出核验清单，而非直接给出交易方向判断。\r\n```\r\n\r\n### 3. Bond Portfolio Management / 债券组合管理\r\n\r\n```python\r\nclass BondPortfolio:\r\n    \"\"\"债券组合管理\"\"\"\r\n    \r\n    def __init__(self):\r\n        self.bonds = []\r\n    \r\n    def add_bond(self, bond: dict):\r\n        \"\"\"添加债券\"\"\"\r\n        # 计算关键指标\r\n        bond[\"price\"] = self._calculate_bond_price(bond)\r\n        bond[\"ytm\"] = self._calculate_ytm(bond)\r\n        bond[\"duration\"] = self._calculate_duration(bond)\r\n        bond[\"convexity\"] = self._calculate_convexity(bond)\r\n        bond[\"dv01\"] = bond[\"duration\"] * bond[\"price\"] / 100 / 100  # 每bp变化\r\n        \r\n        self.bonds.append(bond)\r\n    \r\n    def portfolio_duration(self) -> float:\r\n        \"\"\"组合久期\"\"\"\r\n        total_value = sum(b[\"market_value\"] for b in self.bonds)\r\n        weighted_duration = sum(\r\n            b[\"duration\"] * b[\"market_value\"] for b in self.bonds\r\n        ) / total_value\r\n        return weighted_duration\r\n    \r\n    def portfolio_credit_breakdown(self) -> dict:\r\n        \"\"\"组合信用分布\"\"\"\r\n        breakdown = {}\r\n        for bond in self.bonds:\r\n            rating = bond.get(\"rating\", \"Unknown\")\r\n            if rating not in breakdown:\r\n                breakdown[rating] = {\"count\": 0, \"value\": 0}\r\n            breakdown[rating][\"count\"] += 1\r\n            breakdown[rating][\"value\"] += bond.get(\"market_value\", 0)\r\n        \r\n        return breakdown\r\n    \r\n    def interest_rate_risk(self, rate_shock: float) -> dict:\r\n        \"\"\"利率风险分析\"\"\"\r\n        port_duration = self.portfolio_duration()\r\n        \r\n        # 纯久期效应\r\n        duration_pnl = -port_duration * rate_shock / 100\r\n        \r\n        # 凸性调整\r\n        port_convexity = sum(\r\n            b[\"convexity\"] * b[\"market_value\"] for b in self.bonds\r\n        ) / sum(b[\"market_value\"] for b in self.bonds)\r\n        convexity_pnl = 0.5 * port_convexity * (rate_shock/100) ** 2\r\n        \r\n        return {\r\n            \"portfolio_duration\": round(port_duration, 3),\r\n            \"rate_shock_bp\": round(rate_shock * 100, 0),\r\n            \"duration_pnl_pct\": round(duration_pnl * 100, 2),\r\n            \"convexity_pnl_pct\": round(convexity_pnl * 100, 2),\r\n            \"total_pnl_pct\": round((duration_pnl + convexity_pnl) * 100, 2)\r\n        }\r\n```\r\n\r\n#### 3.1 Interest Rate Scenario Table / 利率情景损益示例\r\n\r\n**输入**：组合规模 1,000 万元，组合久期 3.8 年，组合凸性 18.6。\r\n\r\n| 情景 | 利率变动 | 久期损益 | 凸性调整 | 合计损益 | 说明 |\r\n|-----|--------|--------|--------|--------|------|\r\n| 大幅下行 | −50bp | +19.0 万 | +2.3 万 | +21.3 万 | 收益率下行阶段凸性放大收益 |\r\n| 小幅下行 | −20bp | +7.6 万 | +0.4 万 | +8.0 万 | 常见情景 |\r\n| 持平 | 0 | 0 | 0 | 0 | 仅有持有期票息收益 |\r\n| 小幅上行 | +20bp | −7.6 万 | +0.4 万 | −7.2 万 | 凸性小幅缓冲 |\r\n| 大幅上行 | +50bp | −19.0 万 | +2.3 万 | −16.7 万 | 凸性保护在上行时更明显 |\r\n\r\n> **口径说明**：表中损益为价格变动损益，不含持有期票息收入。组合凸性为正时，上行情景的损失被部分抵消，下行收益被小幅放大——这就是\"凸性偏好\"的来源。\r\n\r\n#### 3.2 Immunization / 久期免疫与负债匹配（示例）\r\n\r\n| 负债特征 | 匹配方式 | 关键约束 | 复核频率 |\r\n|---------|--------|---------|---------|\r\n| 单一确定时点支付 | 单期免疫：组合久期 = 剩余期限 | 组合凸性应大于负债凸性 | 每季度 |\r\n| 多期确定支付 | 多期免疫：现金流按期限分层匹配 | 每层久期与对应负债久期偏差 ≤0.2 年 | 每季度 |\r\n| 不确定支取（如理财赎回） | 久期区间管理 + 流动性缓冲 | 保留 5%-10% 高流动性资产 | 每月 |\r\n| 收益率曲线非平行变动 | 关键利率久期（KRD）管理 | 各关键期限敞口 ≤总敞口 30% | 每月 |\r\n\r\n#### 3.3 Portfolio Review Checklist / 组合复核清单\r\n\r\n| 检查项 | 阈值（示例） | 触发动作 |\r\n|-------|-----------|---------|\r\n| 组合久期偏离基准 | ±0.5 年以内 | 超出则再平衡 |\r\n| 单一主体集中度 | ≤5% | 超限则减仓或专项说明 |\r\n| 弱资质主体（AA 及以下）占比 | ≤15% | 超限须专项审批 |\r\n| 高流动性资产占比 | ≥5% | 低于则补充 |\r\n| 估值偏离中债估值 | ±30bp 以内 | 偏离需说明原因 |\r\n| 到期滚续缺口 | 未来 3 个月到期 ≤可动用资金 | 存在缺口须提前安排 |\r\n\r\n### 4. Convertible Bond Analysis / 可转债分析\r\n\r\n```python\r\ndef analyze_convertible(convert_price: float, stock_price: float,\r\n                        bond_floor: float, market_price: float) -> dict:\r\n    \"\"\"\r\n    可转债关键指标测算（供研究参考）\r\n    \"\"\"\r\n    conversion_value = 100 / convert_price * stock_price   # 每百元面值的转股价值\r\n    premium_rate = (market_price - conversion_value) / conversion_value * 100\r\n    downside_buffer = (market_price - bond_floor) / bond_floor * 100\r\n\r\n    return {\r\n        \"conversion_value\": round(conversion_value, 2),\r\n        \"conversion_premium_rate\": round(premium_rate, 2),   # 转股溢价率\r\n        \"downside_buffer\": round(downside_buffer, 2),        # 相对纯债价值的溢价比\r\n        \"reading\": \"转股溢价率偏高，股性偏弱\" if premium_rate > 30 else \"股性相对较强\"\r\n    }\r\n```\r\n\r\n| 指标 | 计算口径 | 解读要点 |\r\n|-----|---------|---------|\r\n| 转股价值 | 100 ÷ 转股价 × 正股价 | 与转债价格对比得出溢价率 |\r\n| 转股溢价率 | (转债价 − 转股价值) ÷ 转股价值 | 越高说明股性越弱、对正股上涨越不敏感 |\r\n| 纯债价值 | 按同评级同期限信用债 YTM 折现 | 构成转债的价格下限 |\r\n| 双低值 | 转债价 + 转股溢价率 × 100 | 常用的相对估值筛选口径之一 |\r\n| 条款触发进度 | 修正/赎回/回售条款的交易日计数 | 强赎触发后按面值加利息赎回，须重点关注 |\r\n\r\n**示例**：某转债转股价 12.00 元，正股价 13.20 元，转债市场价 128.50 元，同评级纯债价值约 92 元。\r\n- 转股价值 = 100 ÷ 12.00 × 13.20 = 110.00 元；\r\n- 转股溢价率 = (128.50 − 110.00) ÷ 110.00 = 16.8%（股性相对较强）；\r\n- 相对纯债价值的溢价比 = (128.50 − 92.00) ÷ 92.00 = 39.7%（保护垫较薄，正股下跌时回撤空间大）。\r\n\r\n**条款风险提示**：当正股满足\"连续 30 个交易日中至少 15 个交易日收盘价 ≥ 转股价 130%\"时，多数转债条款将触发强赎条件。持有高溢价转债且已触发强赎的，需及时评估转股或卖出，否则可能被按面值加当期利息赎回。\r\n\r\n---\r\n\r\n## Risk Control Checklist / 风控与合规检查清单\r\n\r\n| 检查项 | 依据/说明 | 通过标准 |\r\n|-------|---------|---------|\r\n| 估值口径统一 | 全价/净价、付息频率、应计利息规则 | 全组合统一并留痕 |\r\n| 数据来源 | 中债估值等公开基准 | 记录取值日期与来源 |\r\n| 评级一致性 | 外部评级与内部评级差异 | 差异超一档须专项说明 |\r\n| 集中度管理 | 单一主体、单一区域、单一行业占比 | 均在预设阈值内 |\r\n| 久期偏离 | 相对基准的久期偏离 | 处于允许区间 |\r\n| 流动性分层 | 单券持仓相对日均成交 | 不超过预设上限 |\r\n| 违约处置预案 | 违约债券处置流程与台账 | 有流程、有责任人 |\r\n| 免责表述 | 分析结果仅供参考，不构成投资建议 | 每份输出均含声明 |\r\n\r\n---\r\n\r\n## Quick Command Templates / 快速指令模板\r\n\r\n**债券定价：**\r\n```\r\n计算债券价格：\r\n- 面值：100元\r\n- 票面利率：4%\r\n- 到期收益率：3.5%\r\n- 剩余期限：5年\r\n- 付息频率：年付\r\n```\r\n\r\n**久期分析：**\r\n```\r\n分析债券组合的久期风险：\r\n- 组合总规模：1000万\r\n- 利率上升50bp时的损益\r\n```\r\n\r\n**信用利差分析：**\r\n```\r\n分析信用利差：\r\n- 债券YTM：3.68%\r\n- 同期限国债收益率：2.50%\r\n- 主体评级：AA+\r\n需要输出：利差绝对值、对应评级参考利差、近3年利差分位、初步判断与需进一步核验清单\r\n```\r\n\r\n**可转债分析：**\r\n```\r\n分析可转债：\r\n- 转股价：12.00元，正股价：13.20元\r\n- 转债市场价：128.50元，同评级纯债价值约92元\r\n输出转股价值、转股溢价率、相对纯债溢价比，并核验强赎条款触发进度\r\n```\r\n\r\n**城投主体复核：**\r\n```\r\n复核某城投主体信用状况：\r\n- 区域：某地级市\r\n- 需要维度：一般公共预算收入、债务率、平台层级、近12个月发行与到期规模\r\n- 要求：给出分级判断与需进一步核验清单\r\n```\r\n\r\n---\r\n\r\n## Disclaimer\r\n\r\nBond analysis involves various risks including interest rate risk and credit risk. This skill provides analysis tools for educational purposes only and does not constitute investment advice.\n\nFile v3.0.2:_meta.json\n\n{\n  \"ownerId\": \"kn74e704j3ygjcygnpf02rdvd185js13\",\n  \"slug\": \"security-bond-analysis\",\n  \"version\": \"3.0.2\",\n  \"publishedAt\": 1789311303922\n}\n\nFile v3.0.2:skill-card.md\n\n## Description:\n\nAI-powered bond analysis expert for China market that covers bond valuation, yield analysis, duration and convexity calculation, credit spread analysis, convertible bond review, and bond portfolio management.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[gechengling](https://clawhub.ai/user/gechengling)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nFixed income analysts, bond traders, and portfolio managers use this skill to structure China bond valuation, yield, duration, convexity, credit spread, convertible bond, and portfolio risk analysis. Outputs should be treated as reference analysis and checked against current official market and regulatory sources before use in decisions.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Static regulatory and market examples may become outdated or differ from current market conditions.\n\nMitigation: Verify current market data and regulatory requirements from official sources before relying on the output.\n\nRisk: Bond and fixed-income analysis outputs could be mistaken for investment advice.\n\nMitigation: Treat outputs as reference material only and require qualified human review before trading, portfolio, or risk decisions.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/gechengling/skills/security-bond-analysis)\n- [Publisher profile](https://clawhub.ai/user/gechengling)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, code, guidance]\n\n**Output Format:** [Markdown with tables, examples, and inline code blocks]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May include valuation formulas, analysis templates, checklist-style review guidance, and sample Python snippets.]\n\n## Skill Version(s):\n\n3.0.2 (source: SKILL.md frontmatter and server release evidence)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nArchive v3.0.1: 3 files, 5465 bytes\n\nFiles: skill-card.md (2198b), SKILL.md (11602b), _meta.json (141b)\n\nFile v3.0.1:SKILL.md\n\n---\r\nname: Bond Analysis Expert\r\nslug: security-bond-analysis\r\ndescription: AI-powered bond analysis expert for China market — covers bond valuation, yield analysis, duration/convexity calculation, credit spread analysis, and bond portfolio management. Built for fixed income analysts, bond traders, and portfolio managers. Keywords: bond analysis, yield curve, duration, convexity, credit spread, China bonds,利率债, 信用债, 国债, 企业债, 城投债, 债券估值, 收益率曲线, 久期, 凸性, 信用利差, 固收, 利率风险, 债券组合.\r\nversion: \"3.0.1\"\r\n---\r\n\r\n# Bond Analysis Expert / 债券分析专家\r\n\r\n> **English:** AI-powered bond analysis expert — covers bond valuation, yield analysis, duration/convexity calculation, credit spread analysis, and bond portfolio management. Built for fixed income professionals.\r\n>\r\n> **中文:** 债券分析专家——覆盖债券估值、收益率分析、久期/凸性计算、信用利差分析、债券组合管理。适用：固收分析师、债券交易员、组合管理人。\r\n\r\n---\r\n\r\n\r\n### 证券监管最新动态 [2026-05-25更新]\r\n\r\n| 动态类型 | 内容摘要 | 影响范围 |\r\n|---------|---------|---------|\r\n| 证券监管 | 2026年Q1：信用债市场分化加剧，信用风险识别要求提升 | 债券分析框架需纳入理财新规和地方债务化解动态 |\r\n| 证券监管 | 银行理财'三清'推进，债券投资偏好可能调整 | 债券分析框架需纳入理财新规和地方债务化解动态 |\r\n| 证券监管 | 地方债务化解持续推进，城投债分析逻辑需更新 | 债券分析框架需纳入理财新规和地方债务化解动态 |\r\n\r\n> **数据截止**: 2026-05-25 | 来源：证监会、NFRA、中证协、安永Q1分析\r\n> **声明**: 以上动态供参考，具体以官方最新发布为准\r\n\r\n## Industry Pain Points / 行业痛点\r\n\r\n| Pain Point / 痛点 | Impact / 影响 | Solution / 本Skill解决方案 |\r\n|------------------|-------------|------------------------|\r\n| **收益率计算复杂** | 多种收益率指标容易混淆 | 标准化收益率计算框架 |\r\n| **信用分析耗时** | 发行主体众多，分析量大 | 模板化信用分析框架 |\r\n| **利率风险难测** | 久期/凸性概念抽象 | 可视化风险分析 |\r\n| **城投债信仰** | 城投刚兑预期与违约现实冲突 | 区域财政分析模型 |\r\n| **久期管理难** | 利率变动对组合影响大 | 久期匹配优化工具 |\r\n\r\n---\r\n\r\n## Trigger Keywords / 触发关键词\r\n\r\n**English Triggers:** bond analysis, yield curve, duration, convexity, credit spread, China bonds, fixed income, bond valuation, interest rate risk, credit risk\r\n\r\n**中文触发词（优先）：** 债券分析 / 收益率曲线 / 久期 / 凸性 / 信用利差 / 中国债券 / 固收 / 债券估值 / 利率风险 / 信用风险 / 国债 / 企业债 / 城投债 / 金融债 / 可转债 / 债券回购 / 债券评级 / YTM / 即期收益率 / 到期收益率\r\n\r\n---\r\n\r\n## Core Capabilities / 核心能力\r\n\r\n### 1. Bond Valuation Engine / 债券估值引擎\r\n\r\n```python\r\nimport numpy as np\r\nimport pandas as pd\r\n\r\nclass BondAnalyzer:\r\n    \"\"\"债券分析引擎\"\"\"\r\n    \r\n    @staticmethod\r\n    def calculate_price(face_value: float, coupon_rate: float, \r\n                       ytm: float, years: int, \r\n                       frequency: int = 2) -> float:\r\n        \"\"\"\r\n        债券定价\r\n        Args:\r\n            face_value: 面值（元）\r\n            coupon_rate: 年票面利率\r\n            ytm: 到期收益率\r\n            years: 剩余期限（年）\r\n            frequency: 付息频率（1=年付，2=半年付）\r\n        \"\"\"\r\n        n = years * frequency\r\n        r_per_period = ytm / frequency\r\n        c_per_period = (face_value * coupon_rate) / frequency\r\n        \r\n        # 现金流现值\r\n        pv_coupons = sum([c_per_period / (1 + r_per_period) ** t \r\n                         for t in range(1, n + 1)])\r\n        pv_face = face_value / (1 + r_per_period) ** n\r\n        \r\n        return pv_coupons + pv_face\r\n    \r\n    @staticmethod\r\n    def calculate_ytm(price: float, face_value: float,\r\n                     coupon_rate: float, years: float,\r\n                     frequency: int = 2) -> float:\r\n        \"\"\"\r\n        计算到期收益率（YTM）- 牛顿迭代法\r\n        \"\"\"\r\n        n = years * frequency\r\n        c = (face_value * coupon_rate) / frequency\r\n        \r\n        # 初始猜测\r\n        ytm = coupon_rate\r\n        \r\n        for _ in range(100):\r\n            pv = sum([c / (1 + ytm/frequency) ** t \r\n                     for t in range(1, n + 1)]) + face_value / (1 + ytm/frequency) ** n\r\n            \r\n            diff = price - pv\r\n            \r\n            # 导数（久期近似）\r\n            duration = BondAnalyzer.calculate_duration(\r\n                price, face_value, coupon_rate, ytm, years, frequency\r\n            )\r\n            dv = -duration / (1 + ytm/frequency) * diff\r\n            \r\n            ytm = ytm + diff / dv * 0.5\r\n            \r\n            if abs(diff) < 1e-6:\r\n                break\r\n        \r\n        return ytm\r\n    \r\n    @staticmethod\r\n    def calculate_duration(price: float, face_value: float,\r\n                          coupon_rate: float, ytm: float,\r\n                          years: float, frequency: int = 2) -> float:\r\n        \"\"\"\r\n        计算久期（Macauley Duration）\r\n        \"\"\"\r\n        n = int(years * frequency)\r\n        c = (face_value * coupon_rate) / frequency\r\n        r = ytm / frequency\r\n        \r\n        # 加权平均到期时间\r\n        weighted_time = sum([t * c / (1 + r) ** t for t in range(1, n + 1)])\r\n        weighted_time += n * face_value / (1 + r) ** n\r\n        \r\n        return weighted_time / price / frequency  # 转换为年\r\n    \r\n    @staticmethod\r\n    def calculate_convexity(price: float, face_value: float,\r\n                          coupon_rate: float, ytm: float,\r\n                          years: float, frequency: int = 2) -> float:\r\n        \"\"\"\r\n        计算凸性\r\n        \"\"\"\r\n        n = int(years * frequency)\r\n        c = (face_value * coupon_rate) / frequency\r\n        r = ytm / frequency\r\n        \r\n        weighted_sq = sum([t * (t + 1) * c / (1 + r) ** (t + 2) \r\n                          for t in range(1, n + 1)])\r\n        weighted_sq += n * (n + 1) * face_value / (1 + r) ** (n + 2)\r\n        \r\n        return weighted_sq / price / (frequency ** 2)\r\n    \r\n    @staticmethod\r\n    def price_change_estimate(duration: float, convexity: float,\r\n                             rate_change: float) -> dict:\r\n        \"\"\"\r\n        利率变动对价格的影响估算\r\n        \"\"\"\r\n        # 久期效应\r\n        duration_effect = -duration * rate_change\r\n        \r\n        # 凸性效应\r\n        convexity_effect = 0.5 * convexity * (rate_change ** 2)\r\n        \r\n        total_effect = duration_effect + convexity_effect\r\n        \r\n        return {\r\n            \"duration_effect\": round(duration_effect * 100, 4),\r\n            \"convexity_effect\": round(convexity_effect * 100, 4),\r\n            \"total_effect\": round(total_effect * 100, 4),\r\n            \"approximate_new_price_pct\": round((1 + total_effect) * 100, 4)\r\n        }\r\n```\r\n\r\n### 2. Credit Analysis Framework / 信用分析框架\r\n\r\n```markdown\r\n## 信用债分析模板\r\n\r\n### 一、发债主体概况\r\n| 项目 | 内容 |\r\n|-----|------|\r\n| 公司名称 | |\r\n| 实际控制人 | |\r\n| 主体评级 | |\r\n| 行业分类 | |\r\n| 主营业务 | |\r\n\r\n### 二、财务分析\r\n```python\r\nCREDIT_ANALYSIS_RATIOS = {\r\n    \"盈利能力\": {\r\n        \"毛利率\": \">30%为优质\",\r\n        \"净利率\": \">15%为优质\",\r\n        \"ROE\": \">10%为优质\"\r\n    },\r\n    \"偿债能力\": {\r\n        \"资产负债率\": \"<70%为稳健\",\r\n        \"流动比率\": \">1.5为稳健\",\r\n        \"利息保障倍数\": \">3倍为稳健\"\r\n    },\r\n    \"现金流\": {\r\n        \"经营现金流/带息债务\": \">15%为稳健\",\r\n        \"经营现金流/资本支出\": \">100%为稳健\"\r\n    }\r\n}\r\n```\r\n\r\n### 三、信用利差分析\r\n```python\r\ndef analyze_credit_spread(bond_yield: float, treasury_yield: float,\r\n                         rating: str) -> dict:\r\n    \"\"\"\r\n    信用利差分析\r\n    \"\"\"\r\n    spread = bond_yield - treasury_yield\r\n    \r\n    # 评级对应利差参考\r\n    SPREAD_REFERENCE = {\r\n        \"AAA\": 0.50,  # 50bp\r\n        \"AA+\": 0.80,\r\n        \"AA\": 1.20,\r\n        \"AA-\": 1.50,\r\n        \"A+\": 2.00,\r\n        \"A\": 2.50\r\n    }\r\n    \r\n    reference = SPREAD_REFERENCE.get(rating, 2.0)\r\n    \r\n    return {\r\n        \"credit_spread\": round(spread * 100, 2),\r\n        \"reference_spread\": reference,\r\n        \"relative_value\": \"低估\" if spread < reference else \"高估\",\r\n        \"spread_premium\": round((spread - reference) * 100, 2)\r\n    }\r\n```\r\n```\r\n\r\n### 3. Bond Portfolio Management / 债券组合管理\r\n\r\n```python\r\nclass BondPortfolio:\r\n    \"\"\"债券组合管理\"\"\"\r\n    \r\n    def __init__(self):\r\n        self.bonds = []\r\n    \r\n    def add_bond(self, bond: dict):\r\n        \"\"\"添加债券\"\"\"\r\n        # 计算关键指标\r\n        bond[\"price\"] = self._calculate_bond_price(bond)\r\n        bond[\"ytm\"] = self._calculate_ytm(bond)\r\n        bond[\"duration\"] = self._calculate_duration(bond)\r\n        bond[\"convexity\"] = self._calculate_convexity(bond)\r\n        bond[\"dv01\"] = bond[\"duration\"] * bond[\"price\"] / 100 / 100  # 每bp变化\r\n        \r\n        self.bonds.append(bond)\r\n    \r\n    def portfolio_duration(self) -> float:\r\n        \"\"\"组合久期\"\"\"\r\n        total_value = sum(b[\"market_value\"] for b in self.bonds)\r\n        weighted_duration = sum(\r\n            b[\"duration\"] * b[\"market_value\"] for b in self.bonds\r\n        ) / total_value\r\n        return weighted_duration\r\n    \r\n    def portfolio_credit_breakdown(self) -> dict:\r\n        \"\"\"组合信用分布\"\"\"\r\n        breakdown = {}\r\n        for bond in self.bonds:\r\n            rating = bond.get(\"rating\", \"Unknown\")\r\n            if rating not in breakdown:\r\n                breakdown[rating] = {\"count\": 0, \"value\": 0}\r\n            breakdown[rating][\"count\"] += 1\r\n            breakdown[rating][\"value\"] += bond.get(\"market_value\", 0)\r\n        \r\n        return breakdown\r\n    \r\n    def interest_rate_risk(self, rate_shock: float) -> dict:\r\n        \"\"\"利率风险分析\"\"\"\r\n        port_duration = self.portfolio_duration()\r\n        \r\n        # 纯久期效应\r\n        duration_pnl = -port_duration * rate_shock / 100\r\n        \r\n        # 凸性调整\r\n        port_convexity = sum(\r\n            b[\"convexity\"] * b[\"market_value\"] for b in self.bonds\r\n        ) / sum(b[\"market_value\"] for b in self.bonds)\r\n        convexity_pnl = 0.5 * port_convexity * (rate_shock/100) ** 2\r\n        \r\n        return {\r\n            \"portfolio_duration\": round(port_duration, 3),\r\n            \"rate_shock_bp\": round(rate_shock * 100, 0),\r\n            \"duration_pnl_pct\": round(duration_pnl * 100, 2),\r\n            \"convexity_pnl_pct\": round(convexity_pnl * 100, 2),\r\n            \"total_pnl_pct\": round((duration_pnl + convexity_pnl) * 100, 2)\r\n        }\r\n```\r\n\r\n---\r\n\r\n## Quick Command Templates / 快速指令模板\r\n\r\n**债券定价：**\r\n```\r\n计算债券价格：\r\n- 面值：100元\r\n- 票面利率：4%\r\n- 到期收益率：3.5%\r\n- 剩余期限：5年\r\n- 付息频率：年付\r\n```\r\n\r\n**久期分析：**\r\n```\r\n分析债券组合的久期风险：\r\n- 组合总规模：1000万\r\n- 利率上升50bp时的损益\r\n```\r\n\r\n---\r\n\r\n## Disclaimer\r\n\r\nBond analysis involves various risks including interest rate risk and credit risk. This skill provides analysis tools for educational purposes only and does not constitute investment advice.\n\nFile v3.0.1:_meta.json\n\n{\n  \"ownerId\": \"kn74e704j3ygjcygnpf02rdvd185js13\",\n  \"slug\": \"security-bond-analysis\",\n  \"version\": \"3.0.1\",\n  \"publishedAt\": 1779680483160\n}\n\nFile v3.0.1:skill-card.md\n\n## Description: <br>\nAI-powered bond analysis for the China market, including valuation, yield analysis, duration and convexity calculation, credit spread analysis, and bond portfolio management. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[gechengling](https://clawhub.ai/user/gechengling) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nFixed income analysts, bond traders, and portfolio managers use this skill to structure China bond valuation, yield, duration, convexity, credit spread, interest-rate risk, and portfolio analysis. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Bond analysis outputs may be incorrect or outdated if market, issuer, rating, or regulatory inputs are stale. <br>\nMitigation: Verify current market, issuer, rating, and regulatory information from trusted sources before relying on outputs. <br>\nRisk: The skill provides educational finance analysis and may be mistaken for investment advice. <br>\nMitigation: Treat outputs as analytical support only and apply professional review before making investment decisions. <br>\nRisk: Broad trigger keywords could invoke the skill for prompts that are only loosely related to bond analysis. <br>\nMitigation: Use narrower triggers when deployments should limit activation to explicit bond-analysis requests. <br>\n\n\n## Reference(s): <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [Analysis, Markdown, Code, Guidance] <br>\n**Output Format:** [Markdown with tables, formulas, and Python code examples] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Provides educational finance analysis frameworks and templates; users should verify market, issuer, rating, and regulatory inputs before relying on outputs.] <br>\n\n## Skill Version(s): <br>\n3.0.1 (source: frontmatter and server release evidence) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nArchive v2.0.0: 2 files, 3998 bytes\n\nFiles: SKILL.md (10836b), _meta.json (141b)\n\nFile v2.0.0:SKILL.md\n\n---\r\nname: Bond Analysis Expert\r\nslug: security-bond-analysis\r\ndescription: AI-powered bond analysis expert for China market — covers bond valuation, yield analysis, duration/convexity calculation, credit spread analysis, and bond portfolio management. Built for fixed income analysts, bond traders, and portfolio managers. Keywords: bond analysis, yield curve, duration, convexity, credit spread, China bonds,利率债, 信用债, 国债, 企业债, 城投债, 债券估值, 收益率曲线, 久期, 凸性, 信用利差, 固收, 利率风险, 债券组合.\r\nversion: 1.0.0\r\n---\r\n\r\n# Bond Analysis Expert / 债券分析专家\r\n\r\n> **English:** AI-powered bond analysis expert — covers bond valuation, yield analysis, duration/convexity calculation, credit spread analysis, and bond portfolio management. Built for fixed income professionals.\r\n>\r\n> **中文:** 债券分析专家——覆盖债券估值、收益率分析、久期/凸性计算、信用利差分析、债券组合管理。适用：固收分析师、债券交易员、组合管理人。\r\n\r\n---\r\n\r\n## Industry Pain Points / 行业痛点\r\n\r\n| Pain Point / 痛点 | Impact / 影响 | Solution / 本Skill解决方案 |\r\n|------------------|-------------|------------------------|\r\n| **收益率计算复杂** | 多种收益率指标容易混淆 | 标准化收益率计算框架 |\r\n| **信用分析耗时** | 发行主体众多，分析量大 | 模板化信用分析框架 |\r\n| **利率风险难测** | 久期/凸性概念抽象 | 可视化风险分析 |\r\n| **城投债信仰** | 城投刚兑预期与违约现实冲突 | 区域财政分析模型 |\r\n| **久期管理难** | 利率变动对组合影响大 | 久期匹配优化工具 |\r\n\r\n---\r\n\r\n## Trigger Keywords / 触发关键词\r\n\r\n**English Triggers:** bond analysis, yield curve, duration, convexity, credit spread, China bonds, fixed income, bond valuation, interest rate risk, credit risk\r\n\r\n**中文触发词（优先）：** 债券分析 / 收益率曲线 / 久期 / 凸性 / 信用利差 / 中国债券 / 固收 / 债券估值 / 利率风险 / 信用风险 / 国债 / 企业债 / 城投债 / 金融债 / 可转债 / 债券回购 / 债券评级 / YTM / 即期收益率 / 到期收益率\r\n\r\n---\r\n\r\n## Core Capabilities / 核心能力\r\n\r\n### 1. Bond Valuation Engine / 债券估值引擎\r\n\r\n```python\r\nimport numpy as np\r\nimport pandas as pd\r\n\r\nclass BondAnalyzer:\r\n    \"\"\"债券分析引擎\"\"\"\r\n    \r\n    @staticmethod\r\n    def calculate_price(face_value: float, coupon_rate: float, \r\n                       ytm: float, years: int, \r\n                       frequency: int = 2) -> float:\r\n        \"\"\"\r\n        债券定价\r\n        Args:\r\n            face_value: 面值（元）\r\n            coupon_rate: 年票面利率\r\n            ytm: 到期收益率\r\n            years: 剩余期限（年）\r\n            frequency: 付息频率（1=年付，2=半年付）\r\n        \"\"\"\r\n        n = years * frequency\r\n        r_per_period = ytm / frequency\r\n        c_per_period = (face_value * coupon_rate) / frequency\r\n        \r\n        # 现金流现值\r\n        pv_coupons = sum([c_per_period / (1 + r_per_period) ** t \r\n                         for t in range(1, n + 1)])\r\n        pv_face = face_value / (1 + r_per_period) ** n\r\n        \r\n        return pv_coupons + pv_face\r\n    \r\n    @staticmethod\r\n    def calculate_ytm(price: float, face_value: float,\r\n                     coupon_rate: float, years: float,\r\n                     frequency: int = 2) -> float:\r\n        \"\"\"\r\n        计算到期收益率（YTM）- 牛顿迭代法\r\n        \"\"\"\r\n        n = years * frequency\r\n        c = (face_value * coupon_rate) / frequency\r\n        \r\n        # 初始猜测\r\n        ytm = coupon_rate\r\n        \r\n        for _ in range(100):\r\n            pv = sum([c / (1 + ytm/frequency) ** t \r\n                     for t in range(1, n + 1)]) + face_value / (1 + ytm/frequency) ** n\r\n            \r\n            diff = price - pv\r\n            \r\n            # 导数（久期近似）\r\n            duration = BondAnalyzer.calculate_duration(\r\n                price, face_value, coupon_rate, ytm, years, frequency\r\n            )\r\n            dv = -duration / (1 + ytm/frequency) * diff\r\n            \r\n            ytm = ytm + diff / dv * 0.5\r\n            \r\n            if abs(diff) < 1e-6:\r\n                break\r\n        \r\n        return ytm\r\n    \r\n    @staticmethod\r\n    def calculate_duration(price: float, face_value: float,\r\n                          coupon_rate: float, ytm: float,\r\n                          years: float, frequency: int = 2) -> float:\r\n        \"\"\"\r\n        计算久期（Macauley Duration）\r\n        \"\"\"\r\n        n = int(years * frequency)\r\n        c = (face_value * coupon_rate) / frequency\r\n        r = ytm / frequency\r\n        \r\n        # 加权平均到期时间\r\n        weighted_time = sum([t * c / (1 + r) ** t for t in range(1, n + 1)])\r\n        weighted_time += n * face_value / (1 + r) ** n\r\n        \r\n        return weighted_time / price / frequency  # 转换为年\r\n    \r\n    @staticmethod\r\n    def calculate_convexity(price: float, face_value: float,\r\n                          coupon_rate: float, ytm: float,\r\n                          years: float, frequency: int = 2) -> float:\r\n        \"\"\"\r\n        计算凸性\r\n        \"\"\"\r\n        n = int(years * frequency)\r\n        c = (face_value * coupon_rate) / frequency\r\n        r = ytm / frequency\r\n        \r\n        weighted_sq = sum([t * (t + 1) * c / (1 + r) ** (t + 2) \r\n                          for t in range(1, n + 1)])\r\n        weighted_sq += n * (n + 1) * face_value / (1 + r) ** (n + 2)\r\n        \r\n        return weighted_sq / price / (frequency ** 2)\r\n    \r\n    @staticmethod\r\n    def price_change_estimate(duration: float, convexity: float,\r\n                             rate_change: float) -> dict:\r\n        \"\"\"\r\n        利率变动对价格的影响估算\r\n        \"\"\"\r\n        # 久期效应\r\n        duration_effect = -duration * rate_change\r\n        \r\n        # 凸性效应\r\n        convexity_effect = 0.5 * convexity * (rate_change ** 2)\r\n        \r\n        total_effect = duration_effect + convexity_effect\r\n        \r\n        return {\r\n            \"duration_effect\": round(duration_effect * 100, 4),\r\n            \"convexity_effect\": round(convexity_effect * 100, 4),\r\n            \"total_effect\": round(total_effect * 100, 4),\r\n            \"approximate_new_price_pct\": round((1 + total_effect) * 100, 4)\r\n        }\r\n```\r\n\r\n### 2. Credit Analysis Framework / 信用分析框架\r\n\r\n```markdown\r\n## 信用债分析模板\r\n\r\n### 一、发债主体概况\r\n| 项目 | 内容 |\r\n|-----|------|\r\n| 公司名称 | |\r\n| 实际控制人 | |\r\n| 主体评级 | |\r\n| 行业分类 | |\r\n| 主营业务 | |\r\n\r\n### 二、财务分析\r\n```python\r\nCREDIT_ANALYSIS_RATIOS = {\r\n    \"盈利能力\": {\r\n        \"毛利率\": \">30%为优质\",\r\n        \"净利率\": \">15%为优质\",\r\n        \"ROE\": \">10%为优质\"\r\n    },\r\n    \"偿债能力\": {\r\n        \"资产负债率\": \"<70%为稳健\",\r\n        \"流动比率\": \">1.5为稳健\",\r\n        \"利息保障倍数\": \">3倍为稳健\"\r\n    },\r\n    \"现金流\": {\r\n        \"经营现金流/带息债务\": \">15%为稳健\",\r\n        \"经营现金流/资本支出\": \">100%为稳健\"\r\n    }\r\n}\r\n```\r\n\r\n### 三、信用利差分析\r\n```python\r\ndef analyze_credit_spread(bond_yield: float, treasury_yield: float,\r\n                         rating: str) -> dict:\r\n    \"\"\"\r\n    信用利差分析\r\n    \"\"\"\r\n    spread = bond_yield - treasury_yield\r\n    \r\n    # 评级对应利差参考\r\n    SPREAD_REFERENCE = {\r\n        \"AAA\": 0.50,  # 50bp\r\n        \"AA+\": 0.80,\r\n        \"AA\": 1.20,\r\n        \"AA-\": 1.50,\r\n        \"A+\": 2.00,\r\n        \"A\": 2.50\r\n    }\r\n    \r\n    reference = SPREAD_REFERENCE.get(rating, 2.0)\r\n    \r\n    return {\r\n        \"credit_spread\": round(spread * 100, 2),\r\n        \"reference_spread\": reference,\r\n        \"relative_value\": \"低估\" if spread < reference else \"高估\",\r\n        \"spread_premium\": round((spread - reference) * 100, 2)\r\n    }\r\n```\r\n```\r\n\r\n### 3. Bond Portfolio Management / 债券组合管理\r\n\r\n```python\r\nclass BondPortfolio:\r\n    \"\"\"债券组合管理\"\"\"\r\n    \r\n    def __init__(self):\r\n        self.bonds = []\r\n    \r\n    def add_bond(self, bond: dict):\r\n        \"\"\"添加债券\"\"\"\r\n        # 计算关键指标\r\n        bond[\"price\"] = self._calculate_bond_price(bond)\r\n        bond[\"ytm\"] = self._calculate_ytm(bond)\r\n        bond[\"duration\"] = self._calculate_duration(bond)\r\n        bond[\"convexity\"] = self._calculate_convexity(bond)\r\n        bond[\"dv01\"] = bond[\"duration\"] * bond[\"price\"] / 100 / 100  # 每bp变化\r\n        \r\n        self.bonds.append(bond)\r\n    \r\n    def portfolio_duration(self) -> float:\r\n        \"\"\"组合久期\"\"\"\r\n        total_value = sum(b[\"market_value\"] for b in self.bonds)\r\n        weighted_duration = sum(\r\n            b[\"duration\"] * b[\"market_value\"] for b in self.bonds\r\n        ) / total_value\r\n        return weighted_duration\r\n    \r\n    def portfolio_credit_breakdown(self) -> dict:\r\n        \"\"\"组合信用分布\"\"\"\r\n        breakdown = {}\r\n        for bond in self.bonds:\r\n            rating = bond.get(\"rating\", \"Unknown\")\r\n            if rating not in breakdown:\r\n                breakdown[rating] = {\"count\": 0, \"value\": 0}\r\n            breakdown[rating][\"count\"] += 1\r\n            breakdown[rating][\"value\"] += bond.get(\"market_value\", 0)\r\n        \r\n        return breakdown\r\n    \r\n    def interest_rate_risk(self, rate_shock: float) -> dict:\r\n        \"\"\"利率风险分析\"\"\"\r\n        port_duration = self.portfolio_duration()\r\n        \r\n        # 纯久期效应\r\n        duration_pnl = -port_duration * rate_shock / 100\r\n        \r\n        # 凸性调整\r\n        port_convexity = sum(\r\n            b[\"convexity\"] * b[\"market_value\"] for b in self.bonds\r\n        ) / sum(b[\"market_value\"] for b in self.bonds)\r\n        convexity_pnl = 0.5 * port_convexity * (rate_shock/100) ** 2\r\n        \r\n        return {\r\n            \"portfolio_duration\": round(port_duration, 3),\r\n            \"rate_shock_bp\": round(rate_shock * 100, 0),\r\n            \"duration_pnl_pct\": round(duration_pnl * 100, 2),\r\n            \"convexity_pnl_pct\": round(convexity_pnl * 100, 2),\r\n            \"total_pnl_pct\": round((duration_pnl + convexity_pnl) * 100, 2)\r\n        }\r\n```\r\n\r\n---\r\n\r\n## Quick Command Templates / 快速指令模板\r\n\r\n**债券定价：**\r\n```\r\n计算债券价格：\r\n- 面值：100元\r\n- 票面利率：4%\r\n- 到期收益率：3.5%\r\n- 剩余期限：5年\r\n- 付息频率：年付\r\n```\r\n\r\n**久期分析：**\r\n```\r\n分析债券组合的久期风险：\r\n- 组合总规模：1000万\r\n- 利率上升50bp时的损益\r\n```\r\n\r\n---\r\n\r\n## Disclaimer\r\n\r\nBond analysis involves various risks including interest rate risk and credit risk. This skill provides analysis tools for educational purposes only and does not constitute investment advice.\n\nFile v2.0.0:_meta.json\n\n{\n  \"ownerId\": \"kn74e704j3ygjcygnpf02rdvd185js13\",\n  \"slug\": \"security-bond-analysis\",\n  \"version\": \"2.0.0\",\n  \"publishedAt\": 1778514023173\n}","readmeExcerpt":"Skill: Security Bond Analysis Owner: gechengling Summary: AI-powered bond analysis for China market including valuation, yield, duration, convexity, credit spread analysis, and bond portfolio management. Tags: latest:3.0.3, security-bond-analysis:3.0.3 Version history: v3.0.3 | 2026-10-08T05:21:37.017Z | user 3.0.3: content update v3.0.2 | 2026-09-13T14:55:03.922Z | user 内容增强：新增债券估值结果解读、久期凸性组合效应对照与三类常见计算错误；信用分析补财务指标四","codeSnippets":[],"executableExamples":[],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\r\nname: Bond Analysis Expert\r\nslug: security-bond-analysis\r\ndescription: AI-powered bond analysis expert for China market — bond pricing and YTM, Macaulay/modified duration and convexity, DV01, credit spread percentiles, LGFV (城投) regional review, convertible bond metrics and portfolio interest-rate scenarios. Scope: fixed-income analytics on China onshore bonds; not equity research, not credit rating issuance. Keywords: bond pricing and YTM, duration and convexity, DV01, credit spread percentile, LGFV regional analysis, convertible bond metrics, interest rate scenario P&L, 债券估值, 到期收益率, 久期与凸性, DV01, 信用利差分位, 城投区域分析, 可转债指标, 利率情景损益.\r\nversion: \"3.0.3\"\r\n---\r\n\r\n# Bond Analysis Expert / 债券分析专家\r\n\r\n> **English:** AI-powered bond analysis expert — covers bond valuation, yield analysis, duration/convexity calculation, credit spread analysis, and bond portfolio management. Built for fixed income professionals.\r\n>\r\n> **中文:** 债券分析专家——覆盖债券估值、收益率分析、久期/凸性计算、信用利差分析、债券组合管理。适用：固收分析师、债券交易员、组合管理人。\r\n\r\n\r\n## 数据最小化声明与执行边界 / Data Minimisation & Execution Boundary\r\n\r\n**数据最小化前置声明：** 使用本技能时，请只提供债券分析所必需的输入——债券代码或简称、票面利率、剩余期限、付息频率、市场净价或YTM、主体评级、组合权重（用百分比或\"约1000万\"这类量级）。**不要**粘贴账户持仓明细、交易对手信息、客户身份信息、未公开的发行文件内部版本或未经授权的内幕信息。\r\n\r\n**保存与预览确认：** 本技能不执行任何保存动作。若你在自己环境中依据本技能生成估值表、信用分析模板或利率情景损益表，请在落盘或对外报送前**先预览结果、确认全价/净价与付息频率口径一致，再保存或提交**。\r\n\r\n**代码块性质与执行边界**\r\n\r\n| 内容 | 性质 | 谁来执行 |\r\n|------|------|---------|\r\n| `BondAnalyzer` 类（定价/YTM/久期/凸性/DV01） | 固收指标的计算口径说明 | 由固收分析师在自有系统中取数复现；技能不取数、不运行 |\r\n| `CREDIT_ANALYSIS_RATIOS` 与 `analyze_credit_spread()` | 财务分层阈值与利差对照的示意 | 由信用研究员在自有系统中使用 |\r\n| `BondPortfolio` 类（组合久期、利率情景） | 组合层风险度量的算法表达 | 同上，属教学示意 |\r\n| `analyze_convertible()` | 转债指标的测算口径 | 由研究员在自有系统中运行 |\r\n\r\n本技能未配置任何工具调用权限，不执行代码、不读写文件、不访问行情或估值数据源（中债估值等以机构自身订阅为准）、不下单。文中的评级参考利差、分层阈值与占比限额均为示例，机构须按自身风控偏好设定并留档。\r\n\r\n---\r\n\r\n---\r\n\r\n\r\n### 证券监管最新动态 [2026-10-08更新]\r\n\r\n| 动态类型 | 内容摘要 | 影响范围 | 固收侧应对动作 | 优先级 | 复核频率 | |\r\n|---------|---------|---------|-------------|-------|---|\r\n| 银行理财 | 理财\"三清\"（净值清晰、风险清晰、投向清晰）持续推进 | 理财资金的债券配置偏好 | 按期限与评级重估负债稳定性，相应调整组合久期 | 高 | 每月 |\r\n| 地方债务化解 | 一揽子化债安排持续落地，城投平台融资与偿债结构变化 | 城投债定价与估值 | 按区域财力与债务率分级，区分公开债与非标风险 | 高 | 每月 |\r\n| 债券市场统一执法 | 银行间与交易所市场信息披露、违约处置规则趋同 | 违约回收率与估值口径 | 建立违约处置流程台账，跟踪回收进度 | 高 | 每季 |\r\n| 信用风险 | 信用债内部分化加剧，弱资质主体再融资压力上升 | 信用利差分层 | 提高利差分位监控频率，弱资质主体加做压力测算 | 高 | 每月 |\r\n| 流动性 | 做市与报价机制完善，部分品种流动性分层明显 | 交易成本与冲击成本 | 按流动性分层设定单券持仓上限 | 中 | 每季 |\r\n| 可转债 | 可转债条款（修正、赎回、回售）执行与信息披露受关注 | 转债估值与条款风险 | 逐券登记条款触发条件，跟踪强赎公告 | 中 | 每月 |\r\n| 银行理财 | 2026年10月：理财组合的久期与流动性匹配披露要求进一步细化 | 理财资金的债券配置与负债管理 | 按月披露组合久期、高流动性资产占比与赎回压力测试结果 | 高 | 每月 |\r\n| 信用风险 | 2026年四季度初：弱资质主体的债券滚续与展期协商案例增多 | 信用利差分层、违约回收率 | 对AA及以下主体建立滚续跟踪清单，逐券登记到期分布与银行授信变化 | 高 | 每月 |\r\n\r\n> **数据截止**: 2026-10-08 | 来源：证监会、NFRA、交易商协会、中证协、行业公开信息\r\n> **声明**: 以上动态供参考，具体以官方最新发布为准\r\n\r\n**动态解读示例（两类高频场景）**\r\n\r\n- **场景A｜城投估值随政策预期波动**：某区域城投债在中性假设下按 AAA 利差定价；化债政策预期升温阶段，同区域利差两个交易日收窄 12bp，随后因财力数据不及预期又走阔 15bp。**解读**：政策预期驱动的利差波动不等于信用基本面改善，应跟踪区域一般公共预算收入、债务率与再融资滚续能力三项硬指标，而非只跟随消息面。\r\n- **场景B｜转债强赎条款误判**：某转债正股在连续 30 个交易日中已有 15 个交易日收盘价高于转股价 130%，触及强赎条件。若仍按\"转债无到期日、可长期持有\"的思路配置 → 可能被按面值加当期利息强"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn74e704j3ygjcygnpf02rdvd185js13\",\n  \"slug\": \"security-bond-analysis\",\n  \"version\": \"3.0.3\",\n  \"publishedAt\": 1791436897017\n}"},{"path":"skill-card.md","content":"## Description:\n\nGuides analysis of China onshore bonds through valuation, yield and duration measures, credit review, convertible bond metrics, and portfolio interest-rate scenarios.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[gechengling](https://clawhub.ai/user/gechengling)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nFixed-income analysts and portfolio managers use the skill to interpret bond pricing, credit spreads, convertible bond terms, and portfolio rate sensitivity for China onshore bonds. Its worked examples are analytical templates, not investment advice.\n\n### Deployment Geography for Use:\n\nGlobal (analysis focused on China onshore bonds)\n\n## Known Risks and Mitigations:\n\nRisk: Illustrative calculations or regulatory and market commentary may be mistaken for current investment advice.\n\nMitigation: Verify inputs and assumptions with licensed market data and the institution's compliance process before making decisions.\n\nRisk: Portfolio analysis requests may expose sensitive holdings or client and counterparty information.\n\nMitigation: Provide only essential bond metrics and approximate portfolio weights; omit sensitive portfolio, client, counterparty, and nonpublic issuer information.\n\n## Reference(s):\n\n- [ClawHub skill listing](https://clawhub.ai/gechengling/skills/security-bond-analysis)\n\n## Skill Output:\n\n**Output Type(s):** [Text, Markdown, Guidance]\n\n**Output Format:** [Markdown analysis with calculations and tables]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Illustrative formulas and examples; no direct market-data access or trade execution.]\n\n## Skill Version(s):\n\n3.0.3 (source: release metadata and skill frontmatter)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment."}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":"AI-powered bond analysis for China market including valuation, yield, duration, convexity, credit spread analysis, and bond portfolio management. Skill: Security Bond Analysis Owner: gechengling Summary: AI-powered bond analysis for China market including valuation, yield, duration, convexity, credit spread analysis, and bond portfolio management. Tags: latest:3.0.3, security-bond-analysis:3.0.3 Version history: v3.0.3 | 2026-10-08T05:21:37.017Z | user 3.0.3: content update v3.0.2 | 2026-09-13T14:55:03.922Z | user 内容增强：新增债券估值结果解读、久期凸性组合效应对照与三类常见计算错误；信用分析补财务指标四","editorialQuality":{"score":100,"threshold":65,"status":"ready","wordCount":901,"uniquenessScore":54,"reasons":[]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-11T15:43:20.497Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-10-11T15:43:20.497Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"protocol-neighbors","verified":false,"confidence":"medium","updatedAt":"2026-10-11T17:42:36.781Z","emptyReason":null},"items":[{"id":"8ebccd8e-3863-4187-8355-c3f14e1f9edf","entityType":"agent","canonicalPath":"/agent/iofficeai-aionui","slug":"iofficeai-aionui","name":"AionUi","description":"Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!","url":"https://github.com/iOfficeAI/AionUi","homepage":"https://www.aionui.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-10-09T19:11:12.944Z","createdAt":"2026-02-25T03:38:16.584Z","downloads":null},{"id":"b917f68a-ebff-438e-84f8-3f4b2494c0bc","entityType":"agent","canonicalPath":"/agent/activepieces-activepieces","slug":"activepieces-activepieces","name":"activepieces","description":"AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents","url":"https://github.com/activepieces/activepieces","homepage":"https://www.activepieces.com","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-15T02:22:12.426Z","createdAt":"2026-02-25T03:38:12.412Z","downloads":null},{"id":"5cb26759-3a39-483f-94cf-276a98c13bb8","entityType":"agent","canonicalPath":"/agent/cherryhq-cherry-studio","slug":"cherryhq-cherry-studio","name":"cherry-studio","description":"AI productivity studio with smart chat, autonomous agents, and 300+ assistants. Unified access to frontier LLMs","url":"https://github.com/CherryHQ/cherry-studio","homepage":"https://cherry-ai.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-11T14:38:40.986Z","createdAt":"2026-02-25T03:38:19.379Z","downloads":null},{"id":"6f6582d0-5d76-4f0f-b81d-86520247950b","entityType":"agent","canonicalPath":"/agent/copilotkit-copilotkit","slug":"copilotkit-copilotkit","name":"CopilotKit","description":"The Frontend for Agents & Generative UI. React + Angular","url":"https://github.com/CopilotKit/CopilotKit","homepage":"https://docs.copilotkit.ai","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-03-25T09:50:57.846Z","createdAt":"2026-02-25T03:39:14.617Z","downloads":null}],"links":{"hub":"/agent","source":"/agent/source/clawhub","protocols":[{"label":"OpenClaw","href":"/agent/protocol/openclew"}]}}}