# Yahoo Finance Options Chain Scraper: Greeks, IV & Insider (`zenonnnnnn/us-options-greeks-insider`) Actor

Scrape US options chains (Cboe & Yahoo Finance options chain scraper) with vectorized Black-Scholes Greeks, Implied Volatility (IV), POP, Max Pain & unusual Vol/OI flow, enriched with live SEC EDGAR Form 4 executive insider buying & selling signals.

- **URL**: https://apify.com/zenonnnnnn/us-options-greeks-insider.md
- **Developed by:** [xu zenon](https://apify.com/zenonnnnnn) (community)
- **Categories:** Business, Developer tools, AI
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 filtered option contract with greeks & insider signals

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## 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

## US Options Chain, Cboe Greeks, Max Pain & SEC Form 4 Insider Scanner

Institutional-grade US equity, ETF, and index options analytics Actor that combines **Cboe Official Delayed Option Chains** (with automatic **Yahoo Finance Crumb** session fallback), a **pure-NumPy vectorized Black-Scholes-Merton (BSM) solver**, **exact Max Pain & 1-Sigma Expected Move analytics**, and **live SEC EDGAR Form 4 executive insider transaction resonance**.

All strike, expiration, liquidity, and unusual Volume/OI filters execute **strictly before Pay-Per-Event (PPE) billing**, ensuring you never pay for illiquid or out-of-range contracts.

***

### Key Capabilities

1. **Dual-Source High-Availability US Options Engine**
   - **Primary (`cboe_cdn`)**: Pulls full option chains directly from Cboe's public delayed-quotes feed (`cdn.cboe.com`), automatically handling index prefixes (`_SPX`, `_VIX`, `_NDX`, `_RUT`), corporate-action roots, and OCC contract symbol parsing (`NVDA261231C00155000` -> root, expiry, Call/Put, strike).
   - **Automatic Fallback (`yahoo_finance`)**: Seamlessly acquires a `fc.yahoo.com` cookie + `getcrumb` token via TLS-impersonated `curl_cffi` whenever small-cap or specialty tickers are absent on Cboe CDN.

2. **Sub-Millisecond Vectorized NumPy Quantitative Engine**
   - **Implied Volatility Inversion**: Safeguarded hybrid Newton-Raphson + Bisection solver across no-arbitrage bounds.
   - **Full BSM Greeks Backfill**: Millisecond calculation of `impliedVolatility`, `delta`, `gamma`, `theta` (per calendar day), `vega` (per 1% IV move), and `rho` (per 1% rate move) whenever native Greeks are absent or zeroed.
   - **Actionable Trade Metrics**: `moneynessPct`, `dte`, `midPrice`, `spreadPct`, `volOiRatio` (`Volume / Open Interest`), `notionalVolumeUsd`, `underlyingNotionalUsd`, `breakevenPrice`, and risk-neutral lognormal `probabilityOfProfit` (`BUYER` or `SELLER` perspective).
   - **Full-Chain Ticker Analytics**: Exact `maxPainStrike` (evaluating option buyers' aggregate intrinsic value across every strike in the DTE window *before* strike pruning), `nearestExpiryMaxPainStrike`, `putCallVolumeRatio`, `putCallOiRatio`, and `expectedMove1SigmaUsd` ($\pm 1\sigma$ range on nearest active expiration).

3. **SEC EDGAR Form 4 Executive Insider Resonance**
   - Maps US corporate tickers to 10-digit SEC CIKs via `sec.gov/files/company_tickers.json`, queries `data.sec.gov/submissions/CIK{cik}.json` with compliant SEC Fair Access headers, counts 30-day and 90-day `Form 4` filings, and parses recent XML ownership tables (`transactionAcquiredDisposedCode` `A`/`D` and open-market `P`/`S` share counts).
   - Tags every unusual option sweep (`volOiRatio >= unusualVolOiThreshold`) with an institutional **Insider Resonance Signal**:
     - `BULLISH_CALL_SWEEP_WITH_INSIDER_BUYING`
     - `DIVERGENT_CALL_SWEEP_DESPITE_INSIDER_SELLING`
     - `BEARISH_PUT_SWEEP_WITH_INSIDER_SELLING`
     - `HEDGING_PUT_SWEEP_AGAINST_INSIDER_BUYING`
     - `UNUSUAL_OPTIONS_FLOW_ONLY` / `NORMAL_FLOW`

***

### Pre-Billing Cost Optimization & Output Modes

| Parameter | Default | Purpose |
| :--- | :--- | :--- |
| `tickers` | `["NVDA", "AAPL"]` | US stocks, ETFs, or Cboe index symbols (`SPX`, `VIX`, `SPY`, `TSLA`, etc.) |
| `outputMode` | `"option_contracts"` | `"option_contracts"` (`option-contract` PPE + `TICKER_SUMMARIES` in KV Store) or `"ticker_summaries"` (`ticker-summary` PPE) |
| `optionType` | `"ALL"` | `"ALL"`, `"CALL"`, or `"PUT"` |
| `minDte` / `maxDte` | `1` / `45` | Days-to-Expiration window (set `minDte: 0` for 0DTE flow) |
| `moneynessRangePct` | `20` | Keep strikes within $\pm 20%$ of spot price, stripping deep OTM/ITM noise pre-billing |
| `minVolume` / `minOpenInterest` | `10` / `50` | Liquidity floor applied before PPE charging |
| `minVolOiRatio` | `0` | Set to `1.25` or `2.0` to **only** return unusual Volume > OI option sweeps |
| `popPerspective` | `"BUYER"` | `"BUYER"` (long option breakeven POP) or `"SELLER"` (short premium / wheel POP) |
| `includeSecInsider` | `true` | Attach 30d/90d SEC EDGAR Form 4 counts & XML share transaction breakdowns |

> **Free-Tier Protection**: Non-paying Store trial runs automatically cap execution at 2 tickers and 100 filtered option contracts so trial credits are protected.

***

### Sample Output (`option_contracts` mode)

```json
{
  "recordType": "option_contract",
  "ticker": "NVDA",
  "contractSymbol": "NVDA261231C00155000",
  "expirationDate": "2026-12-31",
  "dte": 28,
  "optionType": "CALL",
  "strike": 155.0,
  "spotPrice": 150.2204,
  "moneynessPct": 3.18,
  "inTheMoney": false,
  "bid": 7.75,
  "ask": 7.9,
  "midPrice": 7.825,
  "spreadPct": 1.92,
  "volume": 8704,
  "openInterest": 3774,
  "volOiRatio": 2.3063,
  "notionalVolumeUsd": 6810880.0,
  "impliedVolatility": 0.5244,
  "delta": 0.4845,
  "gamma": 0.0176,
  "theta": -0.1549,
  "vega": 0.1706,
  "rho": 0.0575,
  "breakevenPrice": 162.825,
  "probabilityOfProfit": 0.3412,
  "maxPainStrike": 155.0,
  "expectedMove1SigmaUsd": 6.25,
  "isUnusualActivity": true,
  "insiderResonanceSignal": "DIVERGENT_CALL_SWEEP_DESPITE_INSIDER_SELLING",
  "dataSource": "cboe_cdn"
}
```

Ticker-level summaries (including `maxPainStrike`, `expectedMoveRange1Sigma`, `putCallVolumeRatio`, `putCallOiRatio`, `topUnusualContracts`, and `insiderActivitySummary`) are always written to the default Key-Value Store under `TICKER_SUMMARIES`, or emitted directly as Dataset items when `outputMode` is set to `"ticker_summaries"`.

***

### Disclaimer

Market quotes from public feeds are delayed at least 15 minutes pursuant to exchange rules. Quantitative metrics (Black-Scholes Greeks, Implied Volatility, Max Pain, Expected Move, and Probability of Profit) and SEC Form 4 aggregations are provided strictly for informational, quantitative research, and automation workflows—not investment advice.

# Actor input Schema

## `tickers` (type: `array`):

List of US stock, ETF, or Cboe index tickers (e.g., NVDA, AAPL, TSLA, SPY, SPX, VIX).

## `outputMode` (type: `string`):

Choose 'option_contracts' to emit filtered option contracts to Dataset (charged per 'option-contract') while also saving TICKER_SUMMARIES to Key-Value Store, or 'ticker_summaries' to emit one aggregated row per ticker to Dataset (charged per 'ticker-summary').

## `optionType` (type: `string`):

Filter contracts by CALL, PUT, or ALL before Pay-Per-Event billing.

## `minDte` (type: `integer`):

Minimum calendar days until expiration. Set to 0 to include 0DTE contracts.

## `maxDte` (type: `integer`):

Maximum calendar days until expiration.

## `moneynessRangePct` (type: `number`):

Keep only strikes within ±N% of the underlying spot price (|strike - spot| / spot \* 100 <= N). Default 20% strips illiquid deep OTM/ITM contracts before billing.

## `minVolume` (type: `integer`):

Minimum daily trading volume required per option contract (applied pre-billing).

## `minOpenInterest` (type: `integer`):

Minimum open interest required per option contract (applied pre-billing).

## `minVolOiRatio` (type: `number`):

Pre-billing unusual options activity filter. Set > 0 (e.g., 1.25 or 2.0) to return ONLY contracts where daily Volume exceeds Open Interest by that multiple.

## `unusualVolOiThreshold` (type: `number`):

Contracts with volOiRatio >= this threshold are tagged isUnusualActivity=true and evaluated for bullish/bearish SEC Form 4 insider resonance.

## `popPerspective` (type: `string`):

Calculate lognormal Probability of Profit at expiration from either the option BUYER (long) or option SELLER (short) perspective.

## `riskFreeRatePct` (type: `number`):

Annualized US Treasury risk-free rate (%) for Black-Scholes-Merton IV inversion, Greeks backfill, and POP calculation.

## `dividendYieldPct` (type: `number`):

Annualized continuous dividend yield (%) used in Black-Scholes-Merton pricing.

## `includeSecInsider` (type: `boolean`):

Query official SEC EDGAR submissions & Form 4 XML ownership filings to attach 30d/90d executive insider buy/sell metrics and resonance signals.

## `secMaxForm4XmlParse` (type: `integer`):

Number of latest Form 4 XML filings per company to parse for exact Acquired (A) / Disposed (D) and Open-Market Purchase (P) / Sale (S) share counts.

## `maxContractsPerTicker` (type: `integer`):

Cap filtered contracts emitted per symbol (ranked by notionalVolumeUsd descending so largest institutional flows are prioritized).

## Actor input object example

```json
{
  "tickers": [
    "NVDA",
    "AAPL"
  ],
  "outputMode": "option_contracts",
  "optionType": "ALL",
  "minDte": 1,
  "maxDte": 45,
  "moneynessRangePct": 20,
  "minVolume": 10,
  "minOpenInterest": 50,
  "minVolOiRatio": 0,
  "unusualVolOiThreshold": 1.25,
  "popPerspective": "BUYER",
  "riskFreeRatePct": 4.35,
  "dividendYieldPct": 0,
  "includeSecInsider": true,
  "secMaxForm4XmlParse": 5,
  "maxContractsPerTicker": 250
}
```

# Actor output Schema

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

Filtered option contracts with Greeks/IV/POP or ticker-level summaries.

## `tickerSummaries` (type: `string`):

Underlying spot price, Max Pain strike, 1-sigma expected move, and Form 4 insider sentiment.

# 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 = {
    "tickers": [
        "NVDA",
        "AAPL"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("zenonnnnnn/us-options-greeks-insider").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 = { "tickers": [
        "NVDA",
        "AAPL",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("zenonnnnnn/us-options-greeks-insider").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 '{
  "tickers": [
    "NVDA",
    "AAPL"
  ]
}' |
apify call zenonnnnnn/us-options-greeks-insider --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,zenonnnnnn/us-options-greeks-insider"
        }
    }
}
```

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/9kshQmdAAHfsV5N6x/builds/4sXFVjv6xi3x4Mn5b/openapi.json
