How to Predict Future Stock Prices with Options Data and Python

Photo by Tech Daily on Unsplash

What is Implied Volatility?

A product of the Black-Scholes model, implied volatility is an essential statistic for options traders and refers to the range of future moves in the underlying stock’s price.

Why Does Implied Volatility Impact Option Premiums?

From an option pricing standpoint, the higher the implied volatility, the wider the distribution of pricing outcomes and, therefore, the higher the premium demanded to purchase an option’s contract associated with that stock.

What Factors Impact Implied Volatility?

We now know that higher implied volatility means a higher premium for a contract, but what causes implied volatility to rise?

Using Intrinio’s Real-Time Options API to Predict Stock Prices

Using our newfound knowledge, we can now use Intrinio’s Real-Time Options API to construct a range of outcomes for an underlying stock price as of specific expiration dates.

Step 1: Retrieve Requisite Stock and Options Data

To forecast stock prices, we first need to create a few helper functions to retrieve the inputs for our formula. These inputs are:

Step 2: Calculate the Upper and Lower Price Range for Each Security

The _stock_standard_deviation_range uses the strike price, implied volatility, and expiration date supplied from the above functions to construct the upper and lower bounds of our one standard deviation forecast range. Again, these upper and lower figures signify the range in which the stock is likely to fall 68% of the time by the expiration date of a particular contract.

Step 3: Iterate and calculate the forecasted range for all expirations.

Our final function _option_forecast_dataset puts all of the pieces together and will iterate through the list of option expiration dates for a particular ticker. Each iteration will perform the data ingestion and calculations above, returning an upper and lower estimated price forecast for each option chain associated with the stock.

Complete Code Walkthrough:

Get the best options market data

Intrinio’s reputable US options data packages have everything your business needs and more! You can easily access and make the most out of our reliable filtered options data through our powerful infrastructure at a fraction of the cost. Not only will you have access to clean filtered options data, but you can request unusual options activity, and expect low latency and flexible licensing. Our data experts are ready to guide you in the right business direction.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store


High-quality financial data. Tools built for developers. First-class, US-based support. Data doesn’t have to be hard or expensive.