Skip to content
earnings-attribution logo

Earnings Attribution Analysis

earnings-attribution

Analyzes why stocks moved after 8-K earnings filings. Use ultrathink for all analyses. Invoke when asked to analyze stock movements, earnings reactions, or determine the primary driver of price changes.

SKILL.md

Full skill instructions

Earnings Attribution Analysis

Goal: Determine WHY a stock moved after an 8-K filing by calculating the SURPRISE (actual vs expected).

Thinking: ALWAYS use ultrathink for maximum reasoning depth.

End Goal: Build company-specific driver understanding for real-time prediction accuracy.


Core Principles

  1. Comprehensiveness Over Speed: Query ALL relevant data sources
  2. Evidence-Based Claims Only: Every claim must cite a source
  3. Surprise-Focused: Stock moves on actual vs expectations, not absolute results
  4. Learn from History: Each analysis builds company-specific knowledge
  5. Self-Audit: Validate all claims have sources before completing

Confidence Levels

  • High: Multiple sources agree, clear fundamental reason, unambiguous evidence
  • Medium: Sources partially agree, conclusion fits with caveats
  • Insufficient: Sources conflict, missing critical data, no clear driver

If evidence is insufficient, say so. Never fabricate certainty.


Resources


Workflow (10 Steps)

Use TodoWrite to track progress. Mark each step in_progress before starting, completed immediately after.

StepActionNotes
1Data InventoryMap what data exists (REQUIRED FIRST)
2Get Report + ReturnsMove magnitude and context
3Get ConsensusAlways query Perplexity for expectations
4Query Neo4jNews, Transcript, XBRL history, Dividends, Splits
5Query PerplexityFill gaps (use deep_research for complex cases)
6SynthesizeCalculate surprises, identify primary driver
7Output ReportSave to drivers/​Movers/​Companies/​{TICKER}/​{accession}.md
8Self-AuditRun evidence_audit.md and validate Evidence Ledger + sources
9Propose Skill UpdatesFollow update-skills.md
10Mark CompletedUpdate tracking CSV (completed=TRUE)

Rules: Step 1 always first. Steps 2-5 case-by-case sequencing. Steps 6-10 sequential.


Step 1: Data Inventory

Query what data exists before making claims. See neo4j_schema.md for full query.

Check for: News count, Transcript exists, XBRL reports count, Dividends, Splits.


Step 2: Get Report and Returns

Get filing details and price reaction. See neo4j_schema.md for query.

Returns to capture:

  • Macro-adjusted (vs SPY) - primary
  • Sector-adjusted - context (may be null)
  • Industry-adjusted - context (may be null)

Step 3: Get Consensus Estimates

Always query Perplexity - do not rely on Neo4j News for consensus.

mcp__perplexity__perplexity_search:
  query: "{ticker} Q{quarter} FY{year} EPS revenue estimate consensus before {date}"

Source preference for Evidence Ledger:

  1. Best: Perplexity pre-filing search (explicit consensus before event)
  2. Acceptable: News headline citing estimate (note: post-filing, weaker provenance)
  3. Unacceptable: Unsourced or inferred values

If using News as consensus source, cite it accurately in Evidence Ledger—do not claim Perplexity in Data Sources Used.


Step 4: Query Neo4j Sources

Query based on Data Inventory results. See neo4j_schema.md for all queries.

4A: News

  • Start ±2 trading days; expand to ±5 if <3 items
  • Filter: WHERE r.daily_stock IS NOT NULL (data quality)
  • Extract: EPS vs estimate, guidance, analyst reactions

4B: Transcript (Item 2.02 only)

  • Get Prepared Remarks + Q&A exchanges
  • Look for: analyst concerns, management hedging, specific numbers

4C: Historical XBRL

  • Last 4 quarters of 10-K/​10-Q data
  • Look for: EPS trend, revenue trend, margin changes

4D: Dividends

  • Cuts = bearish, Raises = bullish, Special = one-time

4E: Splits

  • Rarely explain fundamental reactions

Step 5: Query Perplexity

