Agent skill

A Share Momentum Strategy

by aifinlab in aifinlab/FinClaw

A股动量策略/反转效应分析。当用户说"动量策略"、"momentum"、"反转"、"reversal"、"追涨"、"惯性效应"、"XX动量怎么样"、"动量因子"时触发。基于 cn-stock-data 获取K线数据,构建动量/反转策略,分析不同周期动量效应。支持研报风格(formal)和快速分析风格(brief)。

Apache-2.0Auto-check passed

Install A Share Momentum Strategy

skills CLI
$ npx skills add aifinlab/FinClaw --skill a-share-momentum-strategy -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install aifinlab/FinClaw a-share-momentum-strategy --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/aifinlab/FinClaw.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/a-share-momentum-strategy .claude/skills/a-share-momentum-strategy && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
a-share-momentum-strategy
GitHub stars
255
Token cost
~518 tokens
SKILL.md length
139 words
Files
3 (incl. scripts, references)
Skills in repo
74
Repo updated
First seen
Licence
Apache-2.0

At a glance

A股动量策略/反转效应分析。当用户说"动量策略"、"momentum"、"反转"、"reversal"、"追涨"、"惯性效应"、"XX动量怎么样"、"动量因子"时触发。基于 cn-stock-data 获取K线数据,构建动量/反转策略,分析不同周期动量效应。支持研报风格(formal)和快速分析风格(brief)。

  • Works in 6 steps: 多周期动量计算 → 构建多空组合 → A股特有模式分析 → …
  • SKILL.md covers 数据获取, 分析工作流, 输出格式 and 回测脚本
  • Runs Python scripts from its folder; calls python

What it does

A Share Momentum Strategy is an agent skill from aifinlab/FinClaw. A股动量策略/反转效应分析。当用户说"动量策略"、"momentum"、"反转"、"reversal"、"追涨"、"惯性效应"、"XX动量怎么样"、"动量因子"时触发。基于 cn-stock-data 获取K线数据,构建动量/反转策略,分析不同周期动量效应。支持研报风格(formal)和快速分析风格(brief)。

Its SKILL.md is about 520 tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including scripts and reference files (for example `references/momentum-guide.md` and `scripts/momentum_backtest.py`).

The licence is Apache-2.0.

Example prompts

  • “momentum”
  • “reversal”
  • “XX动量怎么样”
  • “/a-share-momentum-strategy”

Requirements

  • Python 3

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. 多周期动量计算
  2. 构建多空组合
  3. A股特有模式分析
  4. 行业动量 vs 个股动量
  5. 风险与崩溃分析
  6. 输出报告

What it can do on your machine

Read from SKILL.md and the folder at commit 9e62862. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

A Share Momentum Strategy loads about 518 tokens when it runs, and up to ~2.2k if it reads all its reference files. Until then it costs about 46 tokens; SKILL.md has 139 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~46
When it runs · the whole SKILL.md, loaded when a task matches
~518
With references · SKILL.md plus every file in references/, read only if the agent opens them
~2.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from aifinlab/FinClaw at commit 9e62862, republished under its Apache-2.0 licence (© aifinlab). 139 words, ~518 tokens.

Download SKILL.mdSave it as .claude/skills/a-share-momentum-strategy/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
a-share-momentum-strategy
description
A股动量策略/反转效应分析。当用户说"动量策略"、"momentum"、"反转"、"reversal"、"追涨"、"惯性效应"、"XX动量怎么样"、"动量因子"时触发。基于 cn-stock-data 获取K线数据,构建动量/反转策略,分析不同周期动量效应。支持研报风格(formal)和快速分析风格(brief)。

A股动量策略/反转效应分析助手

数据获取

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

  • K线数据: 日线(至少 18 个月历史),用于计算多周期动量
  • 实时行情: quote 接口获取最新价格、成交量、换手率
  • 行业分类: 申万一级行业,用于行业动量分析

分析工作流

Step 1: 多周期动量计算
  • 1M 动量 (20 交易日): 短期反转信号,A股 1-4 周普遍存在反转效应
  • 3M 动量 (60 交易日): 中短期过渡区间
  • 6M 动量 (120 交易日): 中期动量核心区间,A股动量效应最显著
  • 12M 动量 (250 交易日): 长期动量,需剔除最近 1 个月(skip-month)
  • 动量得分 = (当前价 - N日前价) / N日前价 * 100%
  • 计算时剔除 ST、停牌超 10 日、上市不足 1 年的股票
Step 2: 构建多空组合
  • 按动量得分排序,分为 5 组 (quintile)
  • Q1 = 最低动量(输家组),Q5 = 最高动量(赢家组)
  • 多头组合: Q5(做多赢家);空头组合: Q1(做多输家)
  • Long-Short = Q5 - Q1,衡量动量因子溢价
  • 计算各组合等权收益率、持有期收益
