a-share-paper-trading
A股模拟盘交易与回测技能。Use when 用户要启动模拟仓服务、创建多账户、下限价单/市价单、撤单、查询持仓资金、验证涨跌停成交逻辑或运行A股回测。
Skill by shouldnotappearcalm
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/shouldnotappearcalm-a-share-paper-trading
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: research, finance
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
- Runs as
- Python package
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/a-share-paper-trading
What's inside
- Skill name
a-share-paper-trading- Description
- A股模拟盘交易与回测技能。Use when 用户要启动模拟仓服务、创建多账户、下限价单/市价单、撤单、查询持仓资金、验证涨跌停成交逻辑或运行A股回测。
- License
- MIT
- Instructions
- 205 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
Files (15)
- README.md
- SKILL.md
- backtest_batch_validation.py · scripts/
- full_function_smoke_check.py · scripts/
- paper_trade_cli.py · scripts/
- __init__.py · scripts/paper_trading/
- engine.py · scripts/paper_trading/
- market_data.py · scripts/paper_trading/
- service.py · scripts/paper_trading/
- paper_trading_ctl.py · scripts/
- paper_trading_runtime.py · scripts/
- paper_trading_service.py · scripts/
- real_stock_rule_validation.py · scripts/
- rule_regression_check.py · scripts/
- test_market_data_intraday_snapshot.py · scripts/
SKILL.md (first lines)
# A股模拟盘
独立的模拟盘 skill。交易服务、CLI、账户、撮合与行情适配都在本目录内,不依赖其他 skill 脚本。
## 何时使用
- 启动或检查模拟盘服务
- 创建/重置账户
- 限价买卖、市价买卖、撤单
- 查询账户、持仓、订单、成交
- 验证涨跌停、T+1、收盘过期
- 跑简单回测
## 启动
```bash
SKILL_DIR="<本skill绝对路径>"
python3 "$SKILL_DIR/scripts/paper_trading_service.py" --host 127.0.0.1 --port 18765
```
默认监听 `http://127.0.0.1:18765`,默认数据库不再落在 skill 目录,而是落到用户级数据目录:
- macOS: `~/Library/Application Support/a-share-paper-trading/paper_trading.db`
- Linux: `${XDG_DATA_HOME:-~/.local/share}/a-share-paper-trading/paper_trading.db`
若本机该端口**已有**模拟盘进程在跑,**不要**再启动第二个实例:会报 `Address already in use`,且多进程可能争用同一 SQLite 库文件。启动前可先检查端口是否在监听,例如:
```bash
lsof -iTCP:18765 -sTCP:LISTEN
```
或向 `http://127.0.0.1:18765/accounts` 发 `GET`(CLI 默认 `--base-url` 与此一致)。已有服务时直接用 `paper_trade_cli.py` 即可。
更推荐使用控制脚本常驻运行:
```bash
python3 "$SKILL_DIR/scripts/paper_trading_ctl.py" start
python3 "$SKILL_DIR/scripts/paper_trading_ctl.py" status
python3 "$SKILL_DIR/scripts/paper_trading_ctl.py" stop
```
在 macOS 上,如需持续自启动,可安装 launchd:
```bash
python3 "$SKILL_DIR/scripts/paper_trading_ctl.py" install-launchd
```
服务会:
- 交易时段定时撮合挂单
- 非交易时段停止撮合
- 收盘后让当日未成单过期
- 定时写账户净值快照
可用启动参数:
- `--host`
- `--port`
- `--db-path`
- `--match-interval`
- `--valuation-interval`
- `--idle-valuation-interval`
默认端口与 CLI 基址已改为 `18765`,避免和常见本地开发服务冲突。
## CLI
```bash
python3 "$SKILL_DIR/scripts/paper_trade_cli.py" create-account alpha --cash 500000
python3 "$SKILL_DIR/scripts/paper_trade_cli.py" list-accounts
python3 "$SKILL_DIR/scripts/paper_trade_cli.py" show-default-account
python3 "$SKILL_DIR/scripts/paper_trade_cli.py" set-default-account alpha
python3 "$SKILL_DIR/scripts/paper_trade_cli.py" reset-account alpha --cash 300000
python3 "$SKILL_DIR/scripts/paper_trade_cli.py" add-cash alpha 50000 --note 入金
python3 "$SKILL_DIR/scripts/paper_trade_cli.py" deduct-cash alpha 10000 --note 出金
python3 "$SKILL_DIR/scripts/paper_trade_cli.py" buy alpha 600519 100 --market
python3 "$SKILL_DIR/scripts/paper_trade_cli.py" sell alpha 600519 100 --price 1450
python3 "$SKILL_DIR/scripts/paper_trade_cli.py" orders alpha
python3 "$SKILL_DIR/scripts/paper_trade_cli.py" positions alpha
python3 "$SKILL_DIR/scripts/paper_trade_cli.py" show-account alpha
python3 "$SKILL_DIR/scripts/paper_trade_cli.py" trades alpha
python3 "$SKILL_DIR/scripts/paper_trade_cli.py" cancel <order_id>
python3 "$SKILL_DIR/scripts/paper_trade_cli.py" process-orders
python3 "$SKILL_DIR/scripts/paper_trade_cli.py" run-snapshots
python3 "$SKILL_DIR/scripts/paper_trade_cli.py" backtest 600519 --strategy sma_cross --start 2025-01-01 --end 2026-03-31 --cash 200000
```
支持的 CLI 子命令:
- `create-account`
- `show-default-account`
- `set-default-account`
- `reset-account`
- `list-accounts`
- `show-account`
- `positions`
- `orders`
- `trades`
- `buy`
- `sell`
- `cancel`
- `add-cash`
- `deduct-cash`
- `process-orders`
- `run-snapshots`
- `backtest`
## Agent 执行规则(账户路由)
- 首次创建模拟账户前,必须先向用户确认初始资金金额。
- 若系统存在多个账户且用户未指明账户,先反问“本次操作哪个账户”再继续。
- 若仅有一个账户且该账户已存在,默认直接使用该账户。
- 若存在默认账户(`show-default-account` 可查),且用户未指定账户,优先使用默认账户。
- 需要切换默认账户时,使用 `set-default-account`。
### 首次初始化资金规则(默认 100w)
- 当用户首次要进行交易但尚未初始化账户资金时,先反问确认,不直接执行。
- 默认建议初始资金为 `1000000`(100w),提问模板建议为:
- “当前未初始化模拟账户,默认按 100w 启动,是否确认?如需修改请直接给出金额。”From shouldnotappearcalm/a-share-skill, MIT.
More from shouldnotappearcalm/a-share-skill
- 0.800score
a-share-strategy-allmarket-multi-swing-defensive
shouldnotappearcalm
A 股全市场高流动性池内按趋势回踩(trend_pullback)产出买入候选与持仓卖出信号;另有 realtime_quotes 批量拉取现价快照。供下单前决策;不跑回测、不自动下单。Use when 用户要选股、看实时报价、判断买卖信号或检查持仓是否触发离场条件。
SkillAFreshness: A★ 253Claude Code +9 - 0.800score
a-share-strategy-mainboard-multi-swing-defensive
shouldnotappearcalm
A 股主板流动性池内按趋势回踩(trend_pullback)产出买入候选与持仓卖出信号;另有 realtime_quotes 批量拉取现价快照。供下单前决策;不跑回测、不自动下单。Use when 用户要选股、看实时报价、判断买卖信号或检查持仓是否触发离场条件。
SkillAFreshness: A★ 253Claude Code +9 - 0.793score
a-share-data
shouldnotappearcalm
查询A股行情、历史K线与复权、财务指标、公司新闻公告、概念及入选依据、行业分类与成分、解禁、回购、股东增减持、涨停炸板详情、龙虎榜席位、板块热力图、指数、宏观及A+H上市信息。用于股票数据查询、原始数据测试和数据源异常排查。
SkillAFreshness: A★ 253Claude Code +9 - 0.685score
tuige-shortline-trading
shouldnotappearcalm
基于退哥短线交易规则的A股场景化决策技能。Use when 用户要按交易场景查看短线规则、做选股、判断趋势回踩、涨停回调、连板接力、洗盘结束、卖出失效或仓位纪律。
SkillCFreshness: C★ 253Claude Code +9 - 0.534score
macd-trend-resonance-stock-picker
shouldnotappearcalm
基于“均线定方向,MACD定节奏”的A股选股与交易计划技能。Use when 用户要求把均线与MACD结合做选股、筛票、盘前候选池、趋势跟随、回踩再上、金叉确认、顶背离减仓、或希望把技术判断沉淀成可执行规则与风控模板。
SkillDFreshness: D★ 253Claude Code +9 - 0.532score
macd-second-golden-cross
shouldnotappearcalm
A股“MACD底背离 + 零轴下二次金叉”实战分析与交易执行技能。用于把用户的盘感描述转成可执行的三档决策(上观察名单/可试错出手/必须放弃)、盘中检查单、入场与风控规则。适用于用户提到“二次金叉”“水下二次金叉”“底背离”“第一脚第二脚”“回踩验底”“MACD背离”“抄底修复”“想做但怕假信号”等场景。
SkillDFreshness: D★ 253Claude Code +9
Compare and alternatives
Featured in
Signals
- Stars
- 253
- Forks
- 48
- Open issues
- 0
- Last commit (this folder)
- Jun 17, 2026 (4 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Same skill elsewhere
Copies of this SKILL.md published by others; search shows only one of them.
More from shouldnotappearcalm
- 0.800score
a-share-strategy-allmarket-multi-swing-defensive
shouldnotappearcalm
A 股全市场高流动性池内按趋势回踩(trend_pullback)产出买入候选与持仓卖出信号;另有 realtime_quotes 批量拉取现价快照。供下单前决策;不跑回测、不自动下单。Use when 用户要选股、看实时报价、判断买卖信号或检查持仓是否触发离场条件。
SkillAFreshness: A★ 253Claude Code +9 - 0.800score
a-share-strategy-mainboard-multi-swing-defensive
shouldnotappearcalm
A 股主板流动性池内按趋势回踩(trend_pullback)产出买入候选与持仓卖出信号;另有 realtime_quotes 批量拉取现价快照。供下单前决策;不跑回测、不自动下单。Use when 用户要选股、看实时报价、判断买卖信号或检查持仓是否触发离场条件。
SkillAFreshness: A★ 253Claude Code +9 - 0.793score
a-share-data
shouldnotappearcalm
查询A股行情、历史K线与复权、财务指标、公司新闻公告、概念及入选依据、行业分类与成分、解禁、回购、股东增减持、涨停炸板详情、龙虎榜席位、板块热力图、指数、宏观及A+H上市信息。用于股票数据查询、原始数据测试和数据源异常排查。
SkillAFreshness: A★ 253Claude Code +9 - 0.685score
tuige-shortline-trading
shouldnotappearcalm
基于退哥短线交易规则的A股场景化决策技能。Use when 用户要按交易场景查看短线规则、做选股、判断趋势回踩、涨停回调、连板接力、洗盘结束、卖出失效或仓位纪律。
SkillCFreshness: C★ 253Claude Code +9 - 0.534score
macd-trend-resonance-stock-picker
shouldnotappearcalm
基于“均线定方向,MACD定节奏”的A股选股与交易计划技能。Use when 用户要求把均线与MACD结合做选股、筛票、盘前候选池、趋势跟随、回踩再上、金叉确认、顶背离减仓、或希望把技术判断沉淀成可执行规则与风控模板。
SkillDFreshness: D★ 253Claude Code +9 - 0.532score
macd-second-golden-cross
shouldnotappearcalm
A股“MACD底背离 + 零轴下二次金叉”实战分析与交易执行技能。用于把用户的盘感描述转成可执行的三档决策(上观察名单/可试错出手/必须放弃)、盘中检查单、入场与风控规则。适用于用户提到“二次金叉”“水下二次金叉”“底背离”“第一脚第二脚”“回踩验底”“MACD背离”“抄底修复”“想做但怕假信号”等场景。
SkillDFreshness: D★ 253Claude Code +9
Cite this page
a-share-paper-trading skill. Agent Mart. https://agentmart.dev/skills/shouldnotappearcalm-a-share-paper-trading (last updated 2026-10-24)