{"id":"kelly-sizer","card_id":"card_kelly_sizer","name":"Kelly Sizer","description":"Computes advisory fractional Kelly sizing from supplied win rate, average win/loss magnitude, regime, confidence, and max fraction.","stage":1,"safety_level":"data_only_read_only","auth":{"type":"hmac-sha256","required_headers":["x-apex-tool-timestamp","x-apex-tool-nonce","x-apex-tool-content-sha256","x-apex-tool-signature"],"canonical_payload":"APEX-TOOL-V1\\n{tool_id}\\n{timestamp}\\n{nonce}\\n{sha256(canonical_json(body))}"},"permissionless":{"enabled":true,"tier":"bounded_public","rate_limit":"Shared 20 calls per IP per hour across permissionless bounded tools plus global agent-write protection","review_required":false,"note":"Anonymous bounded execution is allowed because this is deterministic sizing math over caller-supplied summary statistics. It never releases source, keys, orders, wallets, private balances, or raw datasets."},"input_schema":{"type":"object","required":["win_rate","avg_win","avg_loss"],"properties":{"win_rate":{"type":"number"},"avg_win":{"type":"number"},"avg_loss":{"type":"number"},"regime":{"type":"string"},"confidence":{"type":"number"},"max_fraction":{"type":"number"}}},"output_schema":{"type":"object","properties":{"kelly_fraction":{"type":"number"},"raw_kelly":{"type":"number"},"edge_ratio":{"type":"number"},"note":{"type":"string"}}},"sample_input":{"win_rate":0.56,"avg_win":1.4,"avg_loss":1,"regime":"trending","confidence":0.5},"test_vectors":[{"input":{"win_rate":0.56,"avg_win":1.4,"avg_loss":1,"regime":"trending","confidence":0.5},"expected":{"result":{"schema":"apex-kelly-sizer/1","kelly_fraction":0.122857,"raw_kelly":0.245714,"edge_ratio":1.4}},"match":"subset","verified_at":"2026-07-04T06:30:00.000Z"},{"input":{"win_rate":0.45,"avg_win":1.1,"avg_loss":1,"regime":"mean_reverting","confidence":0.75,"max_fraction":0.2},"expected":{"result":{"schema":"apex-kelly-sizer/1","kelly_fraction":0,"raw_kelly":-0.05,"edge_ratio":1.1}},"match":"subset","verified_at":"2026-07-04T06:30:00.000Z"}]}