Agent skill

Earnings Forecast and Surprise Trading

by HKUDS in HKUDS/Vibe-Trading

Builds earnings forecasts and compares them with analyst consensus to find surprise trades, using top-down and bottom-up methods, SUE, post-announcement drift and revision momentum; Chinese text.

MITAuto-check passedBusiness, Finance & HR

SKILL.md written in Chinese; this summary is our English description.

Install Earnings Forecast and Surprise Trading

skills CLI
$ npx skills add HKUDS/Vibe-Trading --skill earnings-forecast -a claude-code

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

GitHub CLI
$ gh skill install HKUDS/Vibe-Trading earnings-forecast --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/HKUDS/Vibe-Trading.git skills-src && mkdir -p .claude/skills && cp -r skills-src/agent/src/skills/earnings-forecast .claude/skills/earnings-forecast && 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
earnings-forecast
GitHub stars
35k
Token cost
~1k tokens
SKILL.md length
144 words
Files
1
Skills in repo
89
Repo updated
First seen
Licence
MIT

At a glance

Builds earnings forecasts and compares them with analyst consensus to find surprise trades, using top-down and bottom-up methods, SUE, post-announcement drift and revision momentum; Chinese text.

  • Works in 5 steps: 自上而下预测法(Top-Down) → 自下而上预测法(Bottom-Up) → 标准化未预期盈利(SUE) → …
  • Comparing your EPS forecast with analyst consensus to find an expectations gap
  • SKILL.md covers 概述, 核心概念, 分析框架 and 输出格式, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Share prices in the short run are driven by the gap between earnings and expectations, so the skill looks for that gap in two ways: comparing your own forecast with consensus, and tracking momentum in analyst estimate revisions. Forecasting runs top-down, from GDP to industry to leading company revenue and margin assumptions to EPS, with a baijiu example, or bottom-up, splitting revenue into volume and price and checking margin and tax-rate assumptions. The instructions are written in Chinese.

Standardized unexpected earnings (SUE) compare actual EPS with consensus using the standard deviation of past forecast errors and map score bands to signals. Post-earnings-announcement drift is applied to A-shares, mostly on the long side, and a revision ratio with thresholds drives the revision momentum strategy. A calendar lists the key A-share reporting dates, and the notes say consensus data usually needs paid terminals and that SUE needs at least 8 quarters of history.

When your agent uses it

  • Comparing your EPS forecast with analyst consensus to find an expectations gap
  • Computing SUE after an earnings release
  • Planning a post-earnings drift trade around A-share reporting deadlines
  • Tracking analyst upgrades and downgrades as a momentum signal

Example prompts

  • “Compute SUE for this company's latest quarter against the median consensus EPS.”
  • “Build a bottom-up revenue forecast for a coal producer from volume and price.”
  • “Which A-share reporting deadlines matter for a post-earnings drift strategy?”
  • “Rank stocks by analyst revision ratio and flag the ones above the buy threshold.”

Requirements

  • Analyst consensus EPS data, which usually needs a paid terminal

Workflow steps

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

  1. 自上而下预测法(Top-Down)
  2. 自下而上预测法(Bottom-Up)
  3. 标准化未预期盈利(SUE)
  4. 盈余公告后漂移(PEAD)
  5. 分析师预期修正动量

What it can do on your machine

Read from SKILL.md and the folder at commit 8e43007. 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

    No scripts in the folder and no shell commands in SKILL.md (its code samples are 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

Earnings Forecast and Surprise Trading loads about 1k tokens when it runs. Until then it costs about 18 tokens; SKILL.md has 144 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~18
When it runs · the whole SKILL.md, loaded when a task matches
~1k

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); files beside SKILL.md are not scanned.

SKILL.md

The full file from HKUDS/Vibe-Trading at commit 8e43007, republished under its MIT licence (© HKUDS). 144 words, ~1,007 tokens.

