본문으로 건너뛰기
Skillpedia
분석 및 스프레드시트37k · #7562

trade-journal

하는 일

이 스킬은 증권사에서 내려받은 거래 파일을 읽고 실제 매매 습관을 보여 줍니다. 자신의 습관을 솔직하게 점검하려는 개인 투자자를 위한 스킬입니다.

사용하는 경우

  • ✓증권사 명세서를 업로드하고 승률과 수익률 요약을 원할 때.
  • ✓지나치게 자주 매매하거나 가격 움직임을 쫓는 것 같을 때.
  • ✓수익 거래는 너무 일찍 팔고 손실 거래는 너무 오래 보유하는지 알고 싶은 경우.

스킬 링크

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

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/HKUDS/Vibe-Trading/blob/main/agent/src/skills/trade-journal/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“Futu에서 내려받은 거래 내역을 분석하고, 제게 나쁜 매매 습관이 있는지 알려 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트는 증권사 파일을 읽고 형식을 감지한 뒤, 승률, 보유 기간, 낙폭이 담긴 프로필을 만듭니다. 이후 네 가지 행동 패턴을 확인하고, 수치를 근거로 각 패턴의 심각도를 평가합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

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 only
  • strategy — 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.4 AND profit_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 < 1 AND trade_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
자주 묻는 질문

어떤 증권사 형식을 쓸 수 있나요?

Tonghuashun, Eastmoney, Futu의 내보내기 파일과 표준 열을 가진 일반 CSV 파일을 읽을 수 있습니다.

어떤 편향을 점검하나요?

처분 효과, 과도한 매매, 상승 추격, 앵커링을 점검합니다.

날짜나 종목으로 걸러 볼 수 있나요?

네. 분석을 기간, 종목, 시장별로 걸러 볼 수 있습니다.

상세 정보

작성자의 원본 설명

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

인기도

GitHub 스타
37k
순위
#7562
라이선스
MIT
업데이트
2026. 11. 1.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