Option pricing with ChatGPT

In this post I use the ChatGPT Wolfram plugin to price an option and get its Greeks. Option pricing requires complex mathematics and a finacial model like Black-Scholes. It is truly impressive how ChatGPT and Wolfram have streamlined this complex process into single-click operations within the ChatGPT platform.

In my view, a key role for LLMs is as intelligent API gateways. Using ChatGPT plugins to obtain option prices illustrates this. LLMs can be seen as a dialogue interface rather than a storage for knowledge, serving as the interactive layer between a human user and a knowledge graph with various sources. These sources can be a mix of generated and curated data.

The imminent future of AI lies in its capability to function as a universal assistant. With the assistance of AI, tasks such as creating slides, coding, and analysis, become more efficient. The essence of AI's potential lies in enhancing human intelligence, serving as our interface to navigate the increasingly complex, interconnected, and data-rich world.

The basic steps to price an option

1. Choose an Option Pricing Model

The first step in pricing an option is to choose an appropriate pricing model. The most common models used are the Black-Scholes model and the binomial option pricing model.

2. Collect Data

Next, you'll need to collect the necessary data inputs for the model. These inputs typically include the current price of the underlying asset, the strike price of the option, the time until the option's expiration (term), the risk-free interest rate, and the volatility of the underlying asset.

3. Calculate

You would then input these values into your chosen pricing model to calculate the theoretical price of the option. For instance, in the Black-Scholes model, the calculation involves a fairly complex formula that uses these inputs to determine the option price.

Here is the Black-Scholes formula for a European call option:

\[C = S_0 * N(d1) - X * e^{-rT} * N(d2)\]

And for a European put option:

\[P = X * e^{-rT} * N(-d2) - S_0 * N(-d1)\]


  • \(C\) is the call option price
  • \(P\) is the put option price
  • \(S_0\) is the current price of the underlying stock
  • \(X\) is the strike price
  • \(r\) is the risk-free interest rate
  • \(T\) is the time to maturity
  • \(N()\) is the cumulative standard normal distribution function
  • \(d1\) and \(d2\) are calculated as:
    • \[d1 = \frac{{\ln(S_0/X) + (r + \sigma^2/2)T}}{{\sigma * \sqrt{T}}}\]

      \[d2 = d1 - \sigma * \sqrt{T}\]

  • \(\sigma\) is the standard deviation of the asset returns (volatility)

4. Adjust for Real-World Factors

The calculated price is a theoretical value. In the real world, the price at which an option trades can be influenced by other factors not included in the model. This can include things like market sentiment, liquidity of the option, or dividends on the underlying asset. Professional traders often use the calculated price as a starting point, and then adjust it based on these other factors.

Using the Wolfram plugin to price an option

Let's price an American call on the SPX. I show the price of the SPX for the last 6 months below and arbitrarily choose a 4450 strike price for my call.

SPX chart 6m

The rest of my inputs are: Underlying = SPX, Underlying price = 4365.69, Option type = American call, Start = 2023-06-22, Start time = 10:52:46, Expiration date = 2023-07-21, Expiration time = AM, Strike = 4450.00, Volatility = 17.50%, Interest rate = 5.14%. I obtain a benchmark theortical price using the CBOE Options Calculator.

CBOE pricer

ChatGPT uses the Wolfram plugin that I have enabled and responds with the theoretical price and Greeks. Not bad! Fairly close to the price and Greeks from the CBOE.

Option price from ChatGPT

For completeness, this is the ChatGPT request to the Wolfram Alpha API.

Request to Wolfram

Option pricing with ChatGPT