โ† Back to Skills Marketplace
jinboh68-prog

Ev Calculator

by jinboh68-prog ยท GitHub โ†— ยท v1.0.0 ยท MIT-0
cross-platform โœ“ Security Clean
183
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install ev-calculator
Description
๐ŸŽฏ EV ๆœŸๆœ›ๅ€ผ่ฎก็ฎ—ๅ™จ - ไบคๆ˜“ๅ†ณ็ญ–ๅฟ…ๅค‡ๅทฅๅ…ท
README (SKILL.md)

๐ŸŽฏ EV ๆœŸๆœ›ๅ€ผ่ฎก็ฎ—ๅ™จ

ๅฎšไปท: 0.01 USDC (x402ๆ”ฏไป˜) ไฝœ่€…: Rich (@samhuang2025)


็ฎ€ไป‹

่ฎก็ฎ—ไบคๆ˜“/ๆŠ•ๆณจ็š„ๆœŸๆœ›ๅ€ผ(Expected Value)๏ผŒๅˆคๆ–ญๆ˜ฏๅฆๅ…ทๆœ‰ๆญฃๆœŸๆœ›ใ€‚

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

  • โœ… ๅŸบ็ก€EV่ฎก็ฎ—
  • โœ… Polymarketๆฆ‚็އ่ฎก็ฎ—
  • โœ… ่ต”็އ่ฝฌๆข
  • โœ… ๅฅ—ๅˆฉ่พน็•Œๆฃ€ๆต‹

ๆ ธๅฟƒๅ…ฌๅผ

ๅŸบ็ก€็‰ˆ

EV = p ร— win - (1-p) ร— loss
  • p = ่ƒœ็އ
  • win = ่ตข็š„้‡‘้ข
  • loss = ่พ“็š„้‡‘้ข

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

EV = p ร— b - (1-p) ร— 1

ๅ…ถไธญ b = ็›ˆไบๆฏ”

Polymarket็‰ˆ

EV = ไฝ ็š„ๆฆ‚็އ - ๅธ‚ๅœบๆฆ‚็އ

ๅˆคๆ–ญๆ ‡ๅ‡†

EVๅ€ผ ๅซไน‰ ่กŒๅŠจ
EV > 0 ๆญฃๆœŸๆœ›ๅ€ผ๏ผŒ่ƒฝ่ตš โœ… ๅฏไปฅ็Žฉ
EV = 0 ไธไบไธ่ตš โšช ่ง‚ๆœ›
EV \x3C 0 ่ดŸๆœŸๆœ›ๅ€ผ๏ผŒๅฟ…ไบ โŒ ไธ็Žฉ

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

1. ๅŸบ็ก€EV่ฎก็ฎ—

def calculate_ev(p, win, loss):
    """
    ่ฎก็ฎ—ๆœŸๆœ›ๅ€ผ
    
    Args:
        p: ่ƒœ็އ (0-1)
        win: ่ตข็š„้‡‘้ข
        loss: ่พ“็š„้‡‘้ข
    
    Returns:
        EVๅ€ผ (ๆญฃ=่ตš๏ผŒ่ดŸ=ไบ)
    """
    return p * win - (1 - p) * loss

2. Polymarketๆฆ‚็އ

def polymarket_ev(your_prob, market_price):
    """
    ่ฎก็ฎ—Polymarket็š„EV
    
    Args:
        your_prob: ไฝ ๅˆคๆ–ญ็š„็œŸๅฎžๆฆ‚็އ (0-1)
        market_price: ๅธ‚ๅœบๅฎšไปท (0-1)
    
    Returns:
        edge (ไฝ ็š„ๆฆ‚็އ - ๅธ‚ๅœบๆฆ‚็އ)
    """
    return your_prob - market_price

3. ็›ˆไบๆฏ”่ฎก็ฎ—

def win_loss_ratio(win_pct, loss_pct):
    """่ฎก็ฎ—็›ˆไบๆฏ”"""
    return win_pct / loss_pct

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

ๆกˆไพ‹1๏ผšๆŠ›็กฌๅธ

  • ๆญฃ้ข่ตข $1.10
  • ๅ้ข่พ“ $1.00
  • ๆฆ‚็އๅ„ 50%
EV = 0.5 ร— 1.10 - 0.5 ร— 1.00 = +$0.05

โœ… ๆฏ่ตŒไธ€ๆฌกๆœŸๆœ›่ตš5ๅˆ†

ๆกˆไพ‹2๏ผšPolymarket

  • ไฝ ๅˆคๆ–ญ Trump ่ตข = 60%
  • ๅธ‚ๅœบๅฎšไปท YES = 40%
  • ไนฐๅ…ฅๆˆๆœฌ = $0.40
EV = 0.60 - 0.40 = +0.20 (20% edge)

โœ… ๆฏๆŠ•$1ๆœŸๆœ›่ตš$0.20

