Communitygithub.com

majiayu000/claude-skill-registry-data

计算当前资产配置百分比,识别与目标配置的偏差,分析保证金效率

claude-skill-registry-data 是什么?

该技能是永久投资组合工作流(portfolio_balancer)的第二步(共四步),专注于分析投资组合的资产配置情况。它采用哈利·布朗的永久投资组合策略,该策略要求股票、长期债券、黄金和现金/国债四个资产类别各占25%。该技能通过读取上一步生成的投资组合快照文件,计算每个资产类别的当前配置百分比,并与25%的目标进行对比,确定是否存在偏差。它会根据用户定义的偏差阈值(通常为5%)判断是否需要重新平衡,并追踪哪些资产类别超出了阈值。此外,该技能还分析卫星配置(可选,占股票配置的10-20%)和保证金使用效率,评估实际支付的费用与预期成本之间的关系。最后,它结合“四季”经济背景(繁荣/增长、通胀、紧缩货币、通缩/衰退)来解释当前的超配和低配状态。该技能支持Claude Code平台,输出为结构化的YAML文件,供后续步骤生成重新平衡建议。

兼容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/majiayu000/claude-skill-registry-data/tree/HEAD/analysis/portfolio-balancer-analyze-allocation-ncrmro-deepwork-permanent-

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

portfolio_balancer.analyze_allocation

步骤 2/4 in portfolio_balancer 工作流

每日永久投资组合分析,包含配置偏差和重新平衡建议

先决条件(先验证)

在继续之前,请确认以下步骤已完成:

  • /portfolio_balancer.collect_portfolio_data

说明

目标:计算当前资产配置百分比,识别与目标配置的偏差,分析保证金效率

分析配置

目标

计算当前配置百分比与 25/25/25/25 永久投资组合目标的对比,识别与目标的偏差,并分析保证金效率。

任务

分析投资组合快照,确定当前配置与哈利·布朗的永久投资组合目标之间的差异。识别哪些资产类别超配或低配,并评估保证金使用的成本效益。

流程

  1. 读取投资组合快照 从 collect_portfolio_data 步骤加载 portfolio_balancer/data/portfolio_snapshot.yml。

  2. 计算当前配置百分比 对于每个资产类别,计算:

    current_percentage = (asset_class_value / total_portfolio_value) * 100
    
  3. 计算与目标的偏差 永久投资组合的目标是每个资产类别占 25%:

    drift = current_percentage - 25.0
    
    • 正偏差 = 超配
    • 负偏差 = 低配
  4. 确定是否需要重新平衡 将每个资产类别的偏差与快照中的 drift_threshold 进行比较:

    • 如果任何 |drift| > drift_threshold,则建议重新平衡
    • 跟踪哪些特定资产类别超出阈值
  5. 分析卫星配置(如果启用) 如果启用了卫星跟踪:

    • 计算卫星配置占总股票配置的百分比
    • 与目标(通常为 10-20%)进行比较
    • 确定是否需要调整卫星配置
  6. 分析保证金效率 如果启用了保证金:

    • 计算年度保证金成本:margin_balance * interest_rate
    • 评估成本/效益:保证金资产预期回报是否大于保证金成本?
    • 如果保证金费用超过合理阈值,则标记
  7. 应用四季背景 注意哪些经济条件有利于当前的超配/低配头寸:

    • 春季(繁荣):股票受益
    • 夏季(通胀):黄金受益
    • 秋季(紧缩货币):现金受益
    • 冬季(通缩):长期债券受益

输出格式

portfolio_balancer/data/allocation_analysis.yml

包含完整配置分析的 YAML 文件。

结构:

analysis_date: "YYYY-MM-DD"
drift_threshold: 5  # 来自快照

total_portfolio_value: 100000.00

