本文へスキップ
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がスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/HKUDS/Vibe-Trading/blob/main/agent/src/skills/trade-journal/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“Futuのエクスポートした取引履歴を分析して、悪い取引の癖がないか教えてください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

エージェントは、証券会社のファイルを読み、形式を検出して、勝率、保有期間、ドローダウンを含むプロフィールを作ります。その後、4つの行動パターンを確認し、各パターンを重大度で評価し、数字を根拠として示します。

技術的な内容(元の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
よくある質問

どの証券会社の形式に対応していますか?

同花順、東方財富、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

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル