Agent skill

Shadow Account Trade Journal Analysis

by HKUDS in HKUDS/Vibe-Trading

Learns profit patterns from your own trade journal, backtests them across A-share, Hong Kong, US and crypto markets, and explains the gap against real results.

MITAuto-check passedBusiness, Finance & HR

SKILL.md written in Chinese; this summary is our English description.

Install Shadow Account Trade Journal Analysis

skills CLI
$ npx skills add HKUDS/Vibe-Trading --skill shadow-account -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install HKUDS/Vibe-Trading shadow-account --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/HKUDS/Vibe-Trading.git skills-src && mkdir -p .claude/skills && cp -r skills-src/agent/src/skills/shadow-account .claude/skills/shadow-account && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
shadow-account
GitHub stars
35k
Token cost
~567 tokens
SKILL.md length
136 words
Files
1
Skills in repo
89
Repo updated
First seen
Licence
MIT

At a glance

Learns profit patterns from your own trade journal, backtests them across A-share, Hong Kong, US and crypto markets, and explains the gap against real results.

  • Works in 4 steps: extract_shadow_strategy(journal_path=...) → run_shadow_backtest(shadow_id=...,… → render_shadow_report(shadow_id=...) → …
  • Finding out what the winning trades in a personal trade journal have in common
  • SKILL.md covers 何时触发, 工作流(四步), 产出解读 and 对话模板, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

A Chinese-language workflow that starts from a user's uploaded trade journal. It extracts three to five plain-language rules describing what the profitable round trips have in common, asks the user to confirm that they sound like their own style, and re-runs with a higher minimum-support setting if they do not. The rules are then backtested across the A-share, Hong Kong, US and crypto markets.

The output splits the gap between the shadow account and real results into noise trades, early exits, late exits, overtrading and missed signals, and lists the five most impactful counterfactual trades. A report is rendered as HTML and PDF, falling back to HTML only if PDF generation fails. An optional scan lists current symbols that sit in the shadow's entry window, for research only. The skill never connects to order placement, does not copy anyone else's strategy and raises an error when there are too few profitable round trips.

When your agent uses it

  • Finding out what the winning trades in a personal trade journal have in common
  • Estimating how much more a trader could have earned by following their own rules
  • Separating impulsive trades from rule-based ones in a trade history
  • Producing a PDF report that compares real results with a rule-based version

Example prompts

  • “Extract my trading strategy from the journal at data/trades.csv.”
  • “Backtest my winning pattern across all four markets and tell me how much more I could have made.”
  • “Show me which of my trades were emotional noise trades and what they cost me.”
  • “Generate the shadow account report for the strategy we just extracted.”

Requirements

  • An uploaded trade journal (settlement statement)
  • The `analyze_trade_journal` tool run beforehand
  • `weasyprint` for the PDF, otherwise the report is HTML only

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. extract_shadow_strategy(journal_path=...)
  2. run_shadow_backtest(shadow_id=..., journal_path=...)
  3. render_shadow_report(shadow_id=...)
  4. (可选)scan_shadow_signals(shadow_id=...) — 今日落在影子入场窗口的标的列表(研究用)

What it can do on your machine

Read from SKILL.md and the folder at commit e532650. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Shadow Account Trade Journal Analysis loads about 567 tokens when it runs. Until then it costs about 31 tokens; SKILL.md has 136 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~31
When it runs · the whole SKILL.md, loaded when a task matches
~567

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from HKUDS/Vibe-Trading at commit e532650, republished under its MIT licence (© HKUDS). 136 words, ~567 tokens.

Download SKILL.mdSave it as .claude/skills/shadow-account/SKILL.md (or your agent's skills folder).
name
shadow-account
description
Shadow Account — 从用户交割单提炼盈利模式(3-5 条人话规则)→ 跨 A股/港股/美股/crypto 多市场回测 → 差值归因 → 8-section PDF 报告。叙事:你的影子,没有情绪噪音。
category
analysis

Shadow Account — 影子账户

何时触发

当用户说 "提炼我的策略" / "训练影子" / "我的打法回测一下" / "我能多赚多少" / "我的盈利模式" 时,加载此 skill。

前提:用户已上传交割单且 analyze_trade_journal 已跑过。若没有,先跑 Phase 4a 工具。

工作流(四步)

  1. extract_shadow_strategy(journal_path=...)
    • 返回 shadow_id + 3-5 条人话规则
    • 向用户 confirm:"这些规则像你本人吗?" 如果用户说"不像",提高 min_support 重跑
  2. run_shadow_backtest(shadow_id=..., journal_path=...)
    • 返回 per-market 指标 + delta_pnl + attribution breakdown
    • 默认四市场并跑(china_a/hk/us/crypto)
  3. render_shadow_report(shadow_id=...)
    • 生成 HTML + PDF(weasyprint 失败时自动降级成 HTML-only)
    • 返回 html_path / pdf_path / delta_pnl
  4. (可选)scan_shadow_signals(shadow_id=...) — 今日落在影子入场窗口的标的列表(研究用)

产出解读

规则卡

每条规则含:rule_id、human_text(≤30 字)、support_count、coverage_rate、holding_days_range。规则不是"必赚公式",而是"用户盈利时的共性画像"。

回测矩阵
  • per_market:四市场的 Sharpe/年化/最大回撤
  • combined:合并池表现
  • equity_curve:净值时序(进入 PDF Section 3)
差值归因(PDF Section 5 — gut punch)

所有数值 signed,正值=影子相对赚更多:

  • noise_trades_pnl:不命中任何规则的真实交易累计 PnL(用户的情绪单)
  • early_exit_pnl:赢单但持仓 < 规则下限,按不足比例折算的机会成本
  • late_exit_pnl:亏单但持仓 > 规则上限,按超额比例折算的放大损失
  • overtrading_pnl:超出规则频率的真实交易 PnL
  • missed_signals_pnl:残差(shadow_pnl − real_pnl − 上面四项之和)
反事实 Top 5

按 |impact| 排序,列出 5 条"最该做没做 / 最不该做却做了"的交易,带具体日期、原因。

对话模板

确认规则:

从你 {profitable_roundtrips} 笔盈利回合中提炼出这些规则:{rules}。这些看起来像你本人的打法吗?

展示差值(Section 5):

影子 PnL {shadow_pnl:+.0f} / 你真实 {real_pnl:+.0f} / 差值 {delta_pnl:+.0f}。其中 {noise_trades_pnl:+.0f} 来自不符合你任何盈利规则的"情绪单"。

今日扫描(强制附带免责):

今日落在你影子入场节奏的标的:{symbols}。仅研究用,不是买入建议。

规则翻译 Prompt 模板

当 extract_shadow_strategy 被调用时,可以注入一个 llm_translator callable 以把结构化 entry_condition 翻译成中文自然语言:

[上下文] 一位散户的盈利回合中,{N} 笔满足同一组条件:
  market = {market}
  entry_hour ∈ [{hour_min}, {hour_max}]
  持有 {hold_lo}-{hold_hi} 天
[任务] 用 ≤30 字的中文写一条规则,口吻像用户自述的交易习惯,不要堆术语。
[输出] 只返回一行规则文本,不要解释。

不注入时走 f-string 模板(见 extractor._translate_rule)。

红线

  • 不落单:这些工具永远不会对接任何下单通道,仅研究输出
  • 不复制他人策略:Shadow Account 是"用户自己"的影子,不从社区/公开策略提取规则
  • 样本不足必报错:profitable roundtrips < 5 → 直接 raise,不编造

© HKUDS, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in agent/src/skills/shadow-account of HKUDS/Vibe-Trading.

Open the folder on GitHubat commit e532650

Compare with similar skills

Shadow Account Trade Journal Analysis next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Shadow Account Trade Journal Analysis compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Shadow Account Trade Journal Analysis this skillHKUDS/Vibe-Trading35k—~567Automated safety check: PassMIT
Strategy Performance Reporttradesdontlie/tradingview-mcp6.8k2 repos~591Automated safety check: PassCustom licence
Alpha Desk Investment ResearchJingHao-Leon/dsh-alpha-desk181—~1.3kAutomated safety check: NotesMIT
Quant Buddy Market Data and Backtestingpseudo-longinus/quant-buddy-skills193—~11kAutomated safety check: PassMIT
Marketscreenergauss314/skills247—~1.1kAutomated safety check: PassMIT
Stock Analysisalirezarezvani/claude-skills28k—~8.5kAutomated safety check: PassMIT

Similar skills

  • Strategy Performance Report

    tradesdontlie/tradingview-mcp

    Builds a performance report for a backtested Pine Script strategy from TradingView data, covering metrics, trades, the equity curve and improvement ideas.

    6.8k GitHub starsUsed in 2 repos~591 tokens
    Business, Finance & HRAuto-check passed
  • Alpha Desk Investment Research

    JingHao-Leon/dsh-alpha-desk

    Runs an AI investment research desk around the aihf hedge-fund CLI, with research cycles, backtests and iFinD data, under a risk gate and a rule against placing real trades.

    181 GitHub stars~1.3k tokensUpdated 17 days ago
    Business, Finance & HRAuto-check: notes
  • Quant Buddy Market Data and Backtesting

    pseudo-longinus/quant-buddy-skills

    Queries A-share, Hong Kong and US stock quotes, valuation and financial data through the Quant Buddy API, and runs screening, factor calculation and strategy backtests.

    193 GitHub stars~11k tokensUpdated yesterday
    Business, Finance & HRAuto-check passed
  • Marketscreener

    gauss314/skills

    Scraper de MarketScreener (S&P Capital IQ): earnings transcripts, cotizaciones, perfiles empresa, financials, valuation, consenso analistas, noticias, insider trading, ratings.

    247 GitHub stars~1.1k tokensUpdated 3 mo ago
    Business, Finance & HRAuto-check passed
  • Stock Analysis

    alirezarezvani/claude-skills

    Produce a rigorous, sector-relative, multi-factor fundamental analysis of a publicly listed company — Indian (NSE/BSE) or US/global.

    28k GitHub stars~8.5k tokensUpdated 1 mo ago
    Business, Finance & HRAuto-check passed
  • Signalradar

    LeoYeAI/openclaw-master-skills

    SignalRadar — Monitor Polymarket prediction markets for probability changes and send alerts when thresholds are crossed.

    2.2k GitHub stars~7.1k tokensUpdated 2 mo ago
    Business, Finance & HRAuto-check passed

More from HKUDS/Vibe-Trading

All 89 skills in this repo
  • Eastmoney Market Data

    HKUDS/Vibe-Trading

    Index of Eastmoney's free, no-token market data interfaces for China A-shares and Hong Kong stocks: fund flows, dragon-tiger lists, margin trading, reports and news.

    35k GitHub stars~1k tokensUpdated yesterday
    Auto-check passed
  • OKX Market Data

    HKUDS/Vibe-Trading

    Retrieves public OKX cryptocurrency market data such as spot prices, candlesticks, funding rates and open interest through the OKX V5 REST API, with no authentication.

    35k GitHub stars~1.3k tokensUpdated yesterday
    Auto-check passed
  • SEC EDGAR Filings Fetcher

    HKUDS/Vibe-Trading

    Fetches U.S. SEC EDGAR data: resolves tickers to CIK numbers, lists recent 10-K, 10-Q and 8-K filings with document URLs, and pulls XBRL financial series.

    35k GitHub stars~1.4k tokensUpdated yesterday
    Auto-check passed
  • A-Share ST Risk Screener

    HKUDS/Vibe-Trading

    Predicts whether a mainland China A-share company risks an ST or *ST warning after its next annual report, using financial thresholds and Sina penalty records.

    35k GitHub stars~4.9k tokensUpdated yesterday
    Auto-check passed
  • Breaks a structural trend such as AI infrastructure into its physical supply chain and ranks lesser-known listed companies sitting on each bottleneck.

    35k GitHub stars~2.7k tokensUpdated yesterday
    Auto-check passed
  • Plans and drafts an eight-part, roughly 120k-word investigative series on one company, built around a strict fact-check pass rather than fast drafting.

    35k GitHub stars~2.4k tokensUpdated yesterday
    Auto-check passed

Questions about Shadow Account Trade Journal Analysis

What does Shadow Account Trade Journal Analysis do?

Learns profit patterns from your own trade journal, backtests them across A-share, Hong Kong, US and crypto markets, and explains the gap against real results. A Chinese-language workflow that starts from a user's uploaded trade journal. It extracts three to five plain-language rules describing what the profitable round trips have in common, asks the user to confirm that they sound like their own style, and re-runs with a higher minimum-support setting if they do not.

When should I use Shadow Account Trade Journal Analysis?

Shadow Account Trade Journal Analysis fits situations like: finding out what the winning trades in a personal trade journal have in common; estimating how much more a trader could have earned by following their own rules; separating impulsive trades from rule-based ones in a trade history; producing a PDF report that compares real results with a rule-based version.

How do I install Shadow Account Trade Journal Analysis in Claude Code?

Run `npx skills add HKUDS/Vibe-Trading --skill shadow-account -a claude-code`. Or copy the skill folder (agent/src/skills/shadow-account in HKUDS/Vibe-Trading) into .claude/skills/shadow-account in your project. Claude Code loads it when a task matches its description.

How do I install Shadow Account Trade Journal Analysis in Codex?

Run `npx skills add HKUDS/Vibe-Trading --skill shadow-account -a codex`. Or copy the skill folder (agent/src/skills/shadow-account in HKUDS/Vibe-Trading) into .agents/skills/shadow-account in your project. Codex loads it when a task matches its description.

Can I use Shadow Account Trade Journal Analysis in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add HKUDS/Vibe-Trading --skill shadow-account -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/shadow-account, .gemini/skills/shadow-account, .github/skills/shadow-account and .opencode/skills/shadow-account in your project.

What does Shadow Account Trade Journal Analysis need to run?

SKILL.md names no scripts, command-line tools or credentials: Shadow Account Trade Journal Analysis is instructions for the agent only. Our summary lists: An uploaded trade journal (settlement statement); The `analyze_trade_journal` tool run beforehand; `weasyprint` for the PDF, otherwise the report is HTML only.

Does Shadow Account Trade Journal Analysis access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Shadow Account Trade Journal Analysis safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Shadow Account Trade Journal Analysis use?

Shadow Account Trade Journal Analysis is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Shadow Account Trade Journal Analysis use?

About 567 tokens (SKILL.md is roughly 2.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Shadow Account Trade Journal Analysis?

Skills that share tags, products or a category with Shadow Account Trade Journal Analysis: Strategy Performance Report (tradesdontlie/tradingview-mcp, 6.8k stars), Alpha Desk Investment Research (JingHao-Leon/dsh-alpha-desk, 181 stars), Quant Buddy Market Data and Backtesting (pseudo-longinus/quant-buddy-skills, 193 stars) and Marketscreener (gauss314/skills, 247 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Shadow Account Trade Journal Analysis?

HKUDS (a GitHub organization) maintains it in HKUDS/Vibe-Trading, which has 35,043 GitHub stars. The repository holds 89 skills in this directory. The repository was last updated on October 8, 2026.

Source: HKUDS/Vibe-Trading on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.