
Asset Allocation
Asset allocation theory and optimizer usage, MPT / Black-Litterman / risk budgeting /...
Install
npx skills add HKUDS/Vibe-Trading --skill asset-allocation -g -a claude-code -y- Repository
- HKUDS/Vibe-Trading37.4k
- Category
- Engineering
- Updated
- 3d ago
- License
- MIT
- Context cost
- Mediumabout 2,868 tokens
- Runs scripts
- No, instructions only
What it does
Asset allocation theory and optimizer usage, MPT / Black-Litterman / risk budgeting / all-weather strategy, including guides for 5 optimizers and rebalancing rules.
Asset Allocation and Portfolio Optimization
Overview
From asset allocation theory to practical implementation, this skill covers classical frameworks (MPT, BL, risk budgeting, all-weather) and the usage of the four optimizers built into this system. The output can be written directly into config.json.
Asset Allocation Theory
1. Modern Portfolio Theory (MPT, Markowitz)
Core idea: maximize expected return for a given level of risk (the efficient frontier).
Optimization problem:
min w'Σw (portfolio variance)
s.t. w'μ = target_return
Σw = 1
w ≥ 0 (no shorting)
| Advantages | Disadvantages |
|---|---|
| Mathematically rigorous | Extremely sensitive to inputs (garbage in, garbage out) |
| Efficient frontier is visualizable | Concentrated-allocation problem (often produces extreme weights) |
| Foundational framework | Assumes normality and ignores fat tails |
Practical advice: do not use raw MPT directly. Add constraints (upper/lower bounds, sector limits) or use a regularized version.
2. Black-Litterman Model
Core idea: start from market equilibrium and incorporate investor views.
Steps:
1. Reverse-imply market equilibrium returns: π = δΣw_mkt
2. Build the view matrices: P (selection matrix), Q (view returns), Ω (view uncertainty)
3. Blend the posterior: μ_BL = [(τΣ)^-1 + P'Ω^-1 P]^-1 [(τΣ)^-1 π + P'Ω^-1 Q]
4. Run Markowitz optimization using posterior μ_BL
Example views:
- Absolute view: "China A-shares will return 10% over the next year" →
P=[1,0,0], Q=[0.10] - Relative view: "China A-shares will outperform US equities by 5%" →
P=[1,-1,0], Q=[0.05]
Parameter guidance:
τ(uncertainty scaling):0.025-0.05Ω: set according to view confidence, where higher confidence = smaller variance
3. Risk Budgeting
Core idea: allocate by risk contribution rather than by capital share.
