# Options Implied Probability & Risk-Neutral Distribution (`khnaami/options-implied-probability-risk-neutral-distribution`) Actor

Quantitative options implied probability engine: Black-Scholes risk-neutral density, Breeden-Litzenberger PDF/CDF curves, 16Delta (1-Sigma, 68% CI) & 30Delta probability strikes, straddle implied move ranges, and 13-tier target probability matrices.

- **URL**: https://apify.com/khnaami/options-implied-probability-risk-neutral-distribution.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

## Options Implied Probability & Expected Move Intelligence Actor

Institutional-grade quantitative options analytics actor for calculating **Risk-Neutral Probabilities**, **ATM Straddle Implied Moves**, **Standard Deviation Confidence Intervals (16-Delta / 30-Delta)**, and **Full Strike-by-Strike Distribution Densities** across any US equity, index, or ETF.

***

### 🚀 Key Features

- **Options Market Implied Move**: Calculates exact implied moves ($\pm $$ and $\pm %$) directly from At-The-Money (ATM) Straddle prices ($C\_{\text{mid}} + P\_{\text{mid}}$).
- **Probability of Staying Inside Move**: Computes the exact risk-neutral probability of the underlying asset finishing within the upper and lower expected boundaries ($P \in \[\text{Lower}, \text{Upper}]$).
- **Delta Thresholds & Confidence Intervals**:
  - **16-Delta (1-Sigma / 68% Confidence Interval)**: Risk-neutral $+1\sigma$ and $-1\sigma$ target boundaries.
  - **30-Delta (0.5-Sigma / 40% Confidence Interval)**: Intermediate quantitative target boundaries.
  - **50-Delta**: Risk-neutral median strike ($d\_2 = 0$).
- **13-Tier Target Probability Matrix**: Maps exact theoretical & nearest market strikes for target probabilities: `10%, 16%, 20%, 25%, 30%, 40%, 50%, 60%, 70%, 75%, 80%, 84%, 90%`.
- **Strike-by-Strike Risk-Neutral Density**: Computes Breeden-Litzenberger risk-neutral PDF density $f(K) = \frac{\phi(d\_2)}{K \sigma \sqrt{T}}$, Black-Scholes $P(S\_T > K) = N(d\_2)$, touch probabilities $P\_{\text{touch}}$, and option Deltas.

***

### 📥 Input Parameters

| Parameter | Type | Default | Description |
|---|---|---|---|
| `symbols` | `Array` / `String` | `["SPY", "QQQ", "AAPL", "NVDA", "TSLA"]` | List of ticker symbols to analyze. |
| `riskFreeRate` | `Float` | `0.045` (4.5%) | Annualized risk-free interest rate ($r$). |
| `includeFullDistribution` | `Boolean` | `true` | Include full strike-by-strike probability table. |
| `includeProbabilityMatrix` | `Boolean` | `true` | Include 13-tier probability level matrix. |
| `maxExpirationsPerSymbol` | `Integer` | `4` | Maximum number of upcoming expiration cycles to evaluate per symbol. |

***

### 📤 Output Structure

#### 1. Default Dataset (Tabular Overview)

Each row represents a specific expiration cycle for an underlying asset:

```json
{
  "symbol": "SPY",
  "spotPrice": 585.20,
  "expirationDate": "2026-10-16",
  "daysToExpiration": 18,
  "atmStrike": 585.00,
  "atmImpliedVolatilityPct": 14.25,
  "atmStraddlePrice": 12.80,
  "impliedMoveUsd": 12.80,
  "impliedMovePct": 2.19,
  "lowerImpliedBound": 572.40,
  "upperImpliedBound": 598.00,
  "probInsideMovePct": 68.35,
  "delta16LowerStrike": 568.50,
  "delta16UpperStrike": 601.20,
  "delta30LowerStrike": 576.80,
  "delta30UpperStrike": 593.40,
  "riskNeutralMedianStrike": 585.35,
  "updatedAt": "2026-09-28T13:30:00Z"
}
```

#### 2. Key-Value Store (`OUTPUT`)

Contains the full hierarchical JSON structure including:

- **`targetProbabilityMatrix`**: Detailed distance, nearest strike, and directional bias across 13 probability thresholds.
- **`strikeDistribution`**: Full chain strikes with Delta, IV, $P(\text{Above})$, $P(\text{Below})$, $P(\text{Touch})$, and Risk-Neutral Density.

***

### 🎯 Use Cases

- **Options Selling & Premium Harvesting**: Determine mathematically optimal strike selection for Iron Condors, Credit Spreads, and Short Strangles based on 16-Delta ($1\sigma$) or 10-Delta wings.
- **Earnings Implied Move Analysis**: Gauge market-expected binary move magnitude vs historical realized moves before quarterly earnings announcements.
- **Risk Management & Hedging**: Set quantitative stop-loss thresholds and dynamic tail-risk hedges outside the 68% or 90% confidence bands.
- **Systematic Trading Algorithms**: Integrate institutional probability distributions into quantitative execution bots.

# Actor input Schema

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

List of tickers or optionable equities/indices to calculate implied probability distributions for (e.g. SPY, QQQ, AAPL, NVDA, TSLA).

## `riskFreeRate` (type: `number`):

Risk-free interest rate (e.g. 0.045 = 4.5%).

## `includeFullDistribution` (type: `boolean`):

Calculate strike-by-strike risk-neutral Probability Above, Probability Below, and PDF density across all strikes.

## `includeProbabilityMatrix` (type: `boolean`):

Include standard 13-level probability grid (10%, 16%, 20%, 25%, 30%, 40%, 50%, 60%, 70%, 75%, 80%, 84%, 90%).

## `maxExpirationsPerSymbol` (type: `integer`):

Number of nearest expiration cycles to analyze per symbol.

## Actor input object example

```json
{
  "symbols": [
    "SPY",
    "QQQ",
    "AAPL",
    "NVDA",
    "TSLA"
  ],
  "riskFreeRate": 0.045,
  "includeFullDistribution": true,
  "includeProbabilityMatrix": true,
  "maxExpirationsPerSymbol": 2
}
```

# Actor output Schema

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

Dataset items and records produced by the Actor

## `overview` (type: `string`):

Summary report stored in Key-Value store

# 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": [
        "SPY",
        "QQQ",
        "AAPL",
        "NVDA",
        "TSLA"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("khnaami/options-implied-probability-risk-neutral-distribution").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": [
        "SPY",
        "QQQ",
        "AAPL",
        "NVDA",
        "TSLA",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("khnaami/options-implied-probability-risk-neutral-distribution").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": [
    "SPY",
    "QQQ",
    "AAPL",
    "NVDA",
    "TSLA"
  ]
}' |
apify call khnaami/options-implied-probability-risk-neutral-distribution --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,khnaami/options-implied-probability-risk-neutral-distribution"
        }
    }
}
```

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/1gdgIT6cVaf9HbRZH/builds/z5Ia1ZW7GhHTx1yaD/openapi.json
