Chuyển đến nội dung
Skillpedia
Phân tích và bảng tính37k · #7498

asset-allocation

Skill này làm gì

Skill này giải thích các cách chính để chia tiền giữa nhiều tài sản và cách chạy các bộ tối ưu danh mục có sẵn. Skill dành cho nhà đầu tư và nhà phân tích muốn hiểu lý thuyết phân bổ và áp dụng nó.

Khi nào nên dùng

  • ✓Khi bạn muốn chia danh mục cho nhiều tài sản bằng một phương pháp rõ ràng.
  • ✓Khi bạn muốn kết hợp quan điểm thị trường với một phân bổ nền.
  • ✓Khi bạn muốn dùng các bộ tối ưu và lưu kết quả vào một tệp cấu hình.

Liên kết skill

https://github.com/HKUDS/Vibe-Trading/blob/main/agent/src/skills/asset-allocation/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/HKUDS/Vibe-Trading/blob/main/agent/src/skills/asset-allocation/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Xây một phân bổ cân bằng rủi ro cho năm quỹ ETF này, giải thích phương pháp, và ghi các trọng số vào tệp cấu hình.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Agent giải thích phương pháp đã chọn, như mean-variance hoặc phân bổ rủi ro, gồm điểm mạnh và điểm yếu. Sau đó nó chạy bộ tối ưu tương ứng với các ràng buộc của bạn và ghi các trọng số thu được vào một tệp cấu hình.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

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": {
    "
Câu hỏi thường gặp

Tối ưu mean-variance thô có đủ không?

Skill cảnh báo không nên dùng riêng lẻ, vì kết quả rất nhạy với đầu vào, và khuyên thêm các ràng buộc.

Black-Litterman là gì?

Nó bắt đầu từ một nền thị trường và điều chỉnh bằng quan điểm riêng của bạn về các tài sản cụ thể.

Có thể dùng trọng số trực tiếp không?

Chúng có thể được ghi vào tệp cấu hình, nhưng nên được xem xét trước khi dùng thật.

Chi tiết

Mô tả gốc của tác giả

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

Độ phổ biến

Sao GitHub
37k
Vị trí xếp hạng
#7498
Giấy phép
MIT
Cập nhật
1/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự