360 Secure SkillHub
360 安全技能中心

Simmer Position Sizer

读取 Simmer 交易日志并按凯利公式计算各策略的建议下注金额,支持每日仓位报告与单市场预交易计算;可配置凯利分数、单笔下注上限、资金下限、最小样本量与回看天数,并通过 Simmer API 获取账户余额。

DjDyll
DjDyll
热度 24.22
最近更新 2026-03-14 23:16:46
分类:数据依赖:代码执行 / 读写文件 / 第三方 API应用场景:财务 / 报告撰写 / 推荐

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add simmer-position-sizer
Metadata
name
simmer-position-sizer
description
Kelly Criterion position sizing for Simmer traders. Know your win rate, know your edge — this skill tells you exactly how much to bet. Pre-trade calculator or daily sizing report. The math your strategies deserve.
metadata
{"author":"DjDyll","version":"1.0.2","displayName":"Simmer Position Sizer","difficulty":"intermediate"}

📐 Simmer Position Sizer

This is a template. Plug in your Kelly fraction and bet caps, point it at your trade journal, and the math does the rest. No strategy logic to write — just configure your risk tolerance and run it.

Setup

  1. Install SDK: pip install simmer-sdk
  2. Set API key: export SIMMER_API_KEY=your_key_here
  3. Run: python position_sizer.py --live

Configuration

Variable Default Description
SIZER_KELLY_FRACTION 4 Kelly denominator (1=full, 2=half, 4=quarter, 8=eighth)
SIZER_MAX_BET 25 Max bet per trade in USDC
SIZER_FLOOR 50 Bankroll floor — never bet below this balance
SIZER_MIN_N 20 Min resolved trades before sizing a strategy
SIZER_JOURNAL_PATH "" Path to trade journal JSONL (auto-detected if empty)
SIZER_LOOKBACK_DAYS 30 Lookback window in days for win rate calculation

Quick Commands

python position_sizer.py                              # Daily report (sim journal)
python position_sizer.py --live                       # Daily report (live journal)
python position_sizer.py --strategy NAME --price 0.35 # Pre-trade calculator
python position_sizer.py --config                     # Show config
python position_sizer.py --set SIZER_MAX_BET=50       # Update config

Example Output — Daily Report

📐 Position Sizer — 1/4 Kelly | Last 30 days
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Bankroll: $312.40 | Floor: $50.00 | Deployable: $262.40
Max bet cap: $25.00 | Min trades required: 20

STRATEGY RECOMMENDATIONS
  btc_momentum      n=142  WR=72.5%  avg_price=0.35  Kelly=18.3%  →  $12.07
  eth_midcandle     n=67   WR=61.2%  avg_price=0.55  Kelly=9.8%   →  $6.45
  btc_midcandle     n=49   WR=65.3%  avg_price=0.42  Kelly=13.1%  →  $8.64  ⚠ capped at $25
  weather_consensus n=38   WR=74.0%  avg_price=0.28  Kelly=22.1%  →  $14.56

NEGATIVE EDGE (do not bet)
  eth_btc_lag       n=21   WR=51.2%  avg_price=0.65  Kelly=-2.1%  →  $0.00

Skipped (below min_n=20): eth_session_open (n=4)

Troubleshooting

  • "Strategy not found" — check spelling matches your journal exactly
  • "No journal found" — set SIZER_JOURNAL_PATH to your trade_journal.jsonl
  • "Negative edge on everything" — your WR may be low, or min_n too high — run calibration report first
  • "Bankroll API error" — check SIMMER_API_KEY is valid