ๆกˆไพ‹3๏ผšๅฝฉ็ฅจๅฅ—ๅˆฉ๏ผˆWinfall Roll-down๏ผ‰

  • ๆญฃๅธธๆ—ถๆœŸ๏ผšๆœŸๆœ›ๆ‹ฟๅ›ž$0.55
  • Roll-downๆ—ถๆœŸ๏ผšๆœŸๆœ›ๆ‹ฟๅ›ž$1.18
ๆญฃๅธธEV = 0.55 - 1.00 = -$0.45 (ไบ)
ๅฅ—ๅˆฉEV = 1.18 - 1.00 = +$0.18 (่ตš)

ๅฟซ้€ŸๆŸฅ่ฏข่กจ

ๅฏน็งฐ็›ˆไบ๏ผˆ่ตขไบ็›ธ็ญ‰๏ผ‰

่ƒœ็އ EV ่ฏ„ไปท
45% -10% ่ฟœ็ฆป
48% -4% ้ฟๅผ€
50% 0% ๅ…ฌๅนณ
52% +4% ๅฏไปฅ
55% +10% ไธ้”™
60% +20% ๅพˆๅฅฝ
70% +40% ๆžไฝณ

Polymarket Edge

ๅธ‚ๅœบๅฎšไปท ไฝ ็š„ๅˆคๆ–ญ Edge
30% 45% +15%
40% 55% +15%
50% 65% +15%
60% 75% +15%

ไปฃ็ ๅฎž็Žฐ

#!/usr/bin/env python3
"""EV Calculator"""

import argparse
import json

def calculate_ev(p, win, loss):
    return p * win - (1 - p) * loss

def polymarket_ev(your_prob, market_price):
    edge = your_prob - market_price
    ev_dollar = edge / market_price if market_price > 0 else 0
    return edge, ev_dollar

def main():
    parser = argparse.ArgumentParser(description="EV Calculator")
    parser.add_argument("--p", type=float, help="่ƒœ็އ (0-1)")
    parser.add_argument("--win", type=float, help="่ตข็š„้‡‘้ข")
    parser.add_argument("--loss", type=float, help="่พ“็š„้‡‘้ข")
    parser.add_argument("--market", type=float, help="ๅธ‚ๅœบๅฎšไปท (Polymarket)")
    parser.add_argument("--your", type=float, help="ไฝ ็š„ๅˆคๆ–ญๆฆ‚็އ")
    parser.add_argument("--json", action="store_true")
    
    args = parser.parse_args()
    
    if args.p and args.win and args.loss:
        ev = calculate_ev(args.p, args.win, args.loss)
        result = {
            "type": "basic",
            "ev": ev,
            "verdict": "โœ… ๆญฃๆœŸๆœ›" if ev > 0 else "โŒ ่ดŸๆœŸๆœ›" if ev \x3C 0 else "โšช ๆŒๅนณ"
        }
    elif args.market and args.your:
        edge, ev = polymarket_ev(args.your, args.market)
        result = {
            "type": "polymarket",
            "market_price": args.market,
            "your_prob": args.your,
            "edge": edge,
            "ev_per_dollar": ev,
            "verdict": "โœ… ๆญฃๆœŸๆœ›" if edge > 0 else "โŒ ่ดŸๆœŸๆœ›"
        }
    
    if args.json:
        print(json.dumps(result, indent=2))
    else:
        print(f"\
๐ŸŽฏ EV่ฎก็ฎ—็ป“ๆžœ")
        print(f"=" * 30)
        if result["type"] == "basic":
            print(f"่ƒœ็އ: {args.p*100:.0f}% | ่ตข: ${args.win} | ไบ: ${args.loss}")
            print(f"EV: ${result['ev']:.2f}")
        else:
            print(f"ๅธ‚ๅœบๅฎšไปท: {args.market*100:.0f}% | ไฝ ็š„ๅˆคๆ–ญ: {args.your*100:.0f}%")
            print(f"Edge: {result['edge']*100:.0f}%")
            print(f"ๆฏ$ๆœŸๆœ›่ตš: ${result['ev_per_dollar']:.2f}")
        print(f"\
{result['verdict']}")

if __name__ == "__main__":
    main()

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

  • EVๆ˜ฏๅŸบไบŽๅކๅฒๆ•ฐๆฎ็š„ๆœŸๆœ›๏ผŒไธไปฃ่กจๆœชๆฅ
  • ๅฎž้™…ๆ‰ง่กŒ้œ€่€ƒ่™‘ๆป‘็‚นใ€่ดน็އใ€่ต„้‡‘่ดน็ญ‰ๆ‘ฉๆ“ฆๆˆๆœฌ
  • ๆ…Ž็”จๅฐๆ ทๆœฌๆ•ฐๆฎ๏ผŒๅฎนๆ˜“ไบง็”Ÿๅๅทฎ

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

  • ้…ๅฅ—Skill: kelly-formula-crypto (ๅ‡ฏๅˆฉๅ…ฌๅผไป“ไฝ็ฎก็†)
  • MEMORY.md: Polymarketไบคๆ˜“็ณป็ปŸๅฎŒๆ•ดๆŒ‡ๅ—

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

  • 2026-03-20: ๅˆๅง‹็‰ˆๆœฌ
