Trader Budget
Budget Manager.
Install
npx skills add Jakeschincariol/day-trader-skill --skill trader-budget -g -a claude-code -y- Repository
- Jakeschincariol/day-trader-skill4.3k
- Category
- Engineering
- Updated
- 15d ago
- License
- MIT
- Context cost
- Mediumabout 1,948 tokens
- Runs scripts
- Yes, review before use
What it does
Budget Manager. Sizes every position to your budget and your max loss per trade. Reads the trade plan from trader-exit (entry, stop, target), finds the whole shares that fit inside four limits (max loss per trade, position cap, max order, cash after your buffer), says which limit decided it, and writes ONE bracket order (entry, stop-loss, take-profit) to trader/orders.json in the exact shape of Alpaca's place_stock_order. A stop too far away for your max loss is a plain refusal, not a smaller order. Nothing is placed. Use when the user says "how many shares", "size this trade", "how much should I buy", "I have $5,000", "I only want to risk $50 a trade", "set my rules", "keep 10% in cash", or after /trader-exit writes a plan.
trader-budget
The Budget Manager turns a plan ("buy TSLA at 364.18, stop 358.32") into an exact order ("buy 8 shares"), inside rules the user sets once. The stop decides the size: the further away the stop, the fewer shares. It writes a proposal only. trader-risk checks it and trader-broker asks the user yes or no. Day trading loses most people money. Sizing to a max loss keeps each loss small; it does not make a trade win.
${CLAUDE_SKILL_DIR} below is this skill's folder (where this SKILL.md lives).
python3 "${CLAUDE_SKILL_DIR}/size.py" # trader/plan.json + trader/config.json
python3 "${CLAUDE_SKILL_DIR}/size.py" --write # write trader/orders.json
python3 "${CLAUDE_SKILL_DIR}/size.py" --limit --write # a limit order at the plan's entry
python3 "${CLAUDE_SKILL_DIR}/size.py" --limit 364.00 --json # a limit order at 364.00
python3 "${CLAUDE_SKILL_DIR}/size.py" --weights AAPL=40,KO=60 --config split.json # weights mode, below
--now "2026-10-19 10:15" pins the clock (New York time). A plan for
another day is refused: make a new one with trader-exit.
What it reads and writes
| file | what |
|---|---|
trader/config.json | the rules (start from config.example.json in this folder) |
trader/plan.json | the trade: entry, stop, target, setup, flat-by time (trader-exit writes it) |
trader/prices.json | optional: a fresh price above the plan's entry means a bigger risk (trader-alerts writes it) |
trader/portfolio.json | optional: its cash caps the size (trader-broker keeps it) |
trader/orders.json | the one proposed bracket order it writes with --write |
Step 1: set the rules once
If trader/config.json does not exist, copy config.example.json into
trader/config.json and ask the user for each value in plain words:
