shadow-account

Derive rule-based shadow strategies from trade journals and generate differential attribution reports.

Updated May 5, 2026
One-click install
npx skills add https://github.com/wudye/traderAssistHK --skill shadow-account-wudye
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: shadow-account
Source: https://github.com/wudye/traderAssistHK/tree/main/backend/src/skills/shadow-account
Command: npx skills add https://github.com/wudye/traderAssistHK --skill shadow-account-wudye

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It helps you uncover why your trades made money (or lost money) by extracting your recurring winning “human” rules from a trade journal, then comparing a backtested shadow-account against your real results to pinpoint what truly contributed.

Core Features & Use Cases

  • Winning-pattern extraction: Distills 3–5 simple, plain-language rules from profitable roundtrips and validates rule coverage with the user.
  • Multi-market shadow backtest: Runs backtests across multiple markets (default: china_a, hk, us, crypto) and computes per-market and combined performance plus delta PnL.
  • Differential attribution & report: Produces an 8-section HTML and PDF report with a signed “difference attribution” breakdown (noise trades, early/late exits, overtrading, and residual), and highlights top counterfactual trades by impact.

Quick Start

Ask the assistant to “提炼我的盈利模式并出影子账户回测报告(含PDF)”,after uploading your trade journal and running analyze_trade_journal.

Frequently Asked Questions about shadow-account

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I extract winning rules from my trade journal for backtesting?

Trade journal backtesting compares a rule-based shadow strategy against your real results to pinpoint what truly contributed. It derives simple winning rules from profitable roundtrips and generates a differential attribution report explaining delta PnL.

Does shadow backtesting work across A-shares, HK, US, and crypto markets?

Yes, multi-market shadow backtesting works across A-shares, HK, US, and crypto markets. It computes per-market and combined performance plus delta PnL to help you understand which patterns drive performance across different asset classes.

How do I generate a PDF report for profit attribution and counterfactual analysis?

Generating a profit attribution PDF report involves producing an 8-section HTML document with a signed difference breakdown highlighting noise trades, early exits, and top counterfactual trades. The system includes a PDF fallback mechanism if initial generation fails.

Do I need a prior journal analysis result before running a counterfactual trade analysis?

Yes, you must run a prior journal analysis (analyze_trade_journal) before counterfactual trade analysis. The system enforces minimum profitable roundtrips to avoid fabricating rules and requires validated input data to proceed with shadow backtesting.

What is differential attribution in trade backtesting and how does it identify overtrading?

Differential attribution in trade backtesting breaks down delta PnL into signed categories like noise trades, early or late exits, overtrading, and residual. This difference attribution highlights top counterfactual trades by impact to identify behavioral performance leaks.