Step 3: A股特有模式分析
  • 短期反转 (1-4 周): A股散户占比高,过度反应后回归,反转效应显著
  • 中期动量 (3-12 月): 信息扩散慢 + 机构调仓惯性,动量效应存在但弱于美股
  • 长期反转 (12-36 月): 均值回归,长期输家跑赢赢家
  • 成交量交互: 高换手率股票动量衰减更快;低换手 + 高动量信号更持久
  • 涨跌停效应: 连板股的短期惯性 vs 打开涨停后的反转
Step 4: 行业动量 vs 个股动量
  • 行业动量: 按申万一级行业计算行业指数动量,行业轮动信号
  • 个股动量: 行业中性化后的残差动量 (residual momentum)
  • 残差动量 = 个股收益 - 行业平均收益,剥离行业 beta
  • 行业动量持续性通常强于个股动量
Step 5: 风险与崩溃分析
  • 动量崩溃 (momentum crash): 市场反转时动量组合大幅回撤
  • 牛熊转换期动量策略风险最大,需监控市场状态
  • 波动率调整: 高波动时降低动量仓位
  • 最大回撤、Sharpe ratio、Calmar ratio
Step 6: 输出报告

输出格式

formal 风格(研报级)
# [标的/市场] 动量策略分析报告

## 一、动量因子概览
| 周期 | 动量得分 | 分位数 | 信号 |
|------|---------|--------|------|
| 1M   | -3.2%   | P25    | 短期反转买入 |
| 6M   | +18.5%  | P82    | 中期动量持续 |

## 二、多空组合表现
[各 quintile 组合收益率表格,Long-Short 收益]

## 三、A股动量特征
[短期反转 vs 中期动量分析,成交量交互]

## 四、行业动量轮动
[行业动量排名,残差动量 Top/Bottom 10]

## 五、风险提示
[动量崩溃风险、当前市场状态评估]

## 六、策略建议
[具体操作建议、仓位管理]
brief 风格(快速分析)
## [标的] 动量速览
- 6M 动量 +18.5% (P82),中期趋势向上
- 1M 反转信号:超跌 -3.2%,短期存在反弹机会
- 行业动量排名:电子 #3/31
- 残差动量 +5.2%,个股 alpha 为正
- 风险:市场波动率偏高,建议半仓

回测脚本

使用 scripts/momentum_backtest.py 进行历史回测:

bash
python scripts/momentum_backtest.py --data kline.json --lookback 120 --holding 20

参考 references/momentum-guide.md 获取动量异象理论与 A股实证研究。

© aifinlab, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (scripts, references) in skills/a-share-momentum-strategy of aifinlab/FinClaw.

  • SKILL.md
  • references/momentum-guide.md
  • scripts/momentum_backtest.py

Open the folder on GitHubat commit 9e62862

Compare with similar skills

A Share Momentum Strategy next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

A Share Momentum Strategy compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
A Share Momentum Strategy this skillaifinlab/FinClaw255—~518Automated safety check: PassApache-2.0
ShareClickHouse/ClickHouse50k—~558Automated safety check: NotesApache-2.0
Protocol Reversezhaoxuya520/reverse-skill41k2 repos~620Automated safety check: WarnMIT
macOS Reversezhaoxuya520/reverse-skill41k2 repos~366Automated safety check: PassMIT
Protocol Reversesickn33/agentic-awesome-skills47k1 repos~689Automated safety check: PassMIT
macOS Reversesickn33/agentic-awesome-skills47k1 repos~466Automated safety check: PassMIT

Similar skills

  • Share

    ClickHouse/ClickHouse

    Share a Claude Code session to pastila.nl and return a viewer link.

    50k GitHub stars~558 tokensUpdated today
    DatabasesAuto-check: notes
  • Protocol Reverse

    zhaoxuya520/reverse-skill

    A skill your agent uses for authorized reverse engineering of custom binary protocols, Protobuf/gRPC, WebSocket frames, and PCAP-driven protocol recovery.

    41k GitHub starsUsed in 2 repos~620 tokens
    Backend & APIsAuto-check: warnings
  • macOS Reverse

    zhaoxuya520/reverse-skill

    A skill your agent uses for authorized macOS and Mach-O reverse engineering including codesign, Objective-C/Swift recovery, endpoint security surfaces, and Apple platform malware analysis.

    41k GitHub starsUsed in 2 repos~366 tokens
    SecurityAuto-check passed
  • Protocol Reverse

    sickn33/agentic-awesome-skills

    Authorized reverse engineering of custom binary protocols, Protobuf/gRPC schemas, WebSocket frames, and PCAP-driven protocol recovery.

    47k GitHub starsUsed in 1 repo~689 tokens
    Backend & APIsAuto-check passed
  • macOS Reverse

    sickn33/agentic-awesome-skills

    Authorized macOS and Mach-O reverse engineering: codesign inspection, Objective-C/Swift recovery, endpoint-security surfaces, and Apple-platform malware analysis.

    47k GitHub starsUsed in 1 repo~466 tokens
    SecurityAuto-check passed
  • JS Reverse

    sickn33/agentic-awesome-skills

    Front-end JavaScript reverse engineering: locate signature chains, analyze encrypted request parameters, sample runtime behavior, and reproduce logic locally in Node for evidence-based output.

    47k GitHub starsUsed in 1 repo~1.8k tokens
    SecurityAuto-check passed