# 配置明细
allocations:
  stocks:
    target_percentage: 25.0
    current_percentage: 28.0
    current_value: 28000.00
    drift: 3.0  # 超配 3%
    exceeds_threshold: false
    status: "overweight"
    # 卫星配置明细(如果启用)
    satellite:
      enabled: true
      core_percentage: 89.3  # 核心指数中股票占比
      satellite_percentage: 10.7  # 卫星部分中股票占比
      target_satellite_percentage: 15.0
      satellite_drift: -4.3  # 卫星配置低配

  long_term_bonds:
    target_percentage: 25.0
    current_percentage: 24.0
    current_value: 24000.00
    drift: -1.0  # 低配 1%
    exceeds_threshold: false
    status: "underweight"

  gold:
    target_percentage: 25.0
    current_percentage: 23.0
    current_value: 23000.00
    drift: -2.0
    exceeds_threshold: false
    status: "underweight"

  cash_treasuries:
    target_percentage: 25.0
    current_percentage: 25.0
    current_value: 25000.00
    drift: 0.0
    exceeds_threshold: false
    status: "on_target"

# 整体重新平衡评估
rebalancing:
  needed: false
  reason: "没有资产类别超出 5% 的偏差阈值"
  assets_exceeding_threshold: []

# 保证金分析
margin_analysis:
  enabled: true
  current_balance: 5000.00
  annual_cost: 300.00  # 余额 * 利率
  monthly_cost: 25.00
  monthly_fees_paid: 50.00
  efficiency_rating: "poor"  # 实际支付的费用高于计算成本
  recommendation: "检查保证金费用 - 实际支付 $50/月,而预期成本为 $25/月"

# 四季背景
economic_context:
  current_overweights:
    - asset: "stocks"
      favored_condition: "繁荣/增长(春季)"
      drift: 3.0
  current_underweights:
    - asset: "gold"
      favored_condition: "通胀(夏季)"
      drift: -2.0
    - asset: "long_term_bonds"
      favored_condition: "通缩/衰退(冬季)"
      drift: -1.0
  interpretation: "投资组合目前定位于繁荣期;易受通胀影响"

质量标准

  • 所有四个资产类别均已分析,包含当前百分比和偏差
  • 偏差计算在数学上正确
  • 重新平衡阈值比较准确
  • 如果启用了保证金,则包含保证金效率分析
  • 如果启用了卫星跟踪,则包含卫星分析
  • 提供了四季经济背景
  • 所有百分比总和为 100%(在舍入公差范围内)
  • YAML 有效且可解析
  • 当满足所有标准时,在回复中包含 <promise>✓ 质量标准已满足</promise>

背景

此分析是永久投资组合管理的核心。哈利·布朗设计了 25/25/25/25 的配置,以在所有经济条件下提供平衡——即经济周期的“四季”。偏差分析有助于确定何时需要重新平衡以维持这种平衡。

保证金分析帮助用户了解其保证金使用是否具有成本效益,将实际支付的费用与计算成本和预期收益进行比较。

任务背景

自动化的每日投资组合分析,实现哈利·布朗的永久投资组合策略。

永久投资组合在四个资产类别中保持相等的 25% 配置,旨在在不同的经济条件下表现:

  • 股票(25%):繁荣/增长
  • 长期债券(25%):通缩/衰退
  • 黄金(25%):通胀
  • 现金/国债(25%):紧缩货币/衰退

此工作流:

  1. 通过 bin/robinhood positions --save CLI 收集投资组合数据
  2. 分析当前配置与 25/25/25/25 目标的对比
  3. 跟踪卫星股票选择(可选,占股票配置的 10-20%)
  4. 评估保证金使用效率与已支付费用的关系
  5. 当偏差超过用户定义的阈值时,生成重新平衡建议
  6. 生成人类可读的每日报告以供人工审核

重要提示:该系统为只读。不会自动执行任何交易。 所有建议需要人工审核和执行。

所需输入

来自先前步骤的文件 - 先读取这些:

  • portfolio_balancer/data/portfolio_snapshot.yml(来自 collect_portfolio_data)

工作分支

使用分支格式:deepwork/portfolio_balancer-[instance]-YYYYMMDD

  • 如果已在匹配的工作分支上:继续使用它
  • 如果在 main/master 上:使用 git checkout -b deepwork/portfolio_balancer-[instance]-$(date +%Y%m%d) 创建新分支

输出

必需输出:

  • portfolio_balancer/data/allocation_analysis.yml

防护栏

  • 如果此步骤有依赖项,请勿跳过先决条件验证
  • 请勿生成不完整的输出;在完成所有必需输出之前不要结束
  • 没有必需的输入不要继续;如有缺失,请询问用户
  • 请勿修改此步骤定义输出范围之外的文件

