A股止损策略/风控规则量化

SkillDev tools

Once added, your AI can design stop-loss and take-profit strategies for A-shares (the Chinese stock market) using quantitative rules instead of guesswork. Ask it where to set a stop, whether to cut a losing position, or how to manage risk on a holding, and it will work out a concrete answer. It can reply as a formal analysis or a short summary.

Available today. Use it from your connected AI after setup.

After adding it, ask your AI a question like 'where should I set my stop-loss?' or 'should I cut my losses?' and it will respond with a quantified strategy. Mention if you want the formal version or the brief one.

Then ask your AI: use the A股止损策略/风控规则量化 skill

What your AI can do with it

  • Design stop-loss and take-profit strategies for A-shares with quantitative rules
  • Recommend where to set a stop-loss level on a position
  • Help you decide whether to cut a losing position or hold on
  • Turn vague risk-control questions into concrete rules
  • Answer in a formal write-up or a brief summary, whichever you ask for

What this skill tells your AI

The instructions your AI receives, as published by aifinlab/finclaw in skills/a-share-stop-loss/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: 止损方法计算

  • 固定比例止损:从买入价下跌 N% 止损
  • ATR止损:买入价 - N × ATR(14)
  • 移动止损:从最高价回撤 N% 止损
  • 支撑位止损:跌破关键技术支撑位

Step 3: 历史回测

回测各止损方法在该股上的历史表现(避免的亏损 vs 误杀的盈利)

Step 4: 最优止损参数

根据标的波动特征选择最优止损幅度

Step 5: 输出

维度formalbrief
止损方案多方法对比建议止损位
回测结果各方法胜率+收益推荐方法
止盈建议止盈策略目标价位
默认风格:brief。

关键规则

  1. 止损是风控底线——没有止损的交易不是投资
  2. 止损幅度应匹配标的波动率——高波动股需更宽止损
  3. A 股 T+1 下无法当日止损——需更谨慎的仓位管理
  4. 止损位不应频繁修改——避免情绪化调整
  5. 好的止损策略是在减少大亏和避免误杀之间的平衡

使用示例

示例 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-stop-loss
Source
github.com/aifinlab/finclaw