OptionsImpliedPDF.jl extracts risk-neutral probability distributions from options market data, revealing the market's collective expectations about future asset price movements.
Under the efficient market hypothesis, these option-implied probabilities represent the most informed estimates available of potential price outcomes, derived from the wisdom of market participants.
This package was inspired by the existing python library, OIPD
Example output: Risk-neutral probability density function extracted from AAPL options data
- Real-time Options Data: Fetches live options chains from Yahoo Finance
- Black-Scholes Pricing: Completes implementation with implied volatility calculation
- SVI Model: Stochastic Volatility Inspired model for volatility smile fitting
- Risk-Neutral Probabilities: Calculates probabilities of price movements using risk-neutral density
- Breeden-Litzenberger: Numerical density estimation from option prices
- Visualization: Built-in plotting functions for analysis and debugging
- Arbitrage Detection: Automatic checking for model consistency and arbitrage opportunities
using OptionsImpliedPDF
# Calculate probability that AMD will be below $200 at expiration
prob = prob_below("AMD", 200.0, "2025-01-17")
# Calculate probability that AMD will be at or above $250
prob_above = prob_at_or_above("AMD", 250.0, "2025-01-17")
# Get closest available expiration date
expiry = get_closest_expiry("AMD")using Pkg
Pkg.add("https://github.com/SentientPlatypus/Oipd.jl")- Technical Documentation: Detailed mathematical background, algorithms, and API reference
- Examples: Practical usage examples and scripts
- Hand Written Notes: Handwritten notes I took while working on this project
- API Reference: Comprehensive function documentation in source code
- Fetch real-time call and put options data
- Automatic data cleaning and quote health checking
- Support for any ticker with options available on Yahoo Finance
- Black-Scholes: European option pricing with Newton-Raphson implied volatility
- SVI: Parametric volatility smile modeling
- Calculate risk-neutral probabilities for price movements
- Support for custom strike prices and expiration dates
- Automatic volatility surface construction
- Volatility smile plots
- Price vs strike analysis
- Risk-neutral density plots
- SVI model fit diagnostics
Risk-Neutral Probability Density

using OptionsImpliedPDF
# Analyze AMD options expiring in January 2025
ticker = "AMD"
expiry = "2025-01-17"
strike = 220.0
# Calculate probabilities
prob_below_strike = prob_below(ticker, strike, expiry)
prob_above_strike = prob_at_or_above(ticker, strike, expiry)
println("Probability AMD < $strike at expiry: $(round(prob_below_strike * 100, digits=2))%")
println("Probability AMD ≥ $strike at expiry: $(round(prob_above_strike * 100, digits=2))%")
# Generate analysis plots
prob_below(ticker, strike, expiry, "./plots")- DataFrames.jl: Data manipulation
- Plots.jl: Visualization
- Optim.jl: Numerical optimization
- Distributions.jl: Statistical distributions
- PythonCall.jl: Yahoo Finance data fetching via yfinance
- Risk Management: Assess probability of adverse price movements
- Portfolio Optimization: Incorporate option-implied probabilities
- Trading Strategies: Volatility arbitrage and directional bets
- Research: Empirical analysis of risk-neutral distributions
- Education: Learn options pricing and volatility modeling
Contributions are welcome! Please feel free to submit issues, feature requests, or pull requests.
This project is licensed under the MIT License - see the LICENSE file for details.
If you use OptionsImpliedPDF.jl in your research, please cite:
@software{wicksono2025oipd,
author = {Gene Wicaksono},
title = {OptionsImpliedPDF.jl: Options Pricing and Risk Analysis in Julia},
url = {https://github.com/SentientPlatypus/OptionsImpliedPDF.jl},
year = {2025}
}- Yahoo Finance for options data
- The Julia community for excellent packages
- Financial mathematics literature on SVI and risk-neutral pricing

