shadow-account

shadow-account is a skill for Claude Code, Codex from skloxo/TideTrading. It costs 70 tokens per session (1,137 once invoked), scanned A, a copy of shadow-account, MIT.

A trading-analysis workflow that turns your completed trade records into plain-language rules, tests those rules across Chinese, Hong Kong, US, and crypto markets, and produces a report. It also explains where the difference between your real results and the rule-based results came from.

In plain words
What is it for?
Use it to extract a personal trading strategy, compare it with your actual results through backtesting, identify sources of profit or loss, and create an HTML or PDF report.
Why use it?
It helps separate repeatable trading habits from emotional or inconsistent trades. You can see whether early exits, late exits, overtrading, or missed signals affected your results.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to extract a personal trading strategy, compare it with your actual results through backtesting, identify sources of profit or loss, and create an HTML or PDF report.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/skloxo/tidetrading/shadow-account
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add skloxo/TideTrading --skill shadow-account
Clone the repo
git clone --depth 1 https://github.com/skloxo/TideTrading

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for shadow-account

README.md
[![agentmods](https://agentmods.dev/badge/skills/skloxo/tidetrading/shadow-account/github.svg)](https://agentmods.dev/skills/skloxo/tidetrading/shadow-account)
Your own site
<a href="https://agentmods.dev/skills/skloxo/tidetrading/shadow-account"><img src="https://agentmods.dev/badge/skills/skloxo/tidetrading/shadow-account/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for shadow-account

Your own site · 80×15
<a href="https://agentmods.dev/skills/skloxo/tidetrading/shadow-account"><img src="https://agentmods.dev/badge/skills/skloxo/tidetrading/shadow-account.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 70 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,137 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00070 $0.01137
Opus 5 $0.00035 $0.00568
Sonnet 5 $0.00014 $0.00227
Haiku 4.5 $0.00007 $0.00114

Measured 7d ago against content hash 22635f9d11c9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

shadow-account scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

100% identical to shadow-account — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

agent/src/skills/shadow-account/SKILL.md · 80 lines

How it starts

The opening of the file, as written. The whole thing — 80 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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_idhuman_text(≤30 字)、support_countcoverage_rateholding_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,不编造

Read the full file on GitHub · 80 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 80 lines · 70 tokens per session scan A 22635f9d11c9

Subscribe to this mod's changes

shadow-account is a skill published in the GitHub repository skloxo/TideTrading (10 stars, last pushed 4d ago), licensed MIT. It adds 70 tokens to every session and 1,137 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to shadow-account, differing in 0 lines, and is treated as a copy.

Related

Other skills, from other repositories

daily-deep-brief

A scheduled, pre-market investment briefing for Hong Kong and United States stocks. A deterministic preparation step gathers data and an agent adds judgment, while a later step validates and publishes the result.

KCNyu/clawock · 163 tokens

hk-stock-analysis

A workspace-aware analysis workflow for Hong Kong-listed stocks. It retrieves prices, technical indicators, market comparisons, and news through a local data pipeline, then adds Hong Kong-specific investment context.

KCNyu/clawock · 126 tokens

us-stock-analysis

Workspace-aware US stock analysis for kcn. Routes through clawock analyze-us / clawock us-quotes instead of generic web search, then layers fundamental/technical/news analysis on top. Use when user asks to analyze a US ticker (e.g. "analyze AAPL", "look at RKLB", "compare TSLA vs NVDA"), check earnings, run…

KCNyu/clawock · 97 tokens

portfolio-swarm-review

Multi-agent swarm review of kcn's current holdings. Inspired by TauricResearch/TradingAgents framework already in workspace — three-tier analysis (analysts → bull/bear debate → risk debate + judge) with confidence scoring. Use for post-close reviews, holiday/next-session planning, pre-add sizing decisions, and any…

KCNyu/clawock · 90 tokens

invest-analyst

A framework for producing professional investment research, including company reports, industry studies, event analysis, analyst-expectation reviews, comparisons, and market summaries. It connects several investment research workflows into one process.

taxueseek/fund-investment-guide · 193 tokens

invest-fund

A Chinese-language guide for analysing investment funds, with different workflows for comparing funds, reviewing ETFs, examining new funds, and studying industry funds.

taxueseek/fund-investment-guide · 142 tokens