louloulin/claude-agent-sdk · Archived

kelly-position

使用Kelly?

First seen Jan 28, 2026

Installation

$ npx skills add louloulin/claude-agent-sdk --skill kelly-position

Stronger alternatives

This repository is archived — consider an actively maintained alternative.

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from louloulin/claude-agent-sdk.

npx skills add louloulin/claude-agent-sdk

Browse all from louloulin/claude-agent-sdk

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Also listed on

Alternate registries and mirrors of this skill.

Repository health

Stars 20
License LICENSE.md
Default branch main
Open issues 1
Status Archived

Skill metadata

Parsed from SKILL.md frontmatter.

Version1.0.0

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 1,457 B
  • docs SUMMARY.md 201 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 15 installs

SKILL.md

Kelly仓位计算

使用Kelly公式计算最优投资仓位,平衡长期增长与风险控制。

核心公式

完整Kelly: f* = (bp - q) / b

  • b = 盈亏比 (平均盈利/平均亏损)
  • p = 胜率, q = 败率 (1-p)
  • f* = 最优仓位比例

简化Kelly: f = μ / σ² (基于期望收益μ和方差σ²)

实践建议

  1. 分数Kelly: 使用1/4或1/2 Kelly降低波动
  2. 仓位上限: 单只股票≤25%(Munger原则)
  3. 最小仓位: Kelly<2%时不建仓
  4. 组合管理: 多只股票时需归一化总仓位

使用方式

当用户提供胜率和盈亏比时,计算完整Kelly并应用1/4分数:

let kelly = (b * p - (1.0 - p)) / b;
let safe_kelly = (kelly * 0.25).min(0.25).max(0.0);

输出内容

  • Kelly最优仓位
  • 推荐仓位(1/4或1/2 Kelly)
  • 风险等级评估
  • 仓位限制说明
  • 建议理由

工具和详细文档

  • 📁 [详细计算方法](./detailed-calculation.md)
  • 📁 [Rust实现参考](./reference-implementation.md)
  • 🔧 [kellycalculator.py](./scripts/kellycalculator.py) - 命令行工具