A股交易信号回测/策略验证
SkillCommerce & financeFind out whether a trading signal for China A-share stocks actually works before you rely on it. Once added, your AI can test a signal against historical market data and show how it would have performed in the past. Results can be delivered in a formal or a brief style.
Available today. Use it from your connected AI after setup.
No other account needed.
After adding it, just ask your AI in plain words, for example 'signal backtest' or 'is this signal accurate', and it will run the test.
Then ask your AI: use the A股交易信号回测/策略验证 skill
What your AI can do with it
- Backtest a trading signal's historical performance on A-share stocks
- Check whether a signal has been accurate in the past
- Validate a trading strategy against historical market data
- Get results in a formal or a brief style
What this skill tells your AI
The instructions your AI receives, as published by aifinlab/finclaw in skills/a-share-signal-backtest/SKILL.md and read by ahel’s review.
数据源
SCRIPTS="$SKILLS_ROOT/cn-stock-data/scripts"
python "$SCRIPTS/cn_stock_data.py" kline --code [CODE] --freq daily --start [日期]
python "$SCRIPTS/cn_stock_data.py" quote --code [CODE]
python "$SCRIPTS/cn_stock_data.py" finance --code [CODE]
Workflow
Step 1: 定义交易信号
明确入场/出场条件
Step 2: 获取历史K线
Step 3: 生成信号序列
标记每个交易日的信号(买入/卖出/持有)
Step 4: 回测绩效
- 胜率、盈亏比、最大回撤
- 年化收益率、夏普比率
- 信号频率、平均持有期
Step 5: 输出
| 维度 | formal | brief |
|---|---|---|
| 绩效 | 完整回测报告 | 胜率+夏普 |
| 交易明细 | 每笔交易记录 | 统计摘要 |
| 稳健性 | 分年度/参数敏感性 | 是否稳健 |
| 默认风格:brief。 |
关键规则
- 回测不代表未来——过拟合是最大风险
- 样本外验证至关重要——至少留20%数据
- 考虑交易成本(A股约0.15%单边)和滑点
- T+1限制需在回测中体现——当日信号次日执行
- 参数敏感性分析:参数微调后收益不应剧变
使用示例
示例 1: 基本使用
# 调用 skill
result = run_skill({
"param1": "value1",
"param2": "value2"
})
示例 2: 命令行使用
python scripts/run_skill.py --input data.json
Signals
- GitHub stars
- 241
- Forks
- 38
- Last commit
- May 2026
Advanced
- Catalog kind
- skill
- Gateway key
a-share-signal-backtest- Source
- github.com/aifinlab/finclaw