# Stock Earnings Intelligence (`khnaami/stock-earnings-intelligence`) Actor

Serverless Apify Actor & REST API for Stock Earnings Intelligence, Options Implied Moves (ATM Straddle), Historical Gap-Fill Rates, Post-Earnings Price Drift, and Valuation Multiples across US Equities (Mag 7 by default).

- **URL**: https://apify.com/khnaami/stock-earnings-intelligence.md
- **Developed by:** [khalid naami](https://apify.com/khnaami) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Stock Earnings Intelligence & Options Volatility Analytics Actor 📊

Analyze **stock earnings dates**, **options expected moves (ATM Straddle)**, **historical gap-fill probabilities**, **5-day post-earnings price drift**, **analyst price targets**, and **AI market biases** across US equities.

Pre-configured by default with the **Magnificent Seven (NVDA, AAPL, MSFT, AMZN, GOOGL, META, TSLA)**, and fully customizable for any US stock ticker.

***

### 🌟 Key Capabilities

- **Options Expected Move Calculation**: Computes the exact market-implied move (`+/- %` and `$`) using front-month At-The-Money (ATM) Straddle options pricing (`(Call Ask + Put Ask) / Current Price`).
- **Volatility Skew & Term Structure**: Analyzes Put vs Call IV skew (5% OTM) and front-month vs back-month IV to anticipate post-earnings volatility crush.
- **Historical Gap-Fill & Drift Analytics (Last 8 Quarters)**:
  - **Gap-Fill Probability (%)**: Percentage of historical quarters where price returned to pre-earnings close within 5 trading days.
  - **Post-Earnings Drift Bias**: Average 5-day price trajectory after market open reaction (`Bullish Drift` vs `Bearish Drift`).
  - **Relative Price Pathways**: Day-by-day normalized price trajectories from Day -1 to Day +5.
- **Analyst Targets & Consensus**:
  - Consensus recommendations (Strong Buy, Buy, Hold, Sell).
  - Target Price Mean, High, Low, and implied upside/downside percentages.
  - Historical EPS surprise percentages (Beat vs Miss history).
- **Magnificent Seven Benchmark Matrix**: Side-by-side valuation comparison (`P/E`, `Forward P/E`, `PEG`, `P/S`, `EV/EBITDA`).
- **AI Agent & MCP Ready**: Generates an executive summary with next earnings date countdown, implied moves, and win-rate biases ready for LLMs, Claude, ChatGPT, and LangChain.

***

### 📥 Input Configuration

| Parameter | Type | Default | Description |
| :--- | :--- | :--- | :--- |
| `symbols` | `Array<string>` | `["NVDA", "AAPL", "MSFT", "AMZN", "GOOGL", "META", "TSLA"]` | List of US stock tickers to analyze. |
| `includePeerComparison` | `Boolean` | `true` | Include Mag 7 side-by-side valuation benchmark table. |
| `quartersBack` | `Integer` | `8` | Number of previous earnings quarters to evaluate. |

#### Example Input (`input.json`):

```json
{
  "symbols": ["NVDA", "AAPL", "TSLA", "AMD", "PLTR"],
  "includePeerComparison": true,
  "quartersBack": 8
}
```

***

### 📤 Output Dataset Format

Each dataset item provides deep quantitative and qualitative earnings intelligence:

```json
{
  "symbol": "NVDA",
  "companyName": "NVIDIA Corporation",
  "sector": "Technology",
  "industry": "Semiconductors",
  "currentPrice": 128.50,
  "nextEarningsDate": "2026-11-18",
  "daysUntilEarnings": 52,
  "aiInsights": {
    "nextEarningsDate": "2026-11-18",
    "daysUntilEarnings": 52,
    "optionsImpliedMove": "+/-7.85%",
    "gapFillProbability": "75.0%",
    "historicalBeatRate": "100.0%",
    "postEarningsBias": "Bullish Drift",
    "executiveSummary": "NVDA (NVIDIA Corporation) next earnings release is scheduled for 2026-11-18 (52 days away). Options market prices an expected move of +/-7.85%. Historically over the past 8 quarters, NVDA beats earnings estimates 100.0% of the time, fills its post-earnings opening gap 75.0% of the time, and displays a Bullish Drift with an average 5-day drift of 3.42%."
  },
  "optionsImpliedVolatility": {
    "frontExpiration": "2026-11-20",
    "atmStrike": 128.0,
    "straddlePrice": 10.08,
    "impliedMovePct": 7.85,
    "impliedMoveDollar": 10.08,
    "skewPct": 2.45,
    "frontMonthIVPct": 58.4,
    "backMonthIVPct": 46.2
  },
  "gapFillAnalytics": {
    "totalEarningsAnalyzed": 8,
    "gapFillProbabilityPct": 75.0,
    "beatRatePct": 100.0,
    "averageGapUpPct": 5.82,
    "averageGapDownPct": -2.15,
    "average5DDriftPct": 3.42,
    "postEarningsDriftBias": "Bullish Drift"
  },
  "analystTargets": {
    "recommendation": "STRONG BUY",
    "numberOfAnalysts": 55,
    "targetMeanPrice": 150.0,
    "impliedUpsidePct": 16.73
  }
}
```

***

### 🤖 AI Agent & MCP Integration

Because this Actor outputs clean, pre-calculated probabilities and executive summaries, it is 100% plug-and-play with **Apify Model Context Protocol (MCP)** servers, OpenAI GPTs, Claude Tools, and LangChain/CrewAI agents.

#### Apify Python Client Example:

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_API_TOKEN>")

run_input = {
    "symbols": ["NVDA", "AAPL", "AMD"],
    "quartersBack": 8
}

run = client.actor("khnaami/stock-earnings-intelligence-actor").call(run_input=run_input)

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(f"{item['symbol']} | Expected Move: {item['aiInsights']['optionsImpliedMove']} | Gap Fill: {item['aiInsights']['gapFillProbability']}")
```

#### Apify JavaScript / TypeScript Client Example:

```typescript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

const run = await client.actor('khnaami/stock-earnings-intelligence-actor').call({
    symbols: ['NVDA', 'TSLA', 'PLTR'],
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

***

### ⚖️ Disclaimer

*This Actor provides statistical, options implied moves, and historical price metrics for educational and analytical purposes only. It is not financial or investment advice.*

# Actor input Schema

## `symbols` (type: `array`):

List of stock symbols to analyze. Magnificent Seven (NVDA, AAPL, MSFT, AMZN, GOOGL, META, TSLA) are pre-configured by default. You can add or replace with any US stock ticker (e.g. AMD, PLTR, NFLX, COIN, SMCI, BABA).

## `includePeerComparison` (type: `boolean`):

Include side-by-side valuation multiples (P/E, Forward P/E, PEG, EV/EBITDA) against the Mag 7 peer group.

## `quartersBack` (type: `integer`):

Number of previous earnings quarters to evaluate for gap-fill probability, beat rates, and 5-day drift.

## Actor input object example

```json
{
  "symbols": [
    "NVDA",
    "AAPL",
    "MSFT",
    "AMZN",
    "GOOGL",
    "META",
    "TSLA"
  ],
  "includePeerComparison": true,
  "quartersBack": 8
}
```

# Actor output Schema

## `results` (type: `string`):

Comprehensive earnings intelligence records, options implied moves, and gap-fill analytics

## `summary` (type: `string`):

Pre-calculated executive market biases, days until earnings, and implied volatility moves

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "symbols": [
        "NVDA",
        "AAPL",
        "MSFT",
        "AMZN",
        "GOOGL",
        "META",
        "TSLA"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("khnaami/stock-earnings-intelligence").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "symbols": [
        "NVDA",
        "AAPL",
        "MSFT",
        "AMZN",
        "GOOGL",
        "META",
        "TSLA",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("khnaami/stock-earnings-intelligence").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "symbols": [
    "NVDA",
    "AAPL",
    "MSFT",
    "AMZN",
    "GOOGL",
    "META",
    "TSLA"
  ]
}' |
apify call khnaami/stock-earnings-intelligence --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,khnaami/stock-earnings-intelligence"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/ZkaMa5Q3wFRguPTIi/builds/BThAB5y0Y89O4IpB0/openapi.json