完成后

  1. 验证输出已创建
  2. 通知用户:“步骤 2/4 完成,输出:portfolio_balancer/data/allocation_analysis.yml”
  3. 继续工作流:使用技能工具调用 /portfolio_balancer.generate_recommendations

参考文件:.deepwork/jobs/portfolio_balancer/job.yml,.deepwork/jobs/portfolio_balancer/steps/analyze_allocation.md

Individual skills in this repo

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

majiayu000/claude-skill-registry-data

Edit existing BMAD agents while maintaining compliance

majiayu000/claude-skill-registry-data

Edit existing BMAD agents while maintaining compliance

majiayu000/claude-skill-registry-data

Edit existing BMAD modules while maintaining coherence

majiayu000/claude-skill-registry-data

Edit existing BMAD modules while maintaining coherence

majiayu000/claude-skill-registry-data

Analyzes current state and user query to answer BMad questions or recommend the next workflow or agent. Use when user says what should I do next, what do I do now, or asks a question about BMad

majiayu000/claude-skill-registry-data

Build AI agents with Google ADK Python (Agent Development Kit). Use for multi-agent systems, workflow agents (sequential/parallel/loop), Vertex AI deployment, tool integration, human-in-the-loop.

majiayu000/claude-skill-registry-data

Build AI agents with Google ADK Python (Agent Development Kit). Use for multi-agent systems, workflow agents (sequential/parallel/loop), Vertex AI deployment, tool integration, human-in-the-loop.

majiayu000/claude-skill-registry-data

Portfolio allocation and rebalancing optimizer. Manages asset allocation across stocks/cash/bonds, performs periodic rebalancing, and ensures diversification according to market regime and risk tolerance.

majiayu000/claude-skill-registry-data

Create a hilarious and ultra-realistic video of an anthropomorphic animal acting like a human vlogger in a real-world setting.

majiayu000/claude-skill-registry-data

Speech-to-text transcription and translation via OpenAI Audio API -- models, response formats, timestamps, prompting, streaming, chunking, and diarization

majiayu000/claude-skill-registry-data

This skill should be used when the user asks about libraries, frameworks, API references, or needs code examples. Activates for setup questions, code generation involving libraries, or mentions of specific frameworks like React, Vue, Next.js, Prisma, Supabase, etc.

majiayu000/claude-skill-registry-data

小省导购员数字人带货版即梦视频提示词生成系统,基于四大智能体协同(提示词生成师、质量管控师、知识库运维师、跨环节适配师),按照"主体+运动+场景+(镜头语言+光影+氛围)"公式输出中英文双版提示词,适配5s短视频。确保人物一致性、视觉连贯性、情绪连贯性,支持知识库智能复用和跨工具适配(Suno音乐、AI绘画),为数字人带货视频提供高质量提示词生成服务。

majiayu000/claude-skill-registry-data

Upload and manage files using Google Gemini File API via scripts/. Use for uploading images, audio, video, PDFs, and other files for use with Gemini models. Supports file upload, status checking, and file management. Triggers on "upload file", "file API", "upload image", "upload PDF", "upload video", "file management".

majiayu000/claude-skill-registry-data

Analyze images/audio/video with Gemini API (better vision than Claude). Generate images (Imagen 4), videos (Veo 3). Use for vision analysis, transcription, OCR, design extraction, multimodal AI.

majiayu000/claude-skill-registry-data

Analyze images/audio/video with Gemini API (better vision than Claude). Generate images (Imagen 4), videos (Veo 3). Use for vision analysis, transcription, OCR, design extraction, multimodal AI.

majiayu000/claude-skill-registry-data

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

majiayu000/claude-skill-registry-data

Conduct domain and industry research. Use when the user says "lets create a research report on [domain or industry]

majiayu000/claude-skill-registry-data

Conduct market research on competition and customers. Use when the user says "create a market research report about [business idea]".

majiayu000/claude-skill-registry-data

Conduct technical research on technologies and architecture. Use when the user says "create a technical research report on [topic]".

majiayu000/claude-skill-registry-data

Builds, edit or validate Agent Skill through conversational discovery. Use when the user requests to "Create an Agent", "Optimize an Agent" or "Edit an Agent".

相关技能