Communitygithub.com

蒙地卡羅投資組合分析

執行蒙地卡羅模擬,進行投資組合分析,包含回報率分佈、尾部風險及路徑相依情境評估。

蒙地卡羅投資組合分析 是什麼?

這個技能專門用於蒙地卡羅模擬的投資組合分析,能夠生成回報率分佈、尾部風險指標以及路徑相依情境評估,適用於多資產投資組合。它支援正態分佈、Student-t 分佈、偏態正態分佈和經驗自助法等回報生成模型,並能處理靜態相關性矩陣、DCC-GARCH 或 copula 模型。其工作流程包括驗證輸入、校準模型、生成模擬路徑、計算統計數據、進行敏感性分析並編制報告。此技能在需要量化尾部風險(如 CVaR、最大回撤)、評估路徑相依特徵(如再平衡觸發、現金流疊加)或比較不同資產配置時特別有用,適用於 Claude Code、Cursor 和 Codex 等平台。

相容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/Mr-Nobody-Anonymous/All-skills/tree/HEAD/awesome_skills/legal/conducting-monte-carlo-portfolio-analysis

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

執行蒙地卡羅投資組合分析

執行蒙地卡羅模擬進行投資組合分析,產生回報率分佈、尾部風險指標以及多資產投資組合的路徑相依情境評估。

使用時機

  • 估算特定時間範圍(1個月至30年)內投資組合回報率的機率分佈
  • 量化尾部風險(CVaR/ES、最大回撤分佈、左尾機率)
  • 評估路徑相依特徵:回報序列風險、現金流疊加、再平衡觸發或選擇權式收益
  • 在體制轉換或肥尾假設下對投資組合配置進行壓力測試
  • 當封閉式分析不足以應對時(例如非正態回報、槓桿限制、動態對沖),比較不同配置候選方案

需收集的輸入資料

  • 資產組合與權重 — 股票代碼或資產類別、目標配置及任何限制(最小/最大界限、行業上限)
  • 回報假設 — 歷史回顧區間或前瞻性資本市場假設(預期回報、波動率、相關性矩陣)
  • 分佈模型 — 正態、Student-t(指定自由度)、偏態正態或經驗自助法 [驗證:確認分佈選擇適合該資產類別]
  • 模擬參數 — 路徑數量(預設:10,000;穩定的尾部估計建議使用50,000+)、時間步長(日/月)、時間範圍長度
  • 相關性結構 — 靜態皮爾森矩陣、DCC-GARCH、copula 規格(高斯與 Clayton/Gumbel 用於尾部相依性) [驗證:與投資組合經理確認 copula 選擇]
  • 路徑相依規則 — 再平衡頻率與區間、現金流入/流出、回撤觸發的風險降低、稅損收割邏輯
  • 無風險利率與通膨假設 — 用於實質回報或夏普比率計算
  • 基準指標(可選) — 用於相對回報分析的指數或負債流

工作流程

  1. 驗證輸入

    • 確認相關性矩陣為半正定;若非則應用最近半正定校正
    • 檢查是否有過時或遺漏的回報序列;標記間隔超過5個交易日的缺口
    • 確認權重向量總和為1.0(或預期的槓桿比率)
  2. 校準回報生成模型

    • 對每個資產的回報序列擬合所選分佈(MLE 或動差法)
    • 估計相關性/copula 參數;報告擬合優度(例如 Anderson-Darling p 值)
    • 若使用體制轉換:估計隱藏馬可夫模型的狀態(多頭/空頭/危機)及轉移機率 [驗證:體制數量]
  3. 生成模擬路徑

    • 透過 Cholesky 分解(正態)或 copula 抽樣(非正態)生成相關隨機變量
    • 為每個資產建構累積回報路徑;在每個再平衡步驟應用投資組合權重
    • 執行路徑相依規則:執行再平衡、應用交易成本、疊加現金流
  4. 計算輸出統計數據

    • 分佈指標 — 終端財富或年化回報的平均值、中位數、標準差、偏度、峰度
    • 尾部風險指標 — 95% 和 99% 信心水準下的 VaR 和 CVaR;最大回撤分佈(中位數、第95百分位數);損失超過使用者定義閾值的機率
    • 路徑統計數據 — 中位數路徑、5/25/75/95 百分位數扇形圖;回撤超過 X% 後的恢復時間分佈
    • 情境分析 — 最差 5% 路徑的條件統計數據(危機體制分析)
  5. 敏感性與穩健性檢查

    • 使用預期回報和波動率 ±1 個標準誤重新執行,以評估輸入敏感性
    • 比較不同分佈假設(正態 vs. Student-t vs. 自助法)下的結果
    • 確認收斂性:驗證當路徑數量加倍時關鍵指標是否穩定
  6. 編制報告

    • 以摘要表格及扇形圖視覺化規格呈現結果
    • 強調關鍵風險發現:未達到回報閾值的機率、最壞情況回撤及左尾情境
    • 說明所有假設、模型限制及數據日期

