โ† Back to Skills Marketplace
jinboh68-prog

Kelly Formula Crypto

by jinboh68-prog ยท GitHub โ†— ยท v1.0.0 ยท MIT-0
cross-platform โš  suspicious
211
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install kelly-formula-crypto
Description
๐ŸŽฏ Kelly Formula ไป“ไฝ็ฎก็†ๅ™จ - ๅ‡ฏๅˆฉๅ…ฌๅผๅŠ ๅฏ†่ดงๅธไป“ไฝ่ฎก็ฎ—ๅทฅๅ…ท
README (SKILL.md)

Kelly Formula ไป“ไฝ็ฎก็†ๅ™จ

ๅฎšไปท: 0.01 USDC (x402ๆ”ฏไป˜) ๆ ‡็ญพ: crypto, trading, kelly-formula, position-sizing, risk-management ไฝœ่€…: Rich (@samhuang2025)


็ฎ€ไป‹

ๅŸบไบŽๅ‡ฏๅˆฉๅ…ฌๅผ็š„ๅŠ ๅฏ†่ดงๅธไป“ไฝ่ฎก็ฎ—ๅทฅๅ…ท๏ผŒๅธฎๅŠฉไบคๆ˜“่€…็”จๆ•ฐๅญฆ็บชๅพ‹ๆ›ฟไปฃๆƒ…็ปชๅŒ–ๅ†ณ็ญ–ใ€‚

ๆ ธๅฟƒๅŠŸ่ƒฝ๏ผš

  • โœ… ๅ‡ฏๅˆฉๅ…ฌๅผไป“ไฝ่ฎก็ฎ—
  • โœ… ๅˆ†ๆ•ฐๅ‡ฏๅˆฉๅปบ่ฎฎ๏ผˆยฝ / ยผ๏ผ‰
  • โœ… ๅคš็ญ–็•ฅไป“ไฝๅˆ†้…
  • โœ… ๆ ๆ†ๅฎ‰ๅ…จ่พน้™…่ฎก็ฎ—

x402 ๆ”ฏไป˜

ๆœฌskillๆ”ฏๆŒx402ๅพฎๆ”ฏไป˜ๅ่ฎฎใ€‚่ฐƒ็”จๆ—ถ่‡ชๅŠจๅ‘่ตท0.01 USDCๆ”ฏไป˜่ฏทๆฑ‚ใ€‚

# x402ๆ”ฏไป˜็คบไพ‹
curl -X POST https://api.x402.dev/pay \
  -H "Content-Type: application/json" \
  -d '{
    "to": "0x24b288c98421d7b447c2d6a6442538d01c5fce22",
    "amount": "0.01",
    "currency": "USDC",
    "memo": "kelly-formula-skill"
  }'

ๆ ธๅฟƒๅ…ฌๅผ

ๅฎŒๆ•ด็‰ˆ

f* = (bp - q) / b
  • p = ่ƒœ็އ
  • b = ็›ˆไบๆฏ”
  • q = 1 - p

็ฎ€ๅŒ–็‰ˆ๏ผˆๅฏน็งฐ็›ˆไบ๏ผ‰

f* โ‰ˆ 2p - 1

่ฎฐๅฟ†ๆณ•๏ผš่ƒœ็އ้ซ˜ๅ‡บ50%็š„้ƒจๅˆ†ร—2 = ๅปบ่ฎฎไป“ไฝ


ไฝฟ็”จๆ–นๆณ•

1. ๅŸบๆœฌไป“ไฝ่ฎก็ฎ—

่พ“ๅ…ฅ๏ผš

  • ่ƒœ็އ p (0-1)
  • ็›ˆไบๆฏ” b (ๅฆ‚ 2.0 ่กจ็คบ่ตš2ๅ—ไบ1ๅ—)

่พ“ๅ‡บ๏ผš

  • ๅ…จๅ‡ฏๅˆฉไป“ไฝ
  • ยฝๅ‡ฏๅˆฉไป“ไฝ๏ผˆๆŽจ่๏ผ‰
  • ยผๅ‡ฏๅˆฉไป“ไฝ๏ผˆไฟๅฎˆ/ๆ ๆ†๏ผ‰
def kelly_position(p, b, fraction=0.5):
    if p \x3C= 0.5:
        return 0  # ๆ— ไผ˜ๅŠฟ๏ผŒไธๅš
    f_star = (p * b - (1 - p)) / b
    if f_star \x3C 0:
        return 0
    return f_star * fraction

2. ๅฏน็งฐ้€ŸๆŸฅ่กจ

่ƒœ็އ ๅ…จๅ‡ฏๅˆฉ ยฝๅ‡ฏๅˆฉ ยผๅ‡ฏๅˆฉ
52% 4% 2% 1%
55% 10% 5% 2.5%
60% 20% 10% 5%
65% 30% 15% 7.5%
70% 40% 20% 10%
75% 50% 25% 12.5%

3. ๅคš็ญ–็•ฅไป“ไฝๅˆ†้…

