{"id":25313751,"url":"https://github.com/tyrneh/options-implied-probability","last_synced_at":"2026-02-06T14:34:28.018Z","repository":{"id":189555844,"uuid":"554377148","full_name":"tyrneh/options-implied-probability","owner":"tyrneh","description":"OIPD computes the market's expectations about the probable future prices of an asset, based on information contained in options data.","archived":false,"fork":false,"pushed_at":"2026-02-03T20:15:05.000Z","size":27419,"stargazers_count":310,"open_issues_count":7,"forks_count":47,"subscribers_count":8,"default_branch":"main","last_synced_at":"2026-02-04T05:36:34.266Z","etag":null,"topics":["finance","implied-volatility","impliedprobability","option-pricing","option-trading","options","options-pricing","options-trading","probability-distribution","risk-neutral","risk-neutral-probability","rnd","volatility-modeling","volatility-smile","volatility-surface","volatility-trading"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tyrneh.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-10-19T17:59:36.000Z","updated_at":"2026-01-25T06:59:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"74469e93-ca18-4d89-8900-4ac1db204503","html_url":"https://github.com/tyrneh/options-implied-probability","commit_stats":null,"previous_names":["jmholzer/probabilistic","jmholzer/probabilistic-pdfs","tyrneh/options-implied-probability"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/tyrneh/options-implied-probability","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tyrneh%2Foptions-implied-probability","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tyrneh%2Foptions-implied-probability/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tyrneh%2Foptions-implied-probability/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tyrneh%2Foptions-implied-probability/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tyrneh","download_url":"https://codeload.github.com/tyrneh/options-implied-probability/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tyrneh%2Foptions-implied-probability/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29164869,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-06T12:44:37.655Z","status":"ssl_error","status_checked_at":"2026-02-06T12:44:13.991Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["finance","implied-volatility","impliedprobability","option-pricing","option-trading","options","options-pricing","options-trading","probability-distribution","risk-neutral","risk-neutral-probability","rnd","volatility-modeling","volatility-smile","volatility-surface","volatility-trading"],"created_at":"2025-02-13T16:02:21.432Z","updated_at":"2026-02-06T14:34:28.011Z","avatar_url":"https://github.com/tyrneh.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"![OIPD logo](https://github.com/tyrneh/options-implied-probability/blob/main/.meta/images/OIPD%20Logo.png)\n\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/oipd?logo=python\u0026logoColor=white)](https://pypi.org/project/oipd/)\n[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/tyrneh/options-implied-probability/blob/main/examples/OIPD_colab_demo.ipynb)\n[![Chat on Discord](https://img.shields.io/badge/chat-on%20Discord-brightgreen?logo=discord\u0026logoColor=white)](https://discord.gg/NHxWPGhhSQ)\n[![PyPI Downloads](https://static.pepy.tech/personalized-badge/oipd?period=total\u0026units=INTERNATIONAL_SYSTEM\u0026left_color=BLACK\u0026right_color=GREEN\u0026left_text=downloads)](https://pepy.tech/projects/oipd)\n\n# Overview\n\n### OIPD provides 2 capabilities:\n\n**1. It computes the market's expectations about the probable future prices of an asset, based on information contained in options data.**\n   - While markets don't predict the future with certainty, under the efficient market view, these collective expectations represent the best available estimate of what might happen.\n   - Traditionally, extracting these “risk-neutral densities” were limited to quants or academics. OIPD makes this capability accessible to everyone.\n\n\u003cp align=\"center\" style=\"margin-top: 80px;\"\u003e\n  \u003cimg src=\"https://github.com/tyrneh/options-implied-probability/blob/main/example.png\" alt=\"example\" style=\"width:100%; max-width:1200px; height:auto; display:block; margin-top:50px;\" /\u003e\n\u003c/p\u003e\n\n**2. For options traders, it also offers a simple-to-use but rigorous pipeline to fit an arbitrage-free volatility smile/surface, which can be used to price options.**\n   - Fitting a vol surface well is a complex and expensive process, with the leading software provider costing $50k USD/month/seat. OIPD open-sources the entire pipeline fairly rigorously, with further improvements in the roadmap.\n\n\u003ctable align=\"center\" cellspacing=\"12\" style=\"margin-top:120px; width:100%; border-collapse:separate;\"\u003e\n  \u003ctr\u003e\n    \u003ctd style=\"width:50%; border:5px solid #000;\"\u003e\n      \u003cimg src=\".meta/images/vol_curve.png\" alt=\"vol curve\" style=\"width:100%; height:280px; object-fit:contain; display:block;\" /\u003e\n    \u003c/td\u003e\n    \u003ctd style=\"width:50%; border:5px solid #000;\"\u003e\n      \u003cimg src=\".meta/images/vol_surface.png\" alt=\"vol surface\" style=\"width:100%; height:280px; object-fit:contain; display:block;\" /\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\n\n\n\n# Quick start\n\n#### Installation\n```bash\npip install oipd\n```\n\n### Quickstart tutorial in computing market-implied probability distributions\n\nThis quickstart will cover the functionality in **(1) computing market-implied probabilities**. See the [included jupyter notebook ](examples/quickstart_yfinance.ipynb) for a full example on using the automated yfinance connection to download options data and compute market-implied probabilities for Palantir. \n\nFor a more technical tutorial including the functionality of **(2) volatility fitting, see the additional jupyter notebooks** in the [examples](examples/) directory, as well as the full documentation [still WIP]. \n\n#### A. Usage for computing a probability distribution on a specific future date\n\n```python\nimport matplotlib.pyplot as plt\n\nfrom oipd import MarketInputs, ProbCurve, sources\n\n# 1. we download data using the built-in yfinance connection\nticker = \"AAPL\"                               # specify the stock ticker\nexpiries = sources.list_expiry_dates(ticker)  # see all expiry dates\nsingle_expiry = expiries[1]                   # select one of the expiry dates you're interested in \n\nchain, snapshot = sources.fetch_chain(ticker, expiries=single_expiry) # download the options chain data, and a snapshot at the time of download\n\n# 2. fill in the parameters \nmarket = MarketInputs(\n    valuation_date=snapshot.date,               # date on which the options data was downloaded\n    underlying_price=snapshot.underlying_price, # the price of the underlying stock at the time when the options data was downloaded \n    risk_free_rate=0.04,                        # the risk-free rate of return. Use the US Fed or Treasury yields that are closest to the horizon of the expiry date\n)\n\n# 3. compute the future probability distribution using the data and parameters\nprob = ProbCurve.from_chain(chain, market)\n\n# 4. query the computed result to understand market-implied probabilities and other statistics\nprob.plot()\nplt.show()\n\nprob_below = prob.prob_below(100)   # P(price \u003c 100)\nprob_above = prob.prob_above(120)   # P(price \u003e= 120)\nq50 = prob.quantile(0.50)           # median implied price\nskew = prob.skew()                  # skew\n```\n\n\u003cp align=\"center\" style=\"margin-top: 120px;\"\u003e\n  \u003cimg src=\".meta/images/palantir_distribution.png\" alt=\"example\" style=\"width:100%; max-width:1200px; height:auto; display:block; margin-top:50px;\" /\u003e\n\u003c/p\u003e\n\n\n\n#### B. Usage for computing probabilities over time\n\n```python\nimport matplotlib.pyplot as plt\n\nfrom oipd import MarketInputs, ProbSurface, sources\n\n# 1. download multi-expiry data using the built-in yfinance connection\nticker = \"AAPL\"\nchain_surface, snapshot_surface = sources.fetch_chain(\n    ticker,\n    horizon=\"3m\",  # auto-fetch all listed expiries inside the horizon\n)\n\n# 2. fill in the parameters\nsurface_market = MarketInputs(\n    valuation_date=snapshot_surface.date,               # date on which the options data was downloaded\n    underlying_price=snapshot_surface.underlying_price, # price of the underlying stock at download time\n    risk_free_rate=0.04,                                # risk-free rate for the horizon\n)\n\n# 3. compute the probability surface using the data and parameters\nsurface = ProbSurface.from_chain(chain_surface, surface_market)\n\n# 4. query and visualize the surface\nsurface.plot_fan() # Plot a fan chart of price probability over time\nplt.show()\n\n# 5. \"slice\" the surface to get a ProbCurve, and query its statistical properties in the same manner as in example A \nsurface.expiries                                  # list all the expiry dates that were captured\ncurve = surface.slice(surface.expiries[0]) # get a slice on the first expiry\ncurve.prob_below(100)                      # query probabilities and statistics \ncurve.kurtosis()                           \n```\n\n\u003cp align=\"center\" style=\"margin-top: 120px;\"\u003e\n  \u003cimg src=\".meta/images/palantir_price_forecast.png\" alt=\"example\" style=\"width:100%; max-width:1200px; height:auto; display:block; margin-top:50px;\" /\u003e\n\u003c/p\u003e\n\n\n\nOIPD also **supports manual CSV or DataFrame uploads**. \n\nSee [more examples](examples/) for demos.\n\n\n# Community\n\nPull requests welcome! Reach out on GitHub issues to discuss design choices.\n\nJoin the [Discord community](https://discord.gg/NHxWPGhhSQ) to share ideas, discuss strategies, and get support. Message me with your feature requests, and let me know how you use this. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftyrneh%2Foptions-implied-probability","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftyrneh%2Foptions-implied-probability","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftyrneh%2Foptions-implied-probability/lists"}