輸出

  • 摘要統計表 — 預期回報(年化)、波動率、夏普比率、VaR(95/99)、CVaR(95/99)、最大回撤(中位數和第95百分位數)、負回報機率、達到目標回報機率
  • 分佈圖表規格 — 終端回報直方圖(附 VaR/CVaR 標記);累積財富路徑扇形圖(5/25/50/75/95 百分位數區間)
  • 敏感性矩陣 — 在不同回報、波動率和相關性假設下的關鍵指標
  • 路徑相依分析 — 再平衡頻率、現金流時間點及回撤觸發規則對終端財富分佈的影響
  • 假設日誌 — 分佈模型、校準方法、模擬次數、隨機種子(用於可重複性)、數據來源及日期

品質檢查

  • 模擬次數足夠:尾部指標(99% CVaR)在使用不同隨機種子重新執行時不應偏移超過 2%
  • 平均模擬回報應在輸入預期回報的 ±10 個基點內(生成引擎的合理性檢查)
  • 模擬資產回報的相關性應與輸入矩陣相差在 ±0.02 以內
  • 路徑相依規則應至少透過一個手動追蹤的情境進行驗證
  • 所有 [驗證] 項目在交付前必須解決或明確標記為待處理
  • 結果不應被呈現為預測——需聲明輸出反映模型假設,而非未來表現的預測

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

Mr-Nobody-Anonymous/All-skills

Build agency portfolios. TRIGGERS - Use when user needs help with agency-portfolio-builder related tasks.

Mr-Nobody-Anonymous/All-skills

Generate landing pages with AI. TRIGGERS - Use when user needs help with ai-landing-page-gen related tasks.

Mr-Nobody-Anonymous/All-skills

Skill for discovering and researching autonomous AI agents, tools, and ecosystems using the AgentFolio directory.

Mr-Nobody-Anonymous/All-skills

Review investment portfolios with rebalancing recommendations. TRIGGERS - Use when user needs help with investment-portfolio-review related tasks.

Mr-Nobody-Anonymous/All-skills

Create makeup artist portfolio guides. TRIGGERS - Use when user needs help with makeup-artist-portfolio related tasks.

Mr-Nobody-Anonymous/All-skills

Build freelance portfolios with case studies. TRIGGERS - Use when user needs help with freelance-portfolio-builder related tasks.

Mr-Nobody-Anonymous/All-skills

Structures secondary portfolio construction with vintage diversification, strategy mix, and geographic allocation optimization. Use when building secondary portfolios, managing allocation targets, or optimizing portfolio composition.

Mr-Nobody-Anonymous/All-skills

Optimize landing page copy for conversions. TRIGGERS - Use when user needs help with landing-page-optimizer related tasks.

Mr-Nobody-Anonymous/All-skills

Build copywriting portfolios. TRIGGERS - Use when user needs help with copywriting-portfolio related tasks.

Mr-Nobody-Anonymous/All-skills

Design cryptocurrency portfolio strategies. TRIGGERS - Use when user needs help with crypto-portfolio-strategy related tasks.

Mr-Nobody-Anonymous/All-skills

Build UX design portfolios. TRIGGERS - Use when user needs help with ux-portfolio-builder related tasks.

Mr-Nobody-Anonymous/All-skills

Design cloud landing zones. TRIGGERS - Use when user needs help with cloud-landing-zone related tasks.

Mr-Nobody-Anonymous/All-skills

Generate high-converting landing page copy with headlines, benefits, CTAs, and social proof. TRIGGERS - Use when user wants landing page copy, sales page content, or conversion-focused web copy.

Mr-Nobody-Anonymous/All-skills

Design portfolio assessment systems. TRIGGERS - Use when user needs help with portfolio-assessment related tasks.

Mr-Nobody-Anonymous/All-skills

Conducts portfolio performance measurement with benchmark comparison, attribution, and risk-adjusted metrics. Use when measuring portfolio performance, calculating Sharpe/Sortino ratios, or conducting performance attribution.

Mr-Nobody-Anonymous/All-skills

Builds strategic and tactical asset allocation models with risk-return optimization and constraint management. Use when constructing portfolios, optimizing asset allocation, or building model portfolios.

Mr-Nobody-Anonymous/All-skills

Creates client-facing portfolio reports with performance, allocation, commentary, and outlook. Use when producing client reports, preparing quarterly reviews, or creating portfolio summaries.

Mr-Nobody-Anonymous/All-skills

Design investment portfolios. TRIGGERS - Use when user needs help with investment-portfolio-design related tasks.

Mr-Nobody-Anonymous/All-skills

Plan investment portfolios. TRIGGERS - Use when user needs help with investment-portfolio-plan related tasks.

Mr-Nobody-Anonymous/All-skills

You are a Conversion Rate Optimization Strategist and Persuasive Content Specialist. Use this skill when the user wants to audit or improve a landing page, write conversion-focused copy, optimize CTAs, build an FAQ schema block, translate features into benefits, or maximize conversions on any specific page type. Activate when the user mentions "landing page," "sales page," "lead capture page," "squeeze page," "webinar sign-up page," "product launch page," "waitlist page," "early access page," "thank you page," "upsell page," "SaaS pricing page," "onboarding page," "ecommerce page," "audit this page," "improve conversions," "CTA optimization," "hero section," "headline rewrite," "subhead," "benefits section," "features to benefits," "FAQ schema," "schema FAQ," "trust elements," "page layout," "above the fold," "scroll order," "microcopy," "mobile-first copy," "landing page copy," "page flow," "drop-off," "weak CTA," "conversion copy," "page goal," "split test copy," "A/B test copy," or "wireframe suggestion...

相關技能