Skip to content

Guide · Agent skill

How to use the Earnings Forecast & Consensus Gap agent skill

Updated · written with AI from the project's own documentation and checked against our catalogue data

The earnings-forecast skill teaches an AI agent a structured way to analyse a company's earnings. It has the agent build its own profit forecast, compare that forecast with analyst consensus, calculate a standardised earnings surprise score (SUE), and track how analysts are revising their estimates, all using Chinese A-share reporting conventions. This guide explains what the skill does, how to install it, how to ask for it in plain language, and what you need before relying on its output.

Earnings Forecast & Consensus GapHKUDS/Vibe-Trading · MIT

Quick start

  1. 1Download the ZIP. Download the skill ZIP from this page. It contains the SKILL.md file for earnings-forecast.
  2. 2Unzip into a skill folder. Unzip the archive into ~/.claude/skills/ for personal use, or into .claude/skills/ inside a project for project-only use.
  3. 3Or upload it in the Claude apps. In the Claude apps, go to Settings → Capabilities → Skills and upload the ZIP.
  4. 4Gather your data. Collect consensus EPS from a source such as Wind or Choice, and at least eight quarters of forecast-error history for the stock.
  5. 5Ask in plain language. Request a forecast, consensus comparison or SUE check for a named stock, such as 600519.SH, and state which output you want.
  6. 6Verify the output. Check the agent's figures against your own data and treat the signal as research input, not advice.

What does the earnings-forecast skill make the agent do?

An agent skill is a folder containing a SKILL.md file with instructions that Claude follows when a task matches the skill's description. This one covers earnings forecasting and consensus analysis. Its core idea is that short-term share price moves are driven by the gap between expected and actual earnings, so the gap matters more than the absolute profit forecast.

The skill describes two main lines of work: comparing the agent's own forecast with market consensus to find a gap, and tracking the momentum of analyst estimate revisions.

  • Top-down forecast: GDP growth, then industry value-added growth, industry revenue, leading company revenue, margin assumptions, and finally EPS.
  • Bottom-up forecast: revenue built from volume times price, from business segments, or from stores or users, then margin assumptions for gross margin, expense ratio and tax rate.
  • SUE (standardised unexpected earnings): actual EPS minus consensus EPS, divided by the standard deviation of past forecast errors, mapped to signal bands.
  • PEAD (post-earnings announcement drift): a description of how prices tend to keep drifting in the direction of an earnings surprise for a period, with an example strategy.
  • Analyst revision momentum: an estimate revision ratio (ERM), the percentage change in consensus over 30 days, and forecast dispersion.

How do you install the earnings-forecast skill?

Download the ZIP file from this page. Unzip it so that the earnings-forecast folder, which contains SKILL.md, sits in one of the skill locations below. Claude then loads it the next time a matching task comes up.

You can also install it through the Claude apps by uploading the ZIP under Settings → Capabilities → Skills.

  • Personal install: place the folder in ~/.claude/skills/ so it is available across your projects.
  • Project install: place the folder in the .claude/skills/ directory of a specific project so it applies only there.
  • Claude apps: upload the ZIP under Settings → Capabilities → Skills.

How do you trigger the skill with natural requests?

You do not need a special command. Describe the task in plain language and mention earnings, consensus, EPS surprise or analyst revisions. The skill's description covers top-down and bottom-up forecasting, SUE, PEAD and analyst estimate revisions, so requests on those topics are the most likely to load it.

Name the stock by its code where you can, for example 600519.SH, and say whether you want a forecast, a comparison with consensus, or a signal check.

  • Build a bottom-up EPS forecast for 600519.SH from volume and price assumptions, then compare it with consensus.
  • Calculate the SUE for this company's latest quarter using the eight most recent forecast errors.
  • Summarise analyst upgrades and downgrades over the last 30 days and give me the ERM.
  • Check whether this stock would pass the PEAD entry rule of SUE above 1.5.
  • Write the earnings forecast report for 000333.SZ using the standard template.

What does a finished report look like?

The skill sets out a fixed report template, so reports on different companies can be compared side by side. The template has four blocks: the agent's EPS forecast and its basis, the consensus comparison with SUE and dispersion, analyst momentum, and a signal judgement with a risk note. The template is a layout, so the numbers in it still depend on the data you supply.

  • Forecast: method used, forecast EPS, and the key assumptions behind it.
  • Consensus comparison: consensus EPS, its source and analyst count, percentage deviation, SUE and dispersion.
  • Momentum: ERM with the count of upward and downward revisions, and the percentage change in estimates.
  • Signal judgement: SUE signal, momentum signal, and whether the PEAD entry window is open.
  • Risk notes: items such as one-off gains, accounting policy changes or goodwill impairment.
## 盈利预测分析 — [标的代码] [公司名称]

How are SUE, PEAD and revision momentum calculated?

