trade-journal
Skill này làm gì
Skill này đọc file xuất từ sàn của bạn và cho thấy cách bạn thực sự giao dịch. Skill dành cho nhà đầu tư cá nhân muốn nhìn nhận thẳng thắn về thói quen của mình.
Khi nào nên dùng
- ✓Khi bạn tải lên sao kê giao dịch và muốn có tóm tắt về tỷ lệ thắng và lợi nhuận.
- ✓Khi bạn nghi ngờ mình giao dịch quá thường xuyên hoặc đuổi theo biến động giá.
- ✓Khi bạn muốn xem mình có bán lệnh thắng quá sớm và giữ lệnh thua quá lâu không.
Liên kết skill
https://github.com/HKUDS/Vibe-Trading/blob/main/agent/src/skills/trade-journal/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
“Phân tích file giao dịch từ Futu của tôi và cho tôi biết tôi có thói quen giao dịch xấu nào không.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Skill đọc file sàn, nhận diện định dạng và xây dựng hồ sơ gồm tỷ lệ thắng, thời gian nắm giữ và mức sụt giảm. Sau đó nó kiểm tra bốn kiểu hành vi và chấm mức độ nghiêm trọng của từng kiểu, kèm số liệu làm bằng chứng.
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.
Trade Journal Analysis
Purpose
Users upload broker exports (交割单) and get an honest, data-grounded portrait of their own trading. Two layers are live:
- Profile — holding days, frequency, win rate, PnL ratio, cumulative PnL, max drawdown, top symbols, market/hourly distribution.
- Behavior diagnostics — 4 biases, each with severity (low/medium/high) and numeric evidence: disposition effect, overtrading, chasing momentum, anchoring.
Strategy extraction → backtest bridge lands in Phase 4c.
Supported formats (auto-detected):
- 同花顺 (Tonghuashun) — A-share CSV, typically GBK-encoded
- 东方财富 (Eastmoney) — A-share CSV, typically GBK-encoded
- 富途 (Futu) — HK/US CSV, UTF-8
- Generic — any CSV with columns like
datetime/symbol/side/qty/price
Usage
Call the analyze_trade_journal tool directly. Never run Python from bash.
analyze_trade_journal(file_path="uploads/xxx.csv")
analyze_trade_journal(file_path="uploads/xxx.csv", analysis_type="profile")
analyze_trade_journal(file_path="uploads/xxx.csv", filter_expr="2026-01 to 2026-03")
analyze_trade_journal(file_path="uploads/xxx.csv", filter_expr="symbol=600519.SH")
analyze_trade_journal(file_path="uploads/xxx.csv", filter_expr="market=china_a")
analysis_type:
full(default) — profile + behavior (strategy still placeholder)profile— profile metrics only (fastest)behavior— 4 behavior diagnostics onlystrategy— Phase 4c placeholder
filter_expr (optional):
- Date range:
"YYYY-MM to YYYY-MM"or"YYYY-MM-DD to YYYY-MM-DD" - Symbol:
"symbol=600519.SH"(exact match on qualified symbol) - Market:
"market=china_a|us|hk|crypto"
Return shape (profile subset)
{
"status": "ok",
"file": "xxx.csv",
"format_detected": "tonghuashun",
"total_records": 326,
"date_range": "2026-01-06 ~ 2026-03-28",
"symbols_count": 42,
"market": "china_a",
"profile": {
"total_trades": 326,
"total_roundtrips": 118,
"avg_holding_days": 3.2,
"trade_frequency_per_week": 4.1,
"win_rate": 0.48,
"profit_loss_ratio": 1.35,
"total_pnl": 18240.55,
"max_drawdown": -9820.10,
"top_symbols": [{"symbol": "600519.SH", "trades": 14, "total_amount": 1.02e6}, ...],
"market_distribution": {"china_a": 326},
"hourly_distribution": {9: 52, 10: 84, ...},
"roundtrips_sample": [{"symbol": "600519.SH", "buy_dt": "...", "sell_dt": "...", "pnl": 3400.1, "pnl_pct": 0.021, "hold_days": 2.5}, ...]
}
}
Note: PnL uses FIFO lot matching; unmatched open positions are excluded from win rate / PnL ratio (only closed round-trips count). Drawdown starts from zero realized PnL, so the first losing close counts.
For mixed-currency journals, total_pnl, total_dividends, max_drawdown
and profit_loss_ratio are currency-keyed objects. Present each currency
separately; never add their values or average their ratios. Dividend-only
journals follow the same rule. overtrading.by_currency contains each
currency’s activity diagnosis; mixed journals rank top_symbols by trade
count and label amounts with their currency. No FX conversion is implied.
Presenting results to the user
Produce a single markdown report in the user's language. Lead with the top-line numbers, then section-by-section. Keep it dense — this is retail readers skimming on a phone.
Report template
## 你的交易画像 — {date_range}
**总体**
- 交易笔数:{total_trades}(完整来回 {total_roundtrips} 次)
- 平均持仓:{avg_holding_days} 天
- 交易频率:{trade_frequency_per_week} 次/周
- 胜率:{win_rate:.0%}
- 盈亏比:{profit_loss_ratio}
- 累计盈亏:{total_pnl}
- 最大回撤:{max_drawdown}
**最常交易的标的**(前 5 名)
| 标的 | 笔数 | 成交额 |
|------|------|--------|
| ... | ... | ... |
**市场分布**
{market_distribution}
**交易时段**
{hourly_distribution — highlight peak hours}
**一句话观察**
(根据数据写 1-2 句:过度交易?只做窄范围标的?集中在某时段?)
Guidance:
- If
win_rate < 0.4ANDprofit_loss_ratio < 1.0→ explicit warning: losing on both win rate and payoff. Ask whether they want behavior diagnostics (Phase 4b) or a cooling-off reality check. - If
avg_holding_days < 1ANDtrade_frequency_per_week > 15→ flag intraday-heavy pattern, note that minute-level backtest would be better. - If
symbols_count <= 3→ concentration risk; ask if they want a sector- diversification check.
Follow-up dialogue
After the initial report, users typically ask:
- Time-slice: "3 月份表现怎么样" → re-call with
filter_expr="2026-03-01 to 2026-03-31". - Symbol deep-dive: "茅台这只赚了多少" → `filter_expr="symbol
Câu hỏi thường gặp
Các định dạng sàn nào hoạt động?
Skill đọc file xuất từ Tonghuashun, Eastmoney và Futu, cùng file CSV chung có các cột tiêu chuẩn.
Skill kiểm tra những thiên kiến nào?
Nó kiểm tra hiệu ứng bán non (disposition effect), giao dịch quá mức, đuổi theo đà giá và neo giá (anchoring).
Tôi có thể lọc theo ngày hoặc mã không?
Có. Bạn có thể lọc phân tích theo khoảng thời gian, mã chứng khoán hoặc thị trường.
Chi tiết
Mô tả gốc của tác giả
Analyze a user's trade journal (CSV/Excel broker export). Parses 同花顺/东方财富/富途/generic formats, produces a trading profile and 4 behavior diagnostics (disposition effect, overtrading, chasing, anchoring). Use the `analyze_trade_journal` tool.
repo: HKUDS/Vibe-Trading
Độ phổ biến
- Sao GitHub
- 37k
- Vị trí xếp hạng
- #7562
- 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.