← 返回 Skills 市场
78
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install kelly-criterion
功能描述
凯利公式仓位管理系统 — 用数学公式计算最优下注比例,实现长期资金最大化增长。当用户说「凯利公式」「仓位管理」「最优仓位」「凯利半仓」「Kelly Criterion」「破产风险」时激活。
使用说明 (SKILL.md)
凯利公式仓位管理体系
核心公式:f = (bp - q) / b = (胜率 × 赔率 - 败率) / 赔率
公式详解
f = 每次投入的资金比例(0~1)
b = 赔率 = 潜在盈利 / 潜在亏损
p = 胜率(0~1)
q = 败率 = 1 - p
简化版:
f = (胜率 × 赔率 - 败率) / 赔率
实例计算
| 场景 | p(胜率) | b(赔率) | f(仓位) | 操作 |
|---|---|---|---|---|
| 高确定性 | 60% | 1:1 | 20% | 标准仓 |
| 强机会 | 55% | 2:1 | 30% | 积极 |
| 弱机会 | 50% | 2:1 | 0%(不划算) | 放弃 |
| 极高机会 | 70% | 3:1 | 56% | 重仓 |
| A股T+0止损 | 40% | 3:1 | 20% | 轻仓 |
A股实战用法
参数估算方法
# 胜率估算:基于历史回测或主观判断
# 赔率估算:止盈价 / 止损价
# 实例:某股现价20元
# 目标止盈:22元(涨10%)
# 止损:19元(跌5%)
# 赔率b = 10% / 5% = 2
# 假设历史胜率55%
f = (0.55 × 2 - 0.45) / 2
f = (1.1 - 0.45) / 2
f = 0.325 → 32.5%
凯利变体(保守版)
| 版本 | 公式 | 适用场景 |
|---|---|---|
| 完整版 | f = (bp-q)/b | 精确数据 |
| 半凯利 | f/2 | 普通投资者 |
| 四分之一凯利 | f/4 | 极度保守 |
凯利仓位的最大优势
- 不破产:长期使用不会归零
- 最大化复利:资金增长速度最快
- 动态调整:每次交易后重新计算
与A股仓位规则结合
凯利仓位上限:
- 单票凯利建议 > 40% → 限制在40%
- 凯利建议 \x3C 5% → 放弃或用最小单位
- 总仓位 > 80% → 不再加仓
止损前置:
- 凯利仓位已含止损
- 任何单笔亏损不超过总资金×凯利比例×止损%
参考
详见 references/kelly-calculator.md
安全使用建议
This skill is internally coherent and appears to only provide calculations and guidance for the Kelly Criterion. Before installing, consider: (1) provenance — the skill has no homepage or source URL, so you can't verify the author; (2) this is advisory only — it won't fetch market data or place trades unless you later give a separate skill or connector permission and credentials to do so; (3) Kelly's outputs depend entirely on your estimates of win rate and payoff — misestimates can cause large losses, so treat outputs as illustrative and test with sample numbers; (4) never provide trading account credentials to a skill unless you explicitly trust and verify the integration. If you need automated trading, expect additional permissions (APIs/keys) and review those carefully.
功能分析
Type: OpenClaw Skill
Name: kelly-criterion
Version: 1.0.0
The skill bundle provides educational content and instructions for calculating investment position sizes using the Kelly Criterion. It contains no executable code, network requests, or suspicious instructions, and its content is entirely consistent with its stated purpose of financial position management (SKILL.md, references/kelly-calculator.md).
能力评估
Purpose & Capability
The name/description (Kelly criterion, position sizing) matches the SKILL.md content: formulas, worked examples, A-share usage notes and conservative variants. There are no unrelated required binaries, environment variables, or config paths that would be disproportionate to a calculation/ advisory skill. (Note: source/homepage not provided, which reduces provenance but doesn't make the functionality incoherent.)
Instruction Scope
SKILL.md contains only formulas, parameter-estimation guidance, examples, caps/limits and a short reference file. It does not instruct the agent to read system files, access environment variables, call external endpoints, or transmit data elsewhere. The scope is limited to calculating and explaining Kelly-based position sizing.
Install Mechanism
No install spec and no code files — instruction-only. Nothing is downloaded or written to disk, so there is no install-time execution risk.
Credentials
The skill does not request any environment variables, credentials, or config paths. This is proportional to a purely computational/advisory skill.
Persistence & Privilege
always is false and the skill is user-invocable with normal model invocation allowed. That is expected for a conversational/calculation skill and does not by itself increase privilege beyond normal operation.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install kelly-criterion - 安装完成后,直接呼叫该 Skill 的名称或使用
/kelly-criterion触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- Initial release of the kelly-criterion skill.
- Calculates optimal bet size using the Kelly formula to maximize long-term capital growth.
- Activates when users mention "凯利公式", "仓位管理", "最优仓位", "凯利半仓", "Kelly Criterion", or "破产风险".
- Includes formula breakdown, example scenarios, parameter estimation guidance, practical A-share use cases, and conservative Kelly variants.
- Provides guidelines for position sizing and risk management based on Kelly outputs.
元数据
常见问题
kelly-criterion 是什么?
凯利公式仓位管理系统 — 用数学公式计算最优下注比例,实现长期资金最大化增长。当用户说「凯利公式」「仓位管理」「最优仓位」「凯利半仓」「Kelly Criterion」「破产风险」时激活。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 78 次。
如何安装 kelly-criterion?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install kelly-criterion」即可一键安装,无需额外配置。
kelly-criterion 是免费的吗?
是的,kelly-criterion 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
kelly-criterion 支持哪些平台?
kelly-criterion 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 kelly-criterion?
由 danpian1(@danpian1)开发并维护,当前版本 v1.0.0。
推荐 Skills