Claude Skill MartBrowse skillsQuick linesLearn by videoTerminal guideWhat is a Skill?
Back to list

A-Share Paper Trading & Backtesting

Spins up a local China A-share paper-trading service plus CLI so Claude can manage accounts, place orders, and run backtests.

Data & AnalyticsIntermediate22641AI score 9/10Last updated: Jun 24, 2026

What it does

  • Runs a self-contained paper-trading HTTP service on 127.0.0.1:18765, with a control script for start/status/stop and optional launchd autostart on macOS.
  • Full CLI: create/reset multiple accounts, add/deduct cash, limit and market buy/sell, cancel orders, inspect positions, orders and trades (JSON output preferred).
  • Realistic A-share matching rules: 100-share lots, T+1 sell restriction, price limits (10% main board, 20% ChiNext/STAR, 5% ST), market orders only during continuous auction, stale-quote protection, day orders expiring at close, commission minimums, stamp duty and Shanghai transfer fees.
  • backtest command for simple strategies (e.g. SMA cross) plus scheduled net-value snapshots.
  • Built-in agent policies: confirm initial capital (default ¥1,000,000), ask which account when several exist, and a fixed 3-step pre-trade check (routing → cash → positions/open orders).

Who it's for

  • Retail investors and quant beginners experimenting with China A-share strategies
  • Anyone who wants to validate order flow and exchange rules before risking real money
  • Claude Code users who prefer natural-language commands over manual CLI calls

Examples

  1. "Create account alpha with ¥500,000 and market-buy 100 shares of 600519."
  2. "Summarize alpha's positions and any open orders right now."
  3. "Backtest SMA cross on 600519 from 2025-01-01 with ¥200,000 of capital."

· · · Install guide · · ·

Try it now, no install

Paste this into Claude to use the skill without installing anything.

Read the instructions in this file and follow them to help me:
https://raw.githubusercontent.com/shouldnotappearcalm/a-share-skill/HEAD/a-share-paper-trading/SKILL.md

What I want: (describe your task here)

If Claude can't open the link, open it yourself and paste the contents instead.

If it works for you, download the ZIP below and install it. Then it runs on its own — no pasting each time.

Install in the Claude app (no terminal)
  1. Download the ZIP with the button below.
  2. In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
  3. Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Download ZIP
Install in Claude Code

Let Claude do it — paste this into Claude Code

Install the skill I found on Claude Skill Mart.
Copy the a-share-paper-trading folder from the GitHub repo shouldnotappearcalm/a-share-skill into my ~/.claude/skills/a-share-paper-trading/.
When it's done, tell me in one line what this skill can do.

Install with a command instead

git clone https://github.com/shouldnotappearcalm/a-share-skill.git && mkdir -p ~/.claude/skills && cp -r a-share-skill/a-share-paper-trading ~/.claude/skills/

This is a third-party skill. Check the source repository before installing.

  1. Make sure Python 3 and git are installed (python3 --version).
  2. Clone the repo: git clone https://github.com/shouldnotappearcalm/a-share-skill.git
  3. Copy the skill folder: mkdir -p ~/.claude/skills && cp -r a-share-skill/a-share-paper-trading ~/.claude/skills/
  4. Restart Claude Code and ask something like "use the A-share paper trading skill" to confirm it loads.
  5. Start the resident service: python3 ~/.claude/skills/a-share-paper-trading/scripts/paper_trading_ctl.py start (check with status).
  6. If port 18765 is already in use, don't launch a second instance — run lsof -iTCP:18765 -sTCP:LISTEN and reuse the running service.
  7. Before your first order, confirm the starting capital (default ¥1,000,000) and create the default account.