ๅŽŸๅˆ™๏ผš็›ธๅ…ณๆ€ง>0.7ๆ—ถ๏ผŒๅˆๅนถไป“ไฝๆ‰“7ๆŠ˜

def adjusted_position(positions, correlation, discount=0.7):
    total = sum(positions)
    if correlation > 0.7:
        return total * discount
    return total

4. ๆ ๆ†ๅฎ‰ๅ…จ่พน้™…

def leverage_safety(liquidation_distance, stop_loss):
    safety_factor = liquidation_distance / stop_loss
    if safety_factor \x3C 2:
        return "ไธๅฎ‰ๅ…จ๏ผŒๅปบ่ฎฎ้™ๆ ๆ†"
    return "ๅฎ‰ๅ…จ"

ๅฎžๆˆ˜ๆกˆไพ‹

ๆกˆไพ‹1๏ผšBTC็Ÿญ็บฟ่ถ‹ๅŠฟ

  • ่ƒœ็އ 55%๏ผŒ็›ˆไบๆฏ” 5%/3%
  • ๅ‡€ไผ˜ๅŠฟ = 0.55ร—5 - 0.45ร—3 = 1.4%
  • ๅปบ่ฎฎไป“ไฝ = 1.4 รท 5 = 28%
  • ๆ‰ง่กŒยฝ = 14%

ๆกˆไพ‹2๏ผšETH่ต„้‡‘่ดนๅฅ—ๅˆฉ

  • ่ƒœ็އ 70%๏ผŒ็›ˆไบๆฏ” 2%/1%
  • ๅ‡€ไผ˜ๅŠฟ = 1.4 - 0.3 = 1.1%
  • ๅปบ่ฎฎไป“ไฝ = 55%
  • ๆ‰ง่กŒยผ-ยฝ = 14-27%

ๆกˆไพ‹3๏ผšMeme็ƒญ็‚น

  • ่กจ้ข๏ผš่ƒœ็އ58%๏ผŒ็›ˆไบๆฏ”7%/5%
  • ไฝ†1/6ไบๆŸๆ˜ฏ-25%ๆ’้’ˆ
  • ็œŸๅฎžไบๆŸ = 5/6ร—5% + 1/6ร—25% = 8.3%
  • ๆ–ฐๅ‡€ไผ˜ๅŠฟ = 4.06 - 3.49 = 0.57%
  • ๅปบ่ฎฎไป“ไฝ โ‰ˆ 8% โ†’ ๆ‰ง่กŒ2-4%

8ๆก้“ๅพ‹

  1. ้ป˜่ฎคๅˆ†ๆ•ฐๅ‡ฏๅˆฉ๏ผšๅ…ˆ็”จยฝ๏ผŒๅธฆๆ ๆ†/ไธ็จณ็”จยผ
  2. ๆ‘ฉๆ“ฆๅ…จ่ฟ›่ดฆ๏ผš่ดน็އใ€ๆป‘็‚นใ€่ต„้‡‘่ดนใ€Gasๅ…จ้ƒจ่ฎกๅ…ฅ
  3. ๆปšๅŠจไผฐๅ‚๏ผšๆœˆ/ๅญฃๆ›ดๆ–ฐ๏ผŒ้‡ๅคงไบ‹ไปถไธดๆ—ถ้™ๆกฃ
  4. ไธ‰้“้—ธ้—จ๏ผšๅ•็ฌ”ใ€ๅ•ๆ—ฅใ€ๅ•็ญ–็•ฅๅ›žๆ’ค็กฌ้˜ˆๅ€ผ
  5. ๅ‡€ๆ•žๅฃไธŠ้™๏ผš็›ธๅ…ณๆ€ง้ซ˜ๆ—ถ้กถๅฑ‚ๆ€ปไป“่ฆๆœ‰็กฌๅธฝ
  6. ๆž็ซฏๆ—ฅๆต็จ‹๏ผšๆทฑๅบฆ้ชค้™/็ปดๆŠค โ†’ ๅˆ‡้˜ฒๅฎˆๆจกๆฟ
  7. ๅฐๆ ทๆœฌๆ…Ž้‡๏ผš\x3C200็ฌ”ๅšไฟๅฎˆๆ”ถ็ผฉ
  8. ๅ…ˆๆˆชๅฐพๅ†ๆ”พๅคง๏ผšๅ…ˆ่ฏๆ˜Ž่ƒฝๆŽงๅˆถๆœ€ๅคงไบๆŸ๏ผŒๅ†่€ƒ่™‘ๆ”พๅคง

้ฃŽ้™ฉๆ็คบ

  • ๅ‡ฏๅˆฉๅ…ฌๅผๅ‡่ฎพไฝ ่ƒฝๅ‡†็กฎไผฐ่ฎก่ƒœ็އๅ’Œ็›ˆไบๆฏ”
  • ็Žฐๅฎžไธญๆœ‰"่‚ฅๅฐพ"๏ผŒๅކๅฒๆ•ฐๆฎไธไปฃ่กจๆœชๆฅ
  • ๅˆ†ๆ•ฐๅ‡ฏๅˆฉๆฏ”ๅ…จๅ‡ฏๅˆฉๆ›ดๅฎ‰ๅ…จ
  • ๆ ๆ†ไบคๆ˜“ๆœ‰ๅผบๅนณ้ฃŽ้™ฉ๏ผŒๅฟ…้กปๅ…ˆ็ฎ—ๅฎ‰ๅ…จ่พน้™…

็›ธๅ…ณ่ต„ๆบ

  • ๅŽŸๅง‹ๆ–‡็ซ ๏ผšhttps://x.com/KKaWSB/status/1968453490084299020
  • ่ฎบๆ–‡๏ผšKelly, J.L. (1956) "A New Interpretation of Information Rate"
  • ไนฆ๏ผšEdward Thorp "Beat the Dealer", "Advances in Large Scale Actors"

ๆ›ดๆ–ฐๆ—ฅๅฟ—

  • 2026-03-20: ๅˆๅง‹็‰ˆๆœฌ๏ผŒๅŒ…ๅซๆ ธๅฟƒๅ…ฌๅผใ€ๆกˆไพ‹ๅ’Œ้“ๅพ‹
Usage Guidance
This skill implements the Kelly formula and includes a benign-looking Python calculator; however, the SKILL.md advertises an external API and an x402 micro-payment (0.01 USDC) that will be triggered when the skill is called. Before installing: (1) confirm you accept the payment model and the recipient wallet (0x24b2...ce22); (2) disable autonomous skill invocation or require explicit user approval for network/payment calls so the agent cannot charge you repeatedly; (3) verify the external endpoint (the vercel.app API and api.x402.dev) and prefer running the included script locally if you want calculations without external payments; (4) review the GitHub source linked in README if you need higher assurance. If you want me to, I can produce a checklist of settings to change to avoid unintended charges or show how to run the bundled script locally instead of calling the paid endpoint.
Capability Analysis
Type: OpenClaw Skill Name: kelly-formula-crypto Version: 1.0.0 The skill is a legitimate trading utility for calculating position sizes using the Kelly Formula. It includes a Python script (scripts/kelly_calculator.py) for local calculations and documentation (SKILL.md, README.md) explaining the mathematical principles. The skill implements the x402 micropayment protocol (0.01 USDC) for its API endpoint, which is a declared feature of the bundle and does not involve any hidden or malicious behavior.
Capability Assessment
โœ“ Purpose & Capability
Name, README, SKILL.md, and the included Python script all implement Kelly-formula position sizing and related helpers; the code matches the described functionality.
โ„น Instruction Scope
The SKILL.md exposes an external endpoint (https://kelly-formula-crypto.vercel.app/api/calculate) and documents an x402 payment flow to api.x402.dev/pay. The instructions do not ask the agent to read local secrets or unrelated files. However, they do assume the agent will call an external paid API and (per docs) 'automatically' initiate a 0.01 USDC payment when invoked โ€” this is outside pure calculation and is material to user cost/privacy expectations.
โœ“ Install Mechanism
No install spec is provided (instruction-only with an included utility script). Nothing is downloaded from arbitrary URLs and there are no installers that would write code to disk during installation.
โ„น Credentials
The skill requests no environment variables or credentials. It does include a public recipient wallet address and references the x402 payment endpoint; this is proportionate for a paid skill. There is no request for private keys or other sensitive credentials in the package.
โš  Persistence & Privilege
always:false (good), but disable-model-invocation is false (normal), meaning the agent may autonomously invoke the skill. Combined with the documented automatic 0.01 USDC payment per call, autonomous invocation could lead to repeated micro-payments without explicit user confirmation.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install kelly-formula-crypto
  3. After installation, invoke the skill by name or use /kelly-formula-crypto
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
- Initial release of Kelly Formula Crypto Position Manager. - Includes core Kelly formula calculations for crypto position sizing. - Supports fractional Kelly suggestions (ยฝ and ยผ Kelly). - Provides multi-strategy position allocation and leverage safety calculations. - Includes quick reference tables, practical use cases, and risk management rules. - x402 micropayment support (0.01 USDC per call).
Metadata
Slug kelly-formula-crypto
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Kelly Formula Crypto?

๐ŸŽฏ Kelly Formula ไป“ไฝ็ฎก็†ๅ™จ - ๅ‡ฏๅˆฉๅ…ฌๅผๅŠ ๅฏ†่ดงๅธไป“ไฝ่ฎก็ฎ—ๅทฅๅ…ท. It is an AI Agent Skill for Claude Code / OpenClaw, with 211 downloads so far.

How do I install Kelly Formula Crypto?

Run "/install kelly-formula-crypto" in the OpenClaw or Claude Code chat to install it in one step โ€” no extra setup required.

Is Kelly Formula Crypto free?

Yes, Kelly Formula Crypto is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Kelly Formula Crypto support?

Kelly Formula Crypto is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Kelly Formula Crypto?

It is built and maintained by jinboh68-prog (@jinboh68-prog); the current version is v1.0.0.

๐Ÿ’ฌ Comments