跳到正文
cccskills
免费在 GitHub 公开

shadow-account

Extract three to five plain-language trading rules from profitable trades, then test them across Chinese A-shares, Hong Kong stocks, US stocks, and crypto. Produce a report comparing simulated and actual results, with a breakdown of differences.

中文简介正在准备中。当前显示英语简介。

原文查看原文说明

Shadow Account — 从用户交割单提炼盈利模式(3-5 条人话规则)→ 跨 A股/港股/美股/crypto 多市场回测 → 差值归因 → 8-section PDF 报告。叙事:你的影子,没有情绪噪音。

实测评分 未实测

查看安装方法

适用场景

  • Extract shared patterns from profitable trades
  • Test personal trading rules across four markets
  • Break down differences between simulated and actual results
  • Create HTML and PDF reports of trading reviews

包含的文件(1)

  • SKILL.md3.7 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

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,不编造

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Compare a Chinese company's US depositary receipts, Hong Kong shares, and mainland shares after adjusting for exchange rates and share ratios. Analyze pricing gaps, valuation differences, and delisting risks to support research into its different listings.

中文简介正在准备中。当前显示英语简介。

  • Compare A-share and H-share pricing gaps
  • Measure ADR premiums against Hong Kong shares
  • Review US delisting risks and Hong Kong listing alternatives
HKUDS/Vibe-Trading3.6万2026年10月23日 更新

akshare

免费

Retrieve stock prices, futures quotes, exchange rates, and economic indicators with the free Python library AKShare. The skill explains market-specific functions, symbol formats, and data preparation for analysis and testing strategies against historical data.

中文简介正在准备中。当前显示英语简介。

  • Retrieve historical prices for Chinese, US, and Hong Kong stocks
  • Collect Chinese GDP and consumer price data
  • Check futures quotes and foreign exchange rates
HKUDS/Vibe-Trading3.6万2026年10月23日 更新

alpha-zoo

免费

Explore bundled libraries of investment factors, signals used to compare securities, and inspect individual formulas and metadata. Evaluate a factor or an entire library across a chosen universe and period, producing aggregate performance statistics and an HTML report.

中文简介正在准备中。当前显示英语简介。

  • Find bundled momentum or reversal factors
  • Inspect a named factor's formula and metadata
  • Compare a factor library across a chosen universe and period
HKUDS/Vibe-Trading3.6万2026年10月23日 更新

Assess whether a Chinese A-share company may receive ST or *ST risk warnings next financial year. Review financial forecasts, dividends, audit opinions, and regulatory penalties, then report risk severity separately from confidence in the prediction.

中文简介正在准备中。当前显示英语简介。

  • Reviewing a Chinese A-share company's future ST risk
  • Assessing escalation risk for an existing ST or *ST stock
  • Checking revenue, equity, and dividend warning signs
HKUDS/Vibe-Trading3.6万2026年10月23日 更新

Plan portfolio allocations across assets using risk, correlations, return forecasts, and trading costs. Compare five optimization methods, produce settings for config.json, and define rebalancing rules that adjust holdings back toward their target weights.

中文简介正在准备中。当前显示英语简介。

  • Comparing allocations across stocks, bonds, and gold
  • Choosing an optimizer based on return forecasts and correlations
  • Preparing portfolio settings for config.json
HKUDS/Vibe-Trading3.6万2026年10月23日 更新

Diagnose failed or abnormal backtests, which test trading strategies on historical data. Inspect result files, strategy code, and configuration to identify bugs, make targeted repairs, rerun tests, and verify the updated metrics.

中文简介正在准备中。当前显示英语简介。

  • Investigating backtest execution errors
  • Finding why a strategy produces no trades
  • Checking delayed trades or low capital usage
HKUDS/Vibe-Trading3.6万2026年10月23日 更新

查看 HKUDS 的全部技能

报告此技能的问题