The skill gives formulas in Python-style pseudocode. They are examples of the method rather than a runnable script, so you will need to write the code yourself, supplying your own data. The SUE formula divides the earnings surprise by the standard deviation of past forecast errors. The skill's illustrative thresholds are SUE above +2.0 for a strong buy signal, +1.0 to +2.0 for a buy signal, -1.0 to +1.0 for no signal, -2.0 to -1.0 for a sell signal, and below -2.0 for a strong sell signal.

For the PEAD example, the skill suggests holding stocks with SUE above +1.5 for 40 trading days, using a maximum of 10 positions and rebalancing on the earnings date. It notes that A-share short selling is restricted, so the strategy is usually long-only.

  • SUE = (actual EPS − consensus EPS) / standard deviation of past forecast errors. Consensus is the median analyst EPS.
  • ERM = (number of upward revisions − number of downward revisions) / total analysts covering the stock. Above +0.3 is positive momentum; below −0.3 is negative.
  • Estimate change = (new consensus − consensus 30 days ago) / absolute value of the older consensus. A change above +5% is a significant upgrade.
  • Dispersion = standard deviation of analyst EPS / mean analyst EPS. Above 0.3 means high disagreement; below 0.1 means strong consensus.
SUE = (actual_EPS - consensus_EPS) / std(actual_EPS - consensus_EPS)

What do you need before you run it?

The skill's requirements are demanding. Timely consensus EPS figures usually come from paid data terminals such as Wind or Choice. The skill notes that free sources, such as the free web version of Eastmoney, may be too slow or incomplete. You also need at least eight quarters of historical forecast-error data to estimate the standard deviation used in SUE. Python is needed to run the formulas, because the file contains formula examples rather than a runnable script.

The skill is designed for Chinese A-shares. Its reporting calendar, short-selling rules and index universes (for example CSI 300 constituents) are specific to that market. Small-cap stocks with fewer than three analysts give weak consensus statistics, so the skill recommends CSI 300 or CSI 500 constituents instead.

  • Consensus EPS from a paid source such as Wind or Choice.
  • At least 8 quarters of historical forecast-error data.
  • Python to run the formulas you adapt from the file.
  • A-share data. The skill is not written for other markets.

What safety notes should you know?

According to the skill's own description, it runs no scripts and makes no network requests. It is text instructions that shape the agent's analysis, so any data the agent uses must come from you or from sources you connect yourself. Check every figure against your own data before using it.

The skill is explicitly framed for research and backtesting, and it is not investment advice. Its signal thresholds are illustrative, not validated trading rules. The skill also warns that earnings-related signals can crowd together during reporting seasons, and that momentum signals can be self-reinforcing because of herding among analysts.

  • No scripts are run and no network use is stated, so review the SKILL.md before installing if your policy requires it.
  • The thresholds (SUE bands, ERM 0.3, 40-day holds, 8% stop loss) are examples from the file, not recommendations.
  • Recognise that one-off items such as asset disposals, government subsidies or investment income can distort EPS. Use deducted (non-recurring-adjusted) EPS where the skill advises.
  • Do not use the output for real buy or sell decisions without independent verification.

What people use it for

  • Testing whether a post-earnings drift strategy on CSI 300 constituents would have picked stocks with high SUE values.
  • Comparing your own EPS forecast for an A-share company with the median analyst consensus in a consistent format.
  • Tracking whether analysts are raising or cutting estimates for a stock over the past 30 days using ERM and the change in consensus.
  • Learning how earnings surprise and analyst revision signals are built, using the formulas and report template in the file.

Frequently asked questions

How do I install the earnings-forecast skill?

Download the ZIP from this page and unzip it so the earnings-forecast folder sits in ~/.claude/skills/ or in a project's .claude/skills/ directory. In the Claude apps, you can instead upload the ZIP under Settings → Capabilities → Skills.

Is the earnings-forecast skill free to use?

The skill is published under the MIT licence. However, the data it needs is not free in practice: the skill says timely consensus figures usually come from paid terminals such as Wind or Choice, and free sources may be too slow or incomplete.

What do I need to run the earnings forecast skill?

You need consensus EPS data, ideally from Wind or Choice, at least eight quarters of historical forecast-error data to estimate the SUE standard deviation, and Python to run the formula examples. The skill is written for Chinese A-shares.

Why does the agent say my stock has too few analysts for a reliable consensus?

The skill warns that small-cap stocks with fewer than three analysts give weak consensus statistics. It recommends choosing CSI 300 or CSI 500 constituents for more reliable results.

Does the skill run code or access the internet?

The skill file lists that it runs no scripts and uses no network. It contains formula examples rather than a runnable program, so any calculations you run must be written and executed by you.

Can I use this skill to decide which stocks to buy or sell?

The skill says it is for research and backtesting and is not investment advice. Its thresholds are illustrative, so verify any signal independently before acting on it.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

This skill suits quantitative researchers, analysts and students who want a consistent template and clear formulas for SUE, PEAD and analyst revision momentum on Chinese A-shares, and who have access to paid consensus data. It is a poor fit for anyone who needs timely free data, non-A-share markets, thinly covered small caps, or ready-made trading decisions.

Download the skill