asset-allocation
하는 일
이 스킬은 돈을 여러 자산에 나누는 주요 방법과 내장 포트폴리오 최적화 도구를 실행하는 방법을 설명합니다. 배분 이론을 이해하고 적용하려는 투자자와 분석가를 위한 스킬입니다.
사용하는 경우
- ✓명확한 방법으로 포트폴리오를 여러 자산에 나누고 싶을 때.
- ✓시장에 대한 견해를 기준 배분과 결합하고 싶을 때.
- ✓최적화 도구를 사용하고 결과를 설정 파일에 저장하고 싶을 때.
스킬 링크
https://github.com/HKUDS/Vibe-Trading/blob/main/agent/src/skills/asset-allocation/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“이 다섯 개 ETF에 대해 위험 균형 배분을 만들고, 방법을 설명한 뒤, 비중을 설정 파일에 써 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 평균-분산이나 위험 예산 같은 선택한 방법을 설명하고, 강점과 약점도 함께 말합니다. 그다음 사용자의 제약 조건으로 맞는 최적화 도구를 실행하고, 그 결과 비중을 설정 파일에 씁니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
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.
Risk contribution: RC_i = w_i × (Σw)_i / σ_p
Target: RC_i / σ_p = budget_i (for all i)
| Strategy | Risk Budget | Best Use Case |
|---|---|---|
| Equal risk contribution | Each asset 1/N | When you do not know which asset is best |
| Equity-tilted risk budget | Stocks 60%, bonds 30%, commodities 10% | When you want equities to contribute more risk |
| Dynamic risk budget | Adjust dynamically by signal strength | When you have market-timing ability |
4. All-Weather Strategy
Bridgewater framework: allocate risk equally across economic environments.
Economic environment Asset allocation
───────── ─────────
Growth rising Equities + commodities + corporate bonds
Growth falling Government bonds + inflation-protected bonds
Inflation rising Commodities + inflation-protected bonds + EM debt
Inflation falling Equities + government bonds
Simplified allocation example for China-focused portfolios:
- 30% CSI 300 / CSI 500
- 40% government bonds / credit bonds
- 15% gold
- 15% commodities / REITs
Guide to the 5 Optimizers
Overview of the Built-In Optimizers
Configure them in config.json through optimizer and optimizer_params:
| optimizer | Display Name | Core Idea | Best Use Case |
|---|---|---|---|
equal_volatility |
Equal Volatility | Allocate weights by inverse volatility | Simple and effective baseline |
risk_parity |
Risk Parity | Equalize risk contribution while accounting for correlation | Long-term robust allocation |
mean_variance |
Mean-Variance | Maximize Sharpe ratio or minimize variance | When return forecasts are available |
max_diversification |
Maximum Diversification | Maximize the diversification ratio | When pursuing a low-correlation portfolio |
turnover_aware |
Turnover-Aware | Mean-variance utility with an L1 penalty on weight changes vs the previous rebalance | When trading costs matter; tune turnover_penalty to your data frequency |
1. equal_volatility
{
"optimizer": "equal_volatility",
"optimizer_params": {
"lookback": 60
}
}
Principle: w_i = (1/σ_i) / Σ(1/σ_j)
| Parameter | Default | Description |
|---|---|---|
| lookback | 60 | Volatility calculation window (trading days) |
Advantages: simple and fast, no return forecast required, no correlation matrix required.
Disadvantages: ignores cross-asset correlation.
2. risk_parity
{
"optimizer": "risk_parity",
"optimizer_params": {
"
자주 묻는 질문
원시 평균-분산 최적화만으로 충분한가요?
스킬은 결과가 입력에 매우 민감하므로 그것만 쓰는 것에 경고하며, 제약 조건을 추가하라고 권합니다.
Black-Litterman이란 무엇인가요?
시장 기준선에서 시작해, 특정 자산에 대한 자신의 견해로 조정하는 방법입니다.
비중을 그대로 쓸 수 있나요?
설정 파일에 쓸 수 있지만, 실제 사용 전에 검토해야 합니다.
상세 정보
작성자의 원본 설명
Asset allocation theory and optimizer usage — MPT / Black-Litterman / risk budgeting / all-weather strategy, including guides for 5 optimizers and rebalancing rules.
repo: HKUDS/Vibe-Trading
인기도
- GitHub 스타
- 37k
- 순위
- #7498
- 라이선스
- MIT
- 업데이트
- 2026. 11. 1.
댓글
- …
이 저장소의 다른 스킬
vibe-trading
37k에이전트에게 백테스트, 팩터 분석, 옵션 가격 결정, 여러 시장의 시장 데이터를 포함하는 완전한 금융 연구 도구 모음을 제공합니다.
adr-hshare
37k에이전트에게 미국 ADR과 홍콩 주식처럼 여러 시장에 상장된 중국 기업의 가격을 비교하는 방법을 보여 줍니다.
akshare
37k에이전트가 API 키 없이 중국과 해외 주식, 선물, 외환, 경제 지표의 무료 시장 데이터를 가져오도록 돕습니다.
alpha-zoo
37k에이전트가 만들어진 주식 팩터 라이브러리를 둘러보고, 선택한 시장에서 팩터 묶음이 수익률을 얼마나 잘 예측하는지 시험하도록 돕습니다.
비슷한 스킬
gitcrawl
394k에이전트가 저장된 GitHub 이슈와 풀 리퀘스트 보관본을 검색하고, 중복 항목을 묶고, GitHub에서 현재 상태를 확인하도록 돕습니다.
slacrawl
394k에이전트가 로컬 Slack 보관본에서 메시지를 검색하고 개수를 세며, 보관본이 얼마나 최신인지 확인하고 필요할 때 새로 고치도록 돕습니다.
goplaces
394k에이전트가 Google Places로 장소를 검색하고, 세부 정보와 리뷰를 가져오고, 장소 이름을 확인하며, 스크립트용 JSON을 출력하도록 돕습니다.