Backtest and execute Chinese-market strategies under the rules a Western engine gets wrong. TRIGGER - T+1 settlement, 涨跌停 price limits, 印花税 stamp duty, 夜盘 night session, 集合竞价, the lunch break, 240 minute bars; vnpy, CTP, QMT, miniQMT, easytrader, tqsdk, 天勤, RQAlpha, wondertrader, 掘金; Microsoft Qlib's China dataset; backtesting or live-trading A-shares, Chinese futures, options or convertible bonds; porting a US strategy to China. SKIP for sourcing the data itself (china-ashare-data).
Ships in fin-china. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
A backtest engine written for US equities is wrong on A-shares by default — it will let you sell what you bought this morning, fill you at limit-up, and trade through a suspension. §3 is the list of rules your engine must encode.
Data sourcing is a separate skill: china-ashare-data.
| Task | Use | Note |
|---|---|---|
| Live trading, broadest gateway coverage | vnpy 4.4.0 (MIT, 45,089★, pushed 2026-09-01) | The de-facto standard. Ships no data of its own |
| Futures research + live, incl. 夜盘 | tqsdk 3.10.2 (Apache-2.0, 4,991★, only 4 open issues) | Best-maintained here. Free tier covers all futures + options |
| Quant research pipeline / factor ML | Qlib pyqlib 0.9.7 (MIT, 48,253★) | 🚨 official China dataset is disabled — see §2 |
| Event-driven A-share backtest | RQAlpha 6.3.0 | 🚨 custom licence: non-commercial only; sdist-only, no Windows wheel |
| C++-core multi-asset | wondertrader / wtpy (MIT) | wtpy slowing (last push 2025-08) |
| Retail broker automation | easytrader 0.23.7 (MIT, 10,124★) | Slowing; GUI-automation fragility |
| HK/US via a Chinese broker | futu-api, tigeropen | Vendor-maintained. ⚠️ futu-api is sdist-only but pure Python, so it installs fine on Windows; it does require the separate FutuOpenD daemon |
Qlib's README states verbatim: "Due to more restrict data security policy. The official dataset is
disabled temporarily." The documented qlib_data --region cn command still appears in the README
but the backing dataset is down.
✅ The live replacement is community-run: chenditc/investment_data — 1,440★, Apache-2.0, latest
release tag 2026-09-03 published the same day (it updates daily), asset qlib_bin.tar.gz
at 563.8 MB. It merges Tushare + akshare + baostock + Yahoo + historical Wind/Caihui dumps,
cross-validates them, rescales adjustment factors to a common basis, and explicitly backfills
"delist company's data" → delisted names are included, which the official bundle never handled well.
wget https://github.com/chenditc/investment_data/releases/latest/download/qlib_bin.tar.gz
mkdir -p ~/.qlib/qlib_data/cn_data
tar -zxvf qlib_bin.tar.gz -C ~/.qlib/qlib_data/cn_data --strip-components=1
⚠️ Qlib's cn_data stores a $factor field and adjusted prices — know which convention a dump
uses before mixing it with any other source. Qlib's own check_data_health script exists precisely because
these dumps have gaps. Qlib itself provides no PIT fundamentals; instruments/csi300.txt encodes
membership date ranges whose quality is entirely inherited from the dump you installed.
Encode all of these, or your A-share backtest is fiction.
300xxx/301xxx ±20%, 科创板 688xxx ±20%, 北交所 ±30%; new listings differ again on day 1.
A bar closing at limit-up generally could not have been bought — filling there is the second
largest source of fake alpha in A-share research.volume=0 with a
forward-filled price, or emit NaN. Forward-filled bars create spurious zero returns that
deflate measured volatility.resample('1min') or any wall-clock rolling window silently spans 90 minutes of
non-existent time. Roll over bar index, not wall-clock.china-ashare-data §2.vnpy is a framework, not a data source — every datafeed adapter wraps a third-party, mostly paid service. ✅ Verified on PyPI:
| Adapter | Provider | Cost | Latest |
|---|---|---|---|
vnpy_xt | 迅投研 | Paid | 1.4.6 (2025-10-18) |
vnpy_rqdata | 米筐 | Paid | 3.4.7.8 (2026-04-16) |
vnpy_tushare | Tushare | 积分 | 1.4.21.0 (2025-06-11) |
vnpy_tqsdk | 天勤 | Paid | 3.8.6.0 (2025-10-02) |
vnpy_wind / vnpy_ifind | 万得 / 同花顺 | Paid | 1.1.0 (2025-06-11) |
vnpy_udata / vnpy_tinysoft | 恒生 / 天软 | Paid | ⚠️ 2023 — stale |
✅ vnpy_datayes (通联) does NOT exist on PyPI — if a doc lists it, that is wrong.
Config is uniform: SETTINGS["datafeed.name"/"username"/"password"]. ⚠️ For RQData these are not
your ricequant.com website login.
🔑 vnpy_datarecorder records live tick/bar from a connected trading gateway into a local DB —
so with a broker CTP account you can build your own tick history for free, bypassing vendor fees.
The most under-appreciated capability in this ecosystem.
Everything in broker-execution-apis §3 applies, plus:
references/<framework>.md for architecture, licence, gateway coverage and setup;
references/_ashare-rules.md for the machine-checkable version of §3.
The optional fin-libraries plugin carries a dedicated skill for each library below. Load one
only after this skill has told you which library you want:
lib-qlib — qlibreferences/_ashare-rules.md (opens in a new tab)references/qlib.md (opens in a new tab)references/vnpy.md (opens in a new tab)scripts/ashare_rules.py (opens in a new tab)scripts/board_lot_guard.py (opens in a new tab)scripts/cash_yield_optimizer.py (opens in a new tab)scripts/core_satellite_advisor.py (opens in a new tab)scripts/data_cleaning_filter.py (opens in a new tab)scripts/portfolio_manager.py (opens in a new tab)scripts/qdii_premium_guard.py (opens in a new tab)scripts/qdii_smart_router.py (opens in a new tab)scripts/sentiment_flow_collector.py (opens in a new tab)scripts/stock_predictability_stratifier.py (opens in a new tab)scripts/volatility_regime_shield.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
4 skills in this plugin
/china-ashare-dataGet China A-share and Greater China market data without the ecosystem's silent traps. TRIGGER - A股, 沪深, 北交所, 科创板, 创业板; akshare, tushare, baostock, efinance, adata, qstock, mootdx, easyquotation, jqdatasdk, 聚宽, rqdatac, 米筐, Wind, 万得, Choice, 东方财富; 复权, qfq, hfq, 前复权, 后复权; ST, 退市, delisted A-share tickers, 退市股票列表; 停牌 suspension; 公告日 versus 报告期; CSI300, HS300, 中证 index membership. Three popular libraries default to forward-adjusted prices, which are rewritten retroactively and are therefore look-ahead contaminated. SKIP for backtesting or trading A-shares (china-trading-stack) and for Hong Kong, Taiwan, Japan or Korea (asia-pacific-markets)./kol-credibility-registry[fin-china] Score and calibrate financial KOL credibility across Xueqiu and StockTwits using Bayesian win-rate updating, Brier scores, and contrarian inversion./signal-reconciler[fin-china] Inspect a heuristic conflict resolver for supplied policy, flow, valuation, news, and sentiment scores. Check market scope, evidence dates, and rule assumptions before using its proposed portfolio tilt./fin-china:china-trading-stackfrom fin-china
npx claudepluginhub howard-lynn-ye/fin-rsi --plugin fin-china