More from aifinlab/FinClaw

All 74 skills in this repo
  • Bank Corporate Credit Dd

    aifinlab/FinClaw

    A skill your agent uses when the user asks for help with corporate credit due diligence, enterprise credit investigation, pre-loan review, borrower analysis, document collection, management…

    255 GitHub stars~952 tokensUpdated 5 mo ago
    Auto-check passed
  • A skill your agent uses when you need a bank corporate-risk monitoring assistant for enterprise litigation/penalty/enforcement scanning (处罚/诉讼/被执行/失信等).

    255 GitHub stars~751 tokensUpdated 5 mo ago
    Auto-check passed
  • A skill your agent uses when you need a bank corporate client operating-volatility monitoring assistant (经营监测/指标波动/预警解释).

    255 GitHub stars~605 tokensUpdated 5 mo ago
    Auto-check passed
  • A skill your agent uses when you need a bank post-loan visit follow-up assistant to turn visit notes/materials into a structured memo (摘要/关键更新/风险观察/用途核验/行动项).

    255 GitHub stars~544 tokensUpdated 5 mo ago
    Auto-check passed
  • A skill your agent uses when you need a bank corporate credit issue-list assistant (问题清单/补件清单/催办台账).

    255 GitHub stars~487 tokensUpdated 5 mo ago
    Auto-check passed
  • A skill your agent uses when you need a bank corporate credit approval-opinion drafting assistant (审批意见/条款建议/有条件同意).

    255 GitHub stars~549 tokensUpdated 5 mo ago
    Auto-check passed

Questions about A Share Momentum Strategy

What does A Share Momentum Strategy do?

A股动量策略/反转效应分析。当用户说"动量策略"、"momentum"、"反转"、"reversal"、"追涨"、"惯性效应"、"XX动量怎么样"、"动量因子"时触发。基于 cn-stock-data 获取K线数据,构建动量/反转策略,分析不同周期动量效应。支持研报风格(formal)和快速分析风格(brief)。. A Share Momentum Strategy is an agent skill from aifinlab/FinClaw.

How do I install A Share Momentum Strategy in Claude Code?

Run `npx skills add aifinlab/FinClaw --skill a-share-momentum-strategy -a claude-code`. Or copy the skill folder (skills/a-share-momentum-strategy in aifinlab/FinClaw) into .claude/skills/a-share-momentum-strategy in your project. Claude Code loads it when a task matches its description.

How do I install A Share Momentum Strategy in Codex?

Run `npx skills add aifinlab/FinClaw --skill a-share-momentum-strategy -a codex`. Or copy the skill folder (skills/a-share-momentum-strategy in aifinlab/FinClaw) into .agents/skills/a-share-momentum-strategy in your project. Codex loads it when a task matches its description.

Can I use A Share Momentum Strategy in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add aifinlab/FinClaw --skill a-share-momentum-strategy -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/a-share-momentum-strategy, .gemini/skills/a-share-momentum-strategy, .github/skills/a-share-momentum-strategy and .opencode/skills/a-share-momentum-strategy in your project.

What does A Share Momentum Strategy need to run?

Going by SKILL.md and its folder, A Share Momentum Strategy needs Python for the scripts in its folder and the command-line tools its instructions call (python). Our summary lists: Python 3.

Does A Share Momentum Strategy access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is A Share Momentum Strategy safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does A Share Momentum Strategy use?

A Share Momentum Strategy is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does A Share Momentum Strategy use?

About 518 tokens (SKILL.md is roughly 2.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.7k tokens, read only when the agent opens those files.

What are the alternatives to A Share Momentum Strategy?

Skills that share tags, products or a category with A Share Momentum Strategy: Share (ClickHouse/ClickHouse, 50k stars), Protocol Reverse (zhaoxuya520/reverse-skill, 41k stars), macOS Reverse (zhaoxuya520/reverse-skill, 41k stars) and Protocol Reverse (sickn33/agentic-awesome-skills, 47k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains A Share Momentum Strategy?

aifinlab (a GitHub user) maintains it in aifinlab/FinClaw, which has 255 GitHub stars. The repository holds 74 skills in this directory. The repository was last updated on May 13, 2026.

Source: aifinlab/FinClaw on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.