factor-research
Skill này làm gì
Skill này đánh giá các yếu tố cổ phiếu trên một nhóm mã và kiểm tra yếu tố nào thực sự có khả năng dự báo. Skill dành cho nhà phân tích định lượng muốn sàng lọc yếu tố và kết hợp những yếu tố tốt.
Khi nào nên dùng
- ✓Khi bạn muốn kiểm tra một yếu tố riêng lẻ, như động lượng hoặc giá trị, có dự báo lợi nhuận không.
- ✓Khi bạn muốn chọn trọng số để kết hợp nhiều yếu tố.
- ✓Khi bạn muốn xem khả năng dự báo của một yếu tố giảm nhanh thế nào qua các kỳ nắm giữ khác nhau.
Liên kết skill
https://github.com/HKUDS/Vibe-Trading/blob/main/agent/src/skills/factor-research/SKILL.mdSao 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
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Kiểm tra xem các yếu tố động lượng và giá trị có dự báo lợi nhuận trên danh sách cổ phiếu này không, và cho tôi biết yếu tố nào đáng kết hợp.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent tính giá trị của từng yếu tố và lợi nhuận tương lai của từng cổ phiếu, rồi chạy công cụ phân tích yếu tố để tính thống kê IC và IR và các backtest theo phân vị. Từ kết quả, nó đánh giá tính hợp lệ của từng yếu tố và gợi ý cách kết hợp những yếu tố mạ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.
Factor Research Framework
Purpose
Systematically evaluates the predictive power of single or multiple factors. Uses IC/IR statistical tests and quantile backtests to determine whether a factor has stock-selection power, and to guide factor screening and combination.
Applicable scenarios:
- Single-factor validity testing (momentum, value, quality, volatility, and more)
- Determining weights for multi-factor combination
- Factor decay analysis (IC changes across different holding periods)
- Comparing factor differences across industries and markets
Workflow
- Calculate factor values: compute factor exposures for each instrument on the cross-section, and output a factor CSV (
index=date,columns=codes) - Calculate returns: compute each instrument's forward N-day return, and output a return CSV (same structure)
- Call the
factor_analysistool: pass in the factor CSV, return CSV, and output directory - Interpret the results: judge factor validity based on IC/IR criteria and quantile backtest results
- Factor screening / combination: keep effective factors and combine them with equal weights or IC-based weights
Key point: the rows (dates) and columns (instrument codes) of the factor CSV and return CSV must align exactly. Returns must be forward returns after the factor-observation date (to avoid look-ahead bias).
factor_analysis Tool Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| factor_csv | string | Yes | - | Path to the factor-value CSV |
| return_csv | string | Yes | - | Path to the return CSV |
| output_dir | string | Yes | - | Output directory for results |
| n_groups | integer | No | 5 | Number of quantile groups |
Output Files
| File | Contents |
|---|---|
| ic_series.csv | Daily IC series |
| ic_summary.json | IC mean, IC standard deviation, IR, proportion of IC > 0 |
| group_equity.csv | Cumulative equity curves for each quantile group |
IC/IR Interpretation Standards
| Metric | Threshold | Interpretation |
|---|---|---|
| IC mean | > 0.03 | Factor has basic predictive power |
| IC mean | > 0.05 | Factor has strong predictive power |
| IC mean | > 0.10 | Unusually high; check for look-ahead bias |
| IR (IC mean / IC std) | > 0.5 | Factor is stably effective |
| IR | > 1.0 | Extremely strong, very rare |
| Proportion of IC > 0 | > 55% | Factor direction is stable |
| Proportion of IC > 0 | < 50% | Factor direction is unstable and unusable |
Note: negative IC can also be useful (reverse factors). Judge by absolute value, and reverse the signal direction in actual use.
Quantile Backtest Interpretation
Quantile backtesting sorts instruments into N groups by factor value from low to high (default 5 groups), with equal-weight holding inside each group.
Criteria:
- Monotonicity: the final net values from
Group_1toGroup_Nshould show a monotonic rising (or falling) pattern. Better monotonicity means stronger factor discrimination - Long-short spread: the net-value difference between the highest and lowest group (
long_short_spread). A larger spread means stronger selection power - Nonlinearity: if only the top and bottom groups differ materially while the middle groups are similar, the factor may only be effective in the tails
- Stability: group equity curves should be smooth; sharp swings indicate an unstable factor
Warning signs:
- No meaningful difference across group equity curves → the factor is ineffective
- Non-monotonic pattern (such as V-shape or inverted V-shape) → the factor may have a nonlinear relationship and requires further analysis
- One group's net value falls persistently → the factor may be usable in reverse
Factor Combination Methods
When multiple single factors pass validity tests, they should be combined into a composite factor:
Equal-Weight Combination
The simplest method: standardize each factor and sum them with equal weights. Suitable when the factor count is small and IC differences are minor.
Composite factor = Z(factor1) + Z(factor2) + ... + Z(factorN)
where Z() is cross-sectional Z-score standardization
IC-Weighted Combination
Assign weights according to historical IC mean. Factors with higher IC receive larger weights.
weight_i = |IC_mean_i| / sum(|IC_mean_j|)
Composite factor = sum(weight_i * Z(factor_i))
Orthogonalized Combination
First orthogonalize the factors with the Schm
Câu hỏi thường gặp
IC đo lường điều gì?
Mức độ thứ hạng cổ phiếu theo yếu tố khớp với thứ hạng lợi nhuận sau đó tốt đến đâu.
Tại sao lợi nhuận phải là dữ liệu tương lai?
Dùng lợi nhuận trước thời điểm yếu tố sẽ gây thiên lệch nhìn trước và làm kết quả kiểm tra không đáng tin.
Các yếu tố có thể kết hợp không?
Có. Skill bao gồm cách gán trọng số đều nhau và theo IC để kết hợp các yếu tố hiệu quả.
Chi tiết
Mô tả gốc của tác giả
Factor research framework with IC/IR analysis, quantile backtesting, and factor combination. Suitable for cross-sectional factor evaluation across multiple instruments.
repo: HKUDS/Vibe-Trading
Độ phổ biến
- Sao GitHub
- 37k
- Vị trí xếp hạng
- #7519
- Giấy phép
- MIT
- Cập nhật
- 1/11/2026
Bình luận
- …
Thêm skill từ kho mã này
vibe-trading
37kCho agent của bạn bộ công cụ nghiên cứu tài chính đầy đủ: backtest, phân tích nhân tố, định giá quyền chọn và dữ liệu thị trường nhiều nước.
adr-hshare
37kChỉ cho agent của bạn cách so sánh giá của một công ty Trung Quốc được niêm yết ở nhiều thị trường, như ADR ở Mỹ và cổ phiếu ở Hồng Kông.
akshare
37kCho agent của bạn lấy dữ liệu thị trường miễn phí: cổ phiếu Trung Quốc và toàn cầu, tương lai, ngoại hối, chỉ số kinh tế, không cần API key.
alpha-zoo
37kCho agent của bạn duyệt thư viện nhân tố cổ phiếu dựng sẵn và kiểm tra cả một nhóm nhân tố dự đoán lợi nhuận tốt đến đâu trên thị trường đã chọn.
Skill tương tự
gitcrawl
394kCho phép agent của bạn tìm trong kho lưu trữ issue và pull request GitHub, gom các mục trùng lặp và kiểm tra trạng thái hiện tại trên GitHub.
slacrawl
394kCho phép agent của bạn tìm và đếm tin nhắn trong kho lưu trữ Slack cục bộ, kiểm tra kho đó mới đến mức nào và làm mới khi cần.
goplaces
394kGiúp agent của bạn tìm địa điểm, lấy chi tiết và đánh giá, và xác định tên địa điểm bằng Google Places, với đầu ra JSON cho script.