A share trend following

From aifinlab/FinClaw · View interactive version

A share trend following is an AI agent skill from the GitHub repository aifinlab/FinClaw. A股趋势跟踪策略/趋势强度分析。当用户说"趋势跟踪"、"trend following"、"趋势交易"、"顺势"、"趋势强度"、"ADX"、"均线策略"、"海龟策略"、"突破策略"时触发。基于 cn-stock-data 获取K线数据,构建趋势跟踪策略,分析趋势强度和方向。支持研报风格(formal)和快速分析风格(brief)。

How to use this skill

Skill file

A股趋势跟踪策略 (a-share-trend-following)

数据获取

通过 cn-stock-data skill 获取K线数据:

分析流程

Step 1: 获取K线数据

Step 2: 计算趋势指标

运行脚本:

python scripts/trend_follower.py --data kline.json --method all --fast 20 --slow 60

核心指标体系:

| 指标 | 用途 | 默认参数 |

|------|------|---------|

| SMA/EMA 交叉 | 趋势方向判定 | fast=20, slow=60 |

| ADX/DMI | 趋势强度量化 | period=14 |

| Donchian Channel | 突破信号 | period=20 |

| ATR Trailing Stop | 动态止损 | period=14, multiplier=2.0 |

Step 3: 趋势状态判定

根据指标综合判定当前趋势regime:

Step 4: 生成交易信号与回测

Step 5: 输出结果

A股特殊考量

输出风格

formal(研报风格)

## 趋势跟踪分析报告:{股票名称}({代码})
### 一、趋势状态总览
### 二、趋势指标详情
### 三、交易信号与策略
### 四、回测绩效
### 五、风险提示与操作建议

brief(快速分析风格)

{股票名称} 趋势跟踪速览
趋势状态: 强上升 | ADX={value}
当前信号: 持有/买入/卖出/观望
关键价位: 止损={x} 止盈={y}
近期绩效: 胜率={w}% Sharpe={s}

注意事项

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.