Earnings Trade Analyzer looks at companies that reported earnings in a recent window and scores each reaction with a five-factor system: gap size, pre-earnings trend, volume trend, position against the 200-day average and position against the 50-day average. Each stock gets a 0 to 100 score and an A to D grade.
A Python script pulls the data from the Financial Modeling Prep (FMP) API and writes a JSON file and a Markdown table. The output describes how past earnings reactions scored. It is not investment advice.
What You Get
- A JSON report with schema version 1.0 and a Markdown report, both timestamped, listing scored candidates
- A composite score from 0 to 100 and an A, B, C or D grade for each stock
- A breakdown of the five components, with the strongest and weakest named for each stock
- Counts of rows with unknown reporting timing, so the gap assumption stays visible
Common Use Cases
- Ranking the past few days of earnings reactions by a fixed scoring method
- Comparing gap size, volume and trend position across many reporters in one table
- Re-running a past date with an as-of setting to reproduce a report
What Makes It Unique
The scoring is computed by scripts with fixed weights and grade bands, so the same inputs give the same grades. The skill documents what to do when the earnings calendar comes back empty on a trading day: it exits with a named reason code and labels any fallback result as preliminary and ungraded. It also uses an exchange calendar to tell a quiet weekend from a data outage.
Under The Hood
The agent runs a Python script that calls the FMP API over HTTPS with your FMP_API_KEY (environment variable or argument) and counts its calls against a budget. It uses a market-calendar package to check trading sessions. The script writes JSON and Markdown reports into the output directory. The fallback path in SKILL.md has the agent run a curl command against the FMP earnings endpoint and per-symbol quote calls. Scoring rules live in a reference file the agent reads.