Download SKILL.mdSave it as .claude/skills/earnings-forecast/SKILL.md (or your agent's skills folder).
name
earnings-forecast
description
盈利预测与一致预期分析(自上而下/自下而上预测法/SUE/PEAD/分析师预期修正),捕捉业绩超预期交易机会。
category
analysis

盈利预测与一致预期

概述

围绕企业盈利预测和市场一致预期偏差构建交易信号。核心逻辑:股价短期由盈利预期差驱动,捕捉「预期差」比预测绝对盈利更有价值。两条主线:① 自主预测 vs 一致预期对比寻找偏差;② 跟踪分析师预期修正动量。

核心概念

1. 自上而下预测法(Top-Down)

预测链条:

GDP增速预测 → 行业增加值增速 → 行业收入增速 → 龙头公司收入增速 → 利润率假设 → EPS预测

A股实战示例(以白酒行业为例):

层级指标预测逻辑
宏观GDP +5.0%消费占GDP比重65%,消费增速约+6%
行业白酒收入 +8%高端白酒量价齐升,结构升级
公司贵州茅台(600519.SH)出厂价+10%,销量+2%,收入约+12%
盈利净利润率55%提价传导,费用率稳定
EPS约62元净利润/总股本

适用场景: 行业beta判断、大盘盈利周期定位、宏观策略配合

2. 自下而上预测法(Bottom-Up)

收入拆解三板斧:

python
# 方法1:量价拆解
revenue = volume * price
# 例:中国神华(601088.SH) = 煤炭销量(亿吨) × 煤价(元/吨) + 电力收入

# 方法2:客户/产品拆解
revenue = sum(segment_revenue for segment in business_lines)
# 例:美的集团(000333.SZ) = 暖通空调 + 消费电器 + 机器人及自动化

# 方法3:门店/用户拆解
revenue = stores * revenue_per_store  # 或 users * ARPU
# 例:海底捞(6862.HK) = 门店数 × 翻台率 × 客单价 × 营业天数

利润率假设关键点:

  • 毛利率:原材料成本占比变动、产品结构升级
  • 费用率:规模效应(收入增、费用率降)、研发投入变动
  • 税率:高新技术企业15% vs 普通25%,是否有税收优惠到期
3. 标准化未预期盈利(SUE)

公式:

python
SUE = (actual_EPS - consensus_EPS) / std(actual_EPS - consensus_EPS)
# consensus_EPS = 分析师一致预期EPS(取中位数)
# std = 过去8个季度预测偏差的标准差

信号阈值(A股实证参考):

SUE范围含义交易动作
SUE > +2.0大幅超预期强买入信号
SUE +1.0~+2.0温和超预期买入信号
SUE -1.0~+1.0符合预期无信号
SUE -2.0~-1.0温和低于预期卖出信号
SUE < -2.0大幅低于预期强卖出信号
4. 盈余公告后漂移(PEAD)

现象: 业绩公告后,超预期方向的股价漂移可持续30-60个交易日。

A股PEAD策略实现:

python
# 策略逻辑
# 1. 业绩公告日(年报4/30前,中报8/31前,季报各截止日)
# 2. 计算SUE
# 3. SUE > +1.5 的股票买入持有 40 个交易日
# 4. SUE < -1.5 的股票卖出/做空(如果可以)

# 关键参数
holding_period = 40      # 持有交易日数
sue_threshold = 1.5      # SUE阈值
max_positions = 10       # 最大持仓数
rebalance_on = "earnings_date"  # 在业绩公告日调仓

A股PEAD注意事项:

  • A股做空受限(融券),PEAD策略通常只做多头
  • 业绩预告(1月底/7月中旬)比正式报告更早,抢先反应
  • 年报4/30截止,集中在4月发布,信息拥挤期需分散
5. 分析师预期修正动量

三个关键指标:

python
# 1. 预期修正比率(ERM)
ERM = (上调家数 - 下调家数) / 总覆盖家数
# ERM > 0.3 = 正面动量, ERM < -0.3 = 负面动量

# 2. 预期变化幅度
eps_change_pct = (new_consensus - old_consensus_30d_ago) / abs(old_consensus_30d_ago)
# 变化 > +5% = 显著上调

# 3. 预期离散度
dispersion = std(all_analyst_EPS) / mean(all_analyst_EPS)
# 离散度 > 0.3 = 分歧大, 不确定性高
# 离散度 < 0.1 = 共识强, 确定性高

预期修正动量策略:

  • 买入:ERM > +0.3 且 eps_change_pct > +5% 且 dispersion < 0.25
  • 卖出:ERM < -0.3 且 eps_change_pct < -5%
  • 信号有效期:约 60-90 个交易日(预期修正动量衰减)

分析框架

盈利分析四步法
  1. 构建预测:选择Top-Down或Bottom-Up方法,输出EPS预测值
  2. 获取一致预期:从Wind/东方财富/同花顺获取分析师一致预期EPS
  3. 计算偏差:SUE或简单百分比偏差,判断超预期/低于预期方向
  4. 信号生成:根据SUE阈值生成交易信号,结合PEAD持有期管理仓位
财报日历(A股关键时间节点)
时间事件策略动作
1月中旬年报业绩预告披露高峰抢先捕捉预期差
3-4月年报正式发布确认SUE,PEAD建仓
4月30日年报截止日未披露 = 利空信号
7月中旬中报业绩预告半年度预期修正
8月31日中报截止日同上
10月31日三季报截止日Q3数据验证全年预期
预期差交易组合构建
python
# 组合构建参数
config = {
    "universe": "沪深300成分股",          # 流动性保障
    "signal": "SUE > +1.5 或 ERM > +0.3", # 超预期信号
    "max_positions": 20,                  # 最大持仓
    "position_weight": "equal",           # 等权
    "holding_period": 40,                 # 交易日
    "rebalance": "earnings_calendar",     # 按财报日历调仓
    "stop_loss": -0.08,                   # 8%止损
}

输出格式

## 盈利预测分析 — [标的代码] [公司名称]

### 盈利预测
- 预测方法:[Top-Down / Bottom-Up]
- 预测EPS:[X元]
- 预测依据:[收入增速X%,利润率X%,关键假设]

### 一致预期对比
- 一致预期EPS:[X元](来源:[Wind/东财],覆盖[N]家)
- 预期偏差:[+X% / -X%]
- SUE:[+X.X]
- 预期离散度:[X.X]([高分歧/低分歧])

### 分析师动量
- ERM(预期修正比率):[+X.X](过去30日[N]家上调/[M]家下调)
- 预期变化幅度:[+X%]

### 信号判断
- SUE信号:[强买入/买入/无/卖出/强卖出]
- 动量信号:[正面/中性/负面]
- PEAD建仓窗口:[是/否](距财报发布[X]日)

### 风险提示
- [具体风险:如一次性收益、会计政策变更、商誉减值等]

注意事项

  • 一致预期数据需要Wind/Choice等付费终端,免费数据源(东方财富网页版)可能不够及时
  • SUE计算需要至少8个季度的历史预测偏差数据来估计标准差
  • 业绩预告和业绩快报是比正式财报更早的信号源,但精度较低
  • A股财报季信息拥挤(4月/8月),PEAD信号可能互相干扰
  • 一次性损益(资产处置/政府补贴/投资收益)会扭曲EPS,需剔除非经常性损益用扣非EPS
  • 预期修正动量有自我实现倾向(分析师羊群效应),拐点识别比趋势跟踪更有价值
  • 小市值股票分析师覆盖少(< 3家),一致预期统计意义弱,优先选择沪深300/中证500成分股
  • 本框架仅用于研究回测,不构成投资建议

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

Files

Just SKILL.md in agent/src/skills/earnings-forecast of HKUDS/Vibe-Trading.

Open the folder on GitHubat commit 8e43007

Compare with similar skills

Earnings Forecast and Surprise Trading 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.

Earnings Forecast and Surprise Trading compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Earnings Forecast and Surprise Trading this skillHKUDS/Vibe-Trading35k—~1kAutomated safety check: PassMIT
Stock Deep Analysis Workflowwbh604/UZI-Skill7.1k—~9.1kAutomated safety check: NotesMIT
Equity ResearchrollingSirius/equity-research-skill453—~1.5kAutomated safety check: PassMIT
Equity Initiation Reportginlix-ai/LangAlpha1.8k—~3.8kAutomated safety check: PassApache-2.0
Stock Value AnalyzerFunnyKun/stock-value-analyzer141—~3.3kAutomated safety check: PassNone
DCF Model Builderginlix-ai/LangAlpha1.8k—~7.7kAutomated safety check: PassApache-2.0

Similar skills

  • Runs a staged deep analysis of a single stock on China A-share, Hong Kong and US markets, ending in an HTML report with valuation models and investor-panel scores.

    7.1k GitHub stars~9.1k tokensUpdated 1 mo ago
    Business, Finance & HRAuto-check: notes
  • Equity Research

    rollingSirius/equity-research-skill

    撰写机构级个股投资研究报告(二级市场深度研究)。Use whenever the user wants to research, analyze, or value a specific publicly-traded stock — e.g.

    453 GitHub stars~1.5k tokensUpdated 1 mo ago
    Business, Finance & HRAuto-check passed
  • Equity Initiation Report

    ginlix-ai/LangAlpha

    Produces a first-time equity research initiation report in five tasks: company research, financial model, valuation, charts and a DOCX report.

    1.8k GitHub stars~3.8k tokensUpdated today
    Business, Finance & HRAuto-check passed
  • Stock Value Analyzer

    FunnyKun/stock-value-analyzer

    基于邱国鹭《投资中最简单的事》方法论的股票价值分析器(v2.0 双层架构)。通过"三好原则"(好行业、好公司、好价格)系统评估一只股票是否值得投资。v2.0 在原定性框架之上注入一套可量化、可复现的硬模型层——反向 DCF 反解市场隐含增速、情景概率加权估值、EPV 盈利能力价值、分行业估值路由、杜邦三/五因子分解、ROIC vs WACC、Piotroski F-Score、Beneish…

    141 GitHub stars~3.3k tokensUpdated 3 mo ago
    Business, Finance & HRAuto-check passed
  • DCF Model Builder

    ginlix-ai/LangAlpha

    Builds a live Excel DCF valuation workbook with free cash flow projections, WACC, terminal value, three scenarios, sensitivity grids and a reverse DCF.

    1.8k GitHub stars~7.7k tokensUpdated today
    Business, Finance & HRAuto-check passed
  • Initiating Coverage

    rongxinzy/RongxinAI

    Create institutional-quality equity research initiation reports through a 5-task workflow.

    154 GitHub starsUsed in 2 repos~7.4k tokens
    Business, Finance & HRAuto-check passed

More from HKUDS/Vibe-Trading

All 89 skills in this repo
  • Eastmoney Market Data

    HKUDS/Vibe-Trading

    Index of Eastmoney's free, no-token market data interfaces for China A-shares and Hong Kong stocks: fund flows, dragon-tiger lists, margin trading, reports and news.

    35k GitHub stars~1k tokensUpdated today
    Auto-check passed
  • OKX Market Data

    HKUDS/Vibe-Trading

    Retrieves public OKX cryptocurrency market data such as spot prices, candlesticks, funding rates and open interest through the OKX V5 REST API, with no authentication.

    35k GitHub stars~1.3k tokensUpdated today
    Auto-check passed
  • SEC EDGAR Filings Fetcher

    HKUDS/Vibe-Trading

    Fetches U.S. SEC EDGAR data: resolves tickers to CIK numbers, lists recent 10-K, 10-Q and 8-K filings with document URLs, and pulls XBRL financial series.

    35k GitHub stars~1.4k tokensUpdated today
    Auto-check passed
  • A-Share ST Risk Screener

    HKUDS/Vibe-Trading

    Predicts whether a mainland China A-share company risks an ST or *ST warning after its next annual report, using financial thresholds and Sina penalty records.

    35k GitHub stars~4.9k tokensUpdated today
    Auto-check passed
  • Breaks a structural trend such as AI infrastructure into its physical supply chain and ranks lesser-known listed companies sitting on each bottleneck.

    35k GitHub stars~2.7k tokensUpdated today
    Auto-check passed
  • Plans and drafts an eight-part, roughly 120k-word investigative series on one company, built around a strict fact-check pass rather than fast drafting.

    35k GitHub stars~2.4k tokensUpdated today
    Auto-check passed

Questions about Earnings Forecast and Surprise Trading

What does Earnings Forecast and Surprise Trading do?

Builds earnings forecasts and compares them with analyst consensus to find surprise trades, using top-down and bottom-up methods, SUE, post-announcement drift and revision momentum; Chinese text. Share prices in the short run are driven by the gap between earnings and expectations, so the skill looks for that gap in two ways: comparing your own forecast with consensus, and tracking momentum in analyst estimate revisions. Forecasting runs top-down, from GDP to industry to leading company revenue and margin assumptions to EPS, with a baijiu example, or bottom-up, splitting revenue into volume and price and checking margin and tax-rate assumptions.

When should I use Earnings Forecast and Surprise Trading?

Earnings Forecast and Surprise Trading fits situations like: comparing your EPS forecast with analyst consensus to find an expectations gap; computing SUE after an earnings release; planning a post-earnings drift trade around A-share reporting deadlines; tracking analyst upgrades and downgrades as a momentum signal.

How do I install Earnings Forecast and Surprise Trading in Claude Code?

Run `npx skills add HKUDS/Vibe-Trading --skill earnings-forecast -a claude-code`. Or copy the skill folder (agent/src/skills/earnings-forecast in HKUDS/Vibe-Trading) into .claude/skills/earnings-forecast in your project. Claude Code loads it when a task matches its description.

How do I install Earnings Forecast and Surprise Trading in Codex?

Run `npx skills add HKUDS/Vibe-Trading --skill earnings-forecast -a codex`. Or copy the skill folder (agent/src/skills/earnings-forecast in HKUDS/Vibe-Trading) into .agents/skills/earnings-forecast in your project. Codex loads it when a task matches its description.

Can I use Earnings Forecast and Surprise Trading 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 HKUDS/Vibe-Trading --skill earnings-forecast -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/earnings-forecast, .gemini/skills/earnings-forecast, .github/skills/earnings-forecast and .opencode/skills/earnings-forecast in your project.

What does Earnings Forecast and Surprise Trading need to run?

SKILL.md names no scripts, command-line tools or credentials: Earnings Forecast and Surprise Trading is instructions for the agent only. Our summary lists: Analyst consensus EPS data, which usually needs a paid terminal.

Does Earnings Forecast and Surprise Trading 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 Earnings Forecast and Surprise Trading 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. Review the folder before installing.

What licence does Earnings Forecast and Surprise Trading use?

Earnings Forecast and Surprise Trading is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Earnings Forecast and Surprise Trading use?

About 1k tokens (SKILL.md is roughly 4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Earnings Forecast and Surprise Trading?

Skills that share tags, products or a category with Earnings Forecast and Surprise Trading: Stock Deep Analysis Workflow (wbh604/UZI-Skill, 7.1k stars), Equity Research (rollingSirius/equity-research-skill, 453 stars), Equity Initiation Report (ginlix-ai/LangAlpha, 1.8k stars) and Stock Value Analyzer (FunnyKun/stock-value-analyzer, 141 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Earnings Forecast and Surprise Trading?

HKUDS (a GitHub organization) maintains it in HKUDS/Vibe-Trading, which has 35,163 GitHub stars. The repository holds 89 skills in this directory. The repository was last updated on October 10, 2026.

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