Use when Neo4j doesn't provide complete picture.

SituationTool
Quick facts, specific datamcp__perplexity__perplexity_search
Complex multi-factor analysismcp__perplexity__perplexity_reason
Conflicting sources, major moves (>10%)mcp__perplexity__perplexity_research

Query Principles:

  • Be specific about time (exact date, not "recently")
  • Include company name AND ticker
  • For consensus: specify fiscal quarter AND year
  • For "why stock moved": include date AND direction

Step 6: Synthesize

Calculate SURPRISE for each metric using these exact formulas:

Surprise Calculation Formulas

EPS Surprise % = ((Actual - Consensus) / |Consensus|) × 100
Revenue Surprise % = ((Actual - Consensus) / |Consensus|) × 100

Guidance Surprise:

  1. Calculate midpoint of guidance range: (Low + High) / 2
  2. Compare to consensus: ((Midpoint - Consensus) / |Consensus|) × 100
  3. If range width changed significantly, note this separately

Rounding: All percentages to 2 decimal places.

Example Calculation

Actual EPS: $2.03
Consensus EPS: $1.98
Surprise = (($2.03 - $1.98) / |$1.98|) × 100 = +2.53%

Guidance Range: $12.00 - $13.50
Midpoint: $12.75
Consensus: $13.22
Surprise = (($12.75 - $13.22) / |$13.22|) × 100 = -3.56%

Surprise Analysis Table

MetricConsensusActualSurprise %
EPS$1.98$2.03+2.53%
Revenue$2.1B$2.15B+2.38%
FY Guidance$13.22$12.75 (midpoint)-3.56%

Rank surprises by absolute magnitude. Largest surprise typically explains the move.

Attribution Structure

Primary Driver (High Confidence)

  • What: [Descriptive name]
  • Surprise: Expected $X, Got $Y (Z% surprise)
  • Evidence: [Source citation]

Contributing Factor(s) (if applicable)

  • What: [Name]
  • Evidence: [Source]

Evidence Extraction

Capture evidence immediately when reading each source. Populate the Evidence Ledger in output_template.md as you go; every numeric claim must appear there.

Strict Rules for Numbers (Used in Surprise Calculations)

Any number used to calculate surprise MUST have:

  1. Exact value (not rounded or paraphrased)
  2. Explicit source with timestamp/​date
  3. Format: {metric}: ${exact_value} (Source: {source_name}, {date})

Examples:

Consensus EPS: $1.98 (Source: Perplexity, pre-filing)
Actual EPS: $2.03 (Source: 8-K EX-99.1, 2023-11-02)
Guidance midpoint: $12.75 (Source: 8-K EX-99.1, calculated from $12.00-$13.50)

If you cannot cite exact value + source, do NOT use the number in surprise calculations.

Flexible Rules for Qualitative Evidence

For non-numeric observations, paraphrasing is acceptable with source:

Management tone: Cautious on near-term demand (Source: Transcript Q&A #3)
Analyst concern: Margin pressure (Source: News "ROK Beats but Guides Lower")

Sources: News: "{headline}", Transcript Q&A #N, Transcript Prepared Remarks, Exhibit EX-99.1, Perplexity search, XBRL: {report_id}


Output

See output_template.md for full report format.

Save to: drivers/​Movers/​Companies/​{TICKER}/​{accession_no}.md

Required sections:

  1. Report Metadata
  2. Returns Summary
  3. Evidence Ledger
  4. Executive Summary
  5. Surprise Analysis
  6. Attribution (Primary + Contributing)
  7. Data Sources Used
  8. Confidence Assessment
  9. Historical Context

Core Rules

  1. Data Inventory First: Know what data exists before making claims
  2. Surprise-Based: Stock moves on actual vs expected
  3. Evidence Required: Every claim needs a cited source
  4. Perplexity for Consensus: Always query for market expectations
  5. Self-Audit: Validate all claims have sources
  6. Learn and Record: Store company-specific learnings
  7. Honest Confidence: State "Insufficient" when evidence doesn't support
  8. No XBRL for 8-K: Use historical 10-K/​10-Q XBRL for trends

Perplexity Tools

ToolUse For
mcp__perplexity__perplexity_searchQuick facts, consensus, simple questions
mcp__perplexity__perplexity_askConversational Q&A with real-time web search
mcp__perplexity__perplexity_reasonMulti-factor analysis, complex reasoning
mcp__perplexity__perplexity_researchComprehensive investigation, conflicting sources

Conflict Resolution Guidelines

When sources conflict, use these principles (guidelines, not rigid rules):

Source Reliability Hierarchy

PrioritySource TypeExamples
1 (Highest)Primary filing8-K, EX-99.1 press release
2TranscriptEarnings call Q&A, prepared remarks
3Official newsCompany PR, SEC filing summary
4Analyst coverageResearch notes, rating changes
5 (Lowest)General newsHeadlines, aggregated coverage

Driver Priority (Typical, Not Absolute)

  • Forward-looking (guidance) usually > Backward-looking (EPS)
  • BUT: If EPS miss is >10%, it can dominate
  • AND: Validate against actual price reaction direction

Conflict Handling

If News says "beat" but Transcript reveals "guidance cut":
→ Trust Transcript (higher reliability)
→ Note the conflict in analysis

If two News sources give different consensus numbers:
→ Use the one with explicit source attribution
→ If neither has clear attribution, note both values and the discrepancy
→ Do NOT average (averages have no direct source)

Rule: When in doubt, note the conflict explicitly rather than silently choosing one.


Data Quality Guardrails

News Anomaly Filter (REQUIRED)

~1,746 News→Company relationships (~0.9%) have daily_industry but no daily_stock. Always filter:

WHERE r.daily_stock IS NOT NULL

Missing Returns Handling

If a report has no return data (pf.daily_stock IS NULL):

  • Flag as incomplete data
  • Do NOT use for driver sensitivity calculations
  • Can still analyze qualitatively

Duplicate News Detection

If multiple news items have nearly identical titles (>80% similarity):

  • Use the earliest timestamp
  • Treat as single data point, not confirmation

Stale Consensus Warning

When Perplexity returns consensus estimates:

  • Verify the date/​quarter matches your target
  • "Q3 2023 consensus" is wrong if you need Q4 2023
  • Re-query with more specific date if unclear

Company-Specific Learning

After each analysis, update: drivers/​Movers/​Companies/​{TICKER}/​learnings.md

See output_template.md for learnings format.

Gating rule: Only update learnings.md after the Evidence Ledger is complete and evidence_audit.md passes.


Step 10: Mark Completed

After successful analysis (report saved, audit passed, learnings updated):

  1. Update tracking CSV: Set completed=TRUE for this accession_no in drivers/​Movers/​8k_fact_universe.csv
  2. Verify: Confirm the row is updated correctly

This ensures the analysis pipeline tracks which filings have been processed.


More skills from majiayu000

xiaohongshu logo
majiayu000/claude-arsenal

xiaohongshu

xiaohongshu

286 148
View
agent-task-conductor logo
majiayu000/claude-skill-registry

agent-task-conductor

Conduct multi-agent task orchestration and workflow coordination.

663 1
View
conductor-setup logo
majiayu000/claude-skill-registry

conductor-setup

Initialize project with Conductor artifacts (product definition,

663 1
View
animation-designer logo
majiayu000/claude-skill-registry

animation-designer

Expert in web animations, transitions, and motion design using Framer Motion and CSS

663 1
View
diagramming logo
majiayu000/claude-skill-registry

diagramming

Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...

663 1
View
h3-pg logo
majiayu000/claude-skill-registry-data

h3-pg

PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.

23 1
View
conductor-development logo
majiayu000/claude-skill-registry

conductor-development

Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...

663 1
View
conductor-status logo
majiayu000/claude-skill-registry

conductor-status

Display project status, active tracks, and next actions

663 1
View
dockerization logo
majiayu000/claude-skill-registry

dockerization

Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.

663 1
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View