A股仓位管理/凯利公式/仓位计算。当用户说"仓位"、"position sizing"、"该买多少"、"仓位管理"、"凯利公式"、"Kelly"、"加仓"、"减仓"时触发。基于 cn-stock-data 获取数据,量化计算最优仓位。支持研报风格(formal)和快速分析风格(brief)。
Scanned 9/7/2026
Install to Claude Code
npx -y skills add aifinlab/FinClaw --skill a-share-position-sizing --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of A Share Position Sizing?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/aifinlab-a-share-position-sizing-finclaw)More formats (shields.io, HTML) on the badges page.
---
name: a-share-position-sizing
description: A股仓位管理/凯利公式/仓位计算。当用户说"仓位"、"position sizing"、"该买多少"、"仓位管理"、"凯利公式"、"Kelly"、"加仓"、"减仓"时触发。基于 cn-stock-data 获取数据,量化计算最优仓位。支持研报风格(formal)和快速分析风格(brief)。
---
# A股仓位管理/凯利公式/仓位计算
## 数据源
```bash
SCRIPTS="$SKILLS_ROOT/cn-stock-data/scripts"
python "$SCRIPTS/cn_stock_data.py" kline --code [CODE] --freq daily --start [日期]
python "$SCRIPTS/cn_stock_data.py" quote --code [CODE]
python "$SCRIPTS/cn_stock_data.py" finance --code [CODE]
```
## Workflow
### Step 1: 获取标的数据
获取标的K线 + 波动率 + 基本面数据。
### Step 2: 风险度量
- 个股波动率(20日/60日年化波动率)
- ATR(真实波幅)
- 下行风险(半方差/CVaR)
### Step 3: 仓位计算
- **等风险贡献**:w = k / σ_i(波动率倒数加权)
- **凯利公式**:f* = (p × b - q) / b(p=胜率, b=盈亏比, q=1-p)
- **ATR仓位法**:仓位 = 风险预算 / (N × ATR)
- **固定风险法**:仓位 = 可承受亏损 / 止损距离
### Step 4: 约束条件
- 单只个股 < 总资金的 20%
- 单行业 < 总资金的 30%
- 总仓位根据市场状态调整(牛市80-100%,震荡50-80%,熊市20-50%)
### Step 5: 输出
| 维度 | formal | brief |
|------|--------|-------|
| 仓位计算 | 多方法对比 | 建议仓位 |
| 风险分析 | 波动率+VaR | 风险等级 |
| 加减仓计划 | 分批建仓方案 | 单次建议 |
默认风格:brief。
## 关键规则
1. 仓位管理比选股更重要——错误的仓位可以毁掉正确的选股
2. 永远不要满仓单只股票
3. 凯利公式的实际应用应使用半凯利(f*/2)更稳健
4. A 股 T+1 制度下,仓位调整需提前一天规划
5. 市场状态是仓位的宏观约束——熊市轻仓是第一原则
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!
Playbook for creating and editing uCoz landing pages via MCP tools (`templates_tool`, `ftp_tool`, `modules_tool`). Use for tasks such as: "build a landing page", "update the homepage as a landing page", "create a promo page on the homepage", "add a lead form / menu / SEO to the homepage". Homepage: `page_list`, `page_get`; first publish — `page_update` with full `page_tmpl`; HTML edits after generation — `patch_template` (module_id=2, template_id=1), not `update_template`. Activate the mail f...
Interact with the Paperclip control plane API to manage tasks, coordinate with other agents, and follow company governance. Use when you need to check assignments, update task status, delegate work, post comments, set up or manage routines (recurring scheduled tasks), or call any Paperclip API endpoint. Do NOT use for the actual domain work itself (writing code, research, etc.) — only for Paperclip coordination.
Instantly.ai cold email outreach API - manage campaigns, leads, accounts, and analytics. Use for cold email automation, lead management, campaign creation/monitoring, and email account warmup.
Digital Audio Workstation usage, music composition, interactive music systems, and game audio implementation for immersive soundscapes.
Compress natural language memory files (CLAUDE.md, todos, preferences) into caveman format to save input tokens. Preserves all technical substance, code, URLs, and structure. Compressed version overwrites the original file. Human-readable backup saved as FILE.original.md. Trigger: /caveman-compress FILEPATH or "compress memory file"