shadow-size-position

Solid

Size a trading position with FinPos discipline. Takes a direction from an upstream Judge (long / short / no_op), a bankroll, a volatility regime, and Kelly parameters — returns a fund/skip verdict with Kelly-cap- respecting, drawdown-adjusted position size. Never emits a direction (that's the Judge's job upstream). Cross-vertical wire format identical to the Orallexa Python engine so banking + trading audit trails share one schema.

AI & Automation 1 stars 0 forks Updated today MIT

Install

View on GitHub

Quality Score: 80/100

Stars 20%
10
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Shadow Size Position (trader-pack) Position sizing with direction/sizing separation. Direction is an input. ## When to use The user's request combines all of: 1. A stated direction — long, short, or no_op. 2. Bankroll in USD. 3. Volatility regime — low, medium, high. 4. Kelly parameters — historical win rate (0–1), average win %, average loss %. Optional but recommended: - `current_drawdown_pct` — will shrink position size linearly if provided. - `max_kelly_cap` — defaults to 0.25 (25% of bankroll) if not specified. If any of the four required inputs is missing, ask for it. Do not fabricate a Kelly p_win. ## What it does Calls `shadow_size_position` MCP tool. Under the hood: 1. **Kelly notional** — fractional Kelly (default 0.5 = half-Kelly) computed from p_win + R:R ratio. 2. **Max cap** — hard-limits at `max_kelly_cap × bankroll`. If Kelly says 40% but cap is 25%, cap wins. 3. **Volatility scalar** — low = 1.0, medium = 0.7, high = 0.4. Multiplied into the cap-limited notional. 4. **Drawdown adjustment** — shrinks linearly toward zero as drawdown approaches max tolerable. 5. **Round to cents** — final position_usd is a real dollar amount. Returns: ```json { "voice": "Risk Sizer", "verdict": "fund" | "skip", "position_usd": 350.00, "kelly_notional": 500.00, "volatility_scalar": 0.7, "rationale": "Kelly=500 (p_win=0.55, R=2:1); capped at 25%=2500; volatility=medium scalar=0.70; drawdown-adjusted final=350. Direction was fixed by Judge upstream.", "m...

Details

Author
alex-jb
Repository
alex-jb/shadow-mentor
Created
1 months ago
Last Updated
today
Language
JavaScript
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

Data & Documents Listed

position-sizer

Run vol-target, fractional Kelly, risk parity, and equal-weight position sizes side-by-side on a basket of tickers. Use when a PM has names they want in the book and asks "how much of each?" The script doesn't pick names or predict returns; it shows what each sizing method gives so the PM can pick the one whose worldview matches their conviction. Requires Stocks Starter.

6 Updated 1 weeks ago
rgourley
AI & Automation Listed

execution-position

Convert a trading signal into a sized, risk-gated PAPER order intent — or a refusal with reasons. Trigger for "这个信号该买多少", "帮我算仓位", "凯利公式下注多少", "现在要不要加仓", "position sizing", "how much should I buy", "simulate this trade", or whenever the user (1) has a signal/decision and asks for the size, (2) wants a trade checked against limits before acting, (3) asks about stops or exposure, or (4) another skill hands over a strategy/rebalance that needs execution shape. Fire even for casual "梭哈吗". Do NOT trigger for portfolio-wide weight construction (portfolio-optimization) or post-hoc risk analysis (risk-assessment). NEVER place live orders.

2 Updated 1 weeks ago
artherahq
AI & Automation Solid

shadow-mentor

5-voice AI compliance council for regulated loan origination. 11 MCP tools (loan_council, loan_council_typed, risk_tools, recall, calibration, scenarios, traceability, verify_attestation, banking_profile, disparity, size_position). FICO < 700 is a hardcoded JS conditional with pinned tests. Strict-JSON enum verdicts. AA01–AA05 adverse-action codes per CFPB Circular 2026-03. MCPTox / OX Security 2026 named-threat coverage mechanically tested.

1 Updated today
alex-jb