Usage Guidance
This skill's code is a straightforward EV calculator and is coherent with its description. Two things to check before installing/using: (1) The SKILL.md metadata declares a paid endpoint (x402) and a recipient wallet โ€” confirm how the platform enforces payment and whether your inputs would be sent to that external endpoint when invoked (and whether payment is taken automatically). (2) Avoid sending sensitive secrets or PII to the skill if you are unsure whether the agent will make API calls to the external endpoint. If you only need local calculations, run the included scripts locally (they have no networking) and verify results there. If you plan to use the hosted/paid behavior, verify the endpoint's domain and reputation and confirm the payment flow (cost, refund, what data is transmitted) with the platform or skill author.
Capability Analysis
Type: OpenClaw Skill Name: ev-calculator Version: 1.0.0 The ev-calculator skill is a legitimate tool for calculating expected value (EV) and Kelly criterion positions for trading and betting. The Python script (scripts/ev_calculator.py) contains standard mathematical logic with no network, file system, or sensitive data access, and the SKILL.md instructions are consistent with the stated purpose of the tool.
Capability Assessment
โœ“ Purpose & Capability
The name, description, README and Python script all implement EV calculations (basic EV, Polymarket edge, Kelly guidance). No unrelated binaries or credentials are requested. The only extra capability in the metadata is a payment endpoint/wallet for micro-payments, which can be a legitimate monetization mechanism for a paid skill.
โ„น Instruction Scope
SKILL.md and README provide purely local usage instructions and include the full Python CLI. However the skill header declares an external endpoint (https://kelly-formula-crypto.vercel.app/api/ev), auth_type 'x402', price, currency and wallet and lists capability 'api_call' โ€” this implies the runtime may perform external API calls and payment operations, though the included Python script itself does not call that endpoint. This mismatch is worth awareness but not necessarily malicious.
โœ“ Install Mechanism
No install spec; this is an instruction+script-only skill. No remote downloads or package installs are specified (requirements.txt is empty). Low install risk.
โœ“ Credentials
The skill declares no required environment variables, keys, or config paths. The payment header includes a public wallet address for receiving micro-payments; no secrets are requested. Credential demands are proportionate to an offline calculator plus optional monetization metadata.
โœ“ Persistence & Privilege
always:false and default autonomous invocation are used. The skill does not request elevated or persistent system privileges, nor does it modify other skill configurations. Autonomous invocation is normal and not by itself a concern.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install ev-calculator
  3. After installation, invoke the skill by name or use /ev-calculator
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
ev-calculator 1.0.0 - ้ฆ–ๅ‘ไธŠ็บฟ๏ผŒๆไพ›EV๏ผˆๆœŸๆœ›ๅ€ผ๏ผ‰่ฎก็ฎ—ๅŠŸ่ƒฝ๏ผŒๆ”ฏๆŒๅŸบ็ก€ไบคๆ˜“ๅ’ŒPolymarketๅœบๆ™ฏ - ่ฆ†็›–ๅŸบ็ก€EVใ€Polymarketๆฆ‚็އใ€่ต”็އ่ฝฌๆขใ€ๅฅ—ๅˆฉ่พน็•Œๆฃ€ๆต‹ๅ››ๅคงๅŠŸ่ƒฝ - ๆไพ›ๆธ…ๆ™ฐ็š„ๅˆคๆ–ญๆ ‡ๅ‡†ๅ’Œๅฎž็”จๆกˆไพ‹๏ผŒๅซๅฟซ้€ŸๆŸฅ่ฏข่กจ - ไปฃ็ ๅผ€ๆบ๏ผŒๆ”ฏๆŒๅ‘ฝไปค่กŒ่ฟ่กŒๅ’ŒJSON่พ“ๅ‡บ - x402 ๆ”ฏไป˜๏ผŒUSDC ไป˜่ดน่ƒฝๅŠ›้›†ๆˆ
Metadata
Slug ev-calculator
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Ev Calculator?

๐ŸŽฏ EV ๆœŸๆœ›ๅ€ผ่ฎก็ฎ—ๅ™จ - ไบคๆ˜“ๅ†ณ็ญ–ๅฟ…ๅค‡ๅทฅๅ…ท. It is an AI Agent Skill for Claude Code / OpenClaw, with 183 downloads so far.

How do I install Ev Calculator?

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

Is Ev Calculator free?

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

Which platforms does Ev Calculator support?

Ev Calculator is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Ev Calculator?

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

๐Ÿ’ฌ Comments