sizing
Skill1 starsChanged 38 days agoMITView on GitHub
Determine position size using the v7 three-tool architecture — Kelly pre-filter gate, Black-Litterman allocation, cluster cap failsafe. Use with /sizing NVDA or /sizing (all positions).
2 other projects use a version of this.
Adopted by
Most recently taken up by
- ruujOnChain/HedgeFund-Skillstheir own version, first seen Nov 8, 2026
- flightctl/ai-workflowstheir own version, first seen Oct 22, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- ruujOnChain/HedgeFund-Skills★ 17same name
- flightctl/ai-workflows★ 10same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository2 other files it gives its agents.
- parametersSkill
- theorySkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 7 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 35
If passes: re-runs BL for full portfolio with NVDA included
- Distinctive: line 56
If f* ≤ 0: STOP. Position excluded.
- Distinctive: line 57
If f* > 0: PASS. Log Kelly fraction for reference (not for sizing).
- Distinctive: line 72
Check BL output against cluster limits:
- Distinctive: line 77
If exceeded: trim to cap, redistribute proportionally to uncapped positions
- Distinctive: line 131
All amounts in GBP.
- Distinctive: line 133
NEVER give financial advice.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Position Sizing (v7)
Three tools, three distinct jobs, applied in sequence. No ambiguity, one answer.
Architecture
KELLY GATE → BLACK-LITTERMAN → CLUSTER CAPS → FINAL WEIGHTSTool 1: Kelly Pre-Filter Gate "Does this trade have positive expected value?" Negative Kelly = EXCLUDED. No exceptions. No BL override.
Tool 2: Black-Litterman Allocation "Given my views, confidence, and everything else I hold, what weight?" THE allocation method. Replaces EV×Conv, risk-parity, correlation-Kelly, portfolio-context.
Tool 3: Cluster Caps (Stress Failsafe) "If correlations spike to 1.0 in a crash, are we still safe?" BL output exceeds cap → trim, redistribute. Never retired. Never overridden.
Input
Two modes:
Single stock: /sizing NVDA
- Runs Kelly gate on NVDA
- If passes: re-runs BL for full portfolio with NVDA included
- Shows delta: how does adding NVDA change every other weight?
Full portfolio: /sizing
- Runs Kelly gate on all positions
- Runs BL on all passing positions
- Applies cluster caps
- Outputs final weights
Process
- Read context:
investing/theories/TICKER.md— posterior probability, EV, convictioninvesting/models/black-litterman.py— BL model with current viewsinvesting/philosophy.md— cluster caps, constraintsinvesting/portfolio.md— current holdings
- Kelly Gate:
- Pull posterior P(+) from theory card (Bayesian-calibrated)
- Pull upside/downside ratio from EV distribution
- Compute Kelly fraction: f* = (p × b - q) / b
- If f* ≤ 0: STOP. Position excluded. Report why.
- If f* > 0: PASS. Log Kelly fraction for reference (not for sizing).
- Black-Litterman:
- Run
python3 investing/models/black-litterman.py --phase [1|2] - Or compute inline if views have changed since last run
- BL inputs:
- View vector (Q): EV estimates from gauntlet
- Confidence (Ω): conviction → omega mapping (1/5=0.50, 2/5=0.20, 3/5=0.08, 4/5=0.03, 5/5=0.01)
- Covariance (Σ): 2yr daily returns, annualised
- Market equilibrium: cap-weighted implied returns
- Risk aversion (δ): from regime detection (default 3.5 = cautious)
- Constraints: max 20% per position, long-only
- Output: optimal weight per position
- Run
- Cluster Caps:
- Check BL output against cluster limits:
- AI Infrastructure (semis, foundry, networking): max 40% of stock allocation
- Enterprise SaaS: max 40%
- Consumer/Fintech: max 40%
- Single position: max 20% of total capital
- If exceeded: trim to cap, redistribute proportionally to uncapped positions
- Log any cap-triggered adjustments
- Check BL output against cluster limits:
- Apply phase allocation:
- Phase 1: 45% ETF + 45% stocks + 10% cash
- Phase 2: 5% ETF + 87% stocks + 8% cash
- BL weights are within the stock allocation bucket
- Present results.
Output Format
## Sizing: [TICKER or PORTFOLIO]
### Kelly Gate
| Ticker | P(+) | Upside | Downside | Kelly f* | Gate |
|--------|-------|--------|----------|----------|------|
| WDAY | 63.2% | +52.3% | -25% | 0.34 | PASS |
| HOOD | 51.1% | +16.5% | -30% | 0.02 | PASS (marginal) |
### Black-Litterman Allocation
| Ticker | Equilibrium | Your View | Posterior | BL Weight | £ Amount |
|--------|------------|-----------|-----------|-----------|----------|
| WDAY | +13.9% | +52.3% | +16.0% | 12.1% | £X |
### Cluster Cap Check
| Cluster | BL Total | Cap | Status |
|------------------|----------|------|--------|
| AI Infrastructure| 18.0% | 40% | OK |
| SaaS | 24.4% | 40% | OK |
### Final Portfolio (Phase [1|2])
| Ticker | Weight | £ Amount | Role |
|--------|--------|----------|----------------|
| VWRP | 45.0% | £X | Stability floor|
| WDAY | 12.1% | £X | BL allocation |
| ... | ... | ... | ... |
| CASH | 10.0% | £X | IPO reserve |
### Risk Metrics
Expected return: +X.X%
Volatility: X.X%
Sharpe: X.XX
### BL vs Previous Allocation
[Show deltas, flag moves > 2pp]Rules
- Kelly gate is binary. Negative = excluded. No negotiation.
- BL output is the answer. Gabriel does NOT see 7 competing numbers and pick.
- Cluster caps cannot be overridden, even by Gabriel. They exist for the regime BL can't model.
- Show full BL math only if Gabriel asks. Default: show results table.
- All amounts in GBP.
- Never auto-execute trades.
- NEVER give financial advice.
Retired Methods (v6)
The following v6 skill files are deprecated. They remain on disk for reference but are NOT run:
kelly.md→ Kelly stays but ONLY as binary gate, not sizerbayesian-kelly.md→ posterior feeds BL confidence matrix insteadcorrelation-kelly.md→ BL covariance handles thisexpected-value.md→ BL view vectorrisk-parity.md→ BL covariance structuremax-drawdown.md→ stress test + cluster capsportfolio-context.md→ BL constraints
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

