Put-Call Parity
Calculate the Put-Call Parity gap, the amount by which Black-Scholes call and put prices deviate from the no-arbitrage relationship between them.
Put-Call Parity states that, for European options sharing the same strike price and time to expiration, the following relationship must hold in order to prevent arbitrage:
\[C - P = S \cdot e ^{- q \cdot t} - K \cdot e ^{- r \cdot t}\]Where C is the call option price, P is the put option price, S is the stock price, K is the strike price, r is the risk-free rate, q is the dividend yield and t is the time to expiration.
This method computes the Black-Scholes call and put price for each ticker, strike price and time to expiration and then calculates the parity gap, i.e. the amount by which (C - P) deviates from S * e^(-qt) - K * e^(-rt). Because both prices come from the same Black-Scholes model and inputs, the gap is (up to floating point precision) always zero - this is a useful diagnostic to confirm that a set of option prices is internally consistent, or, when plugging in externally observed call and put prices, to detect potential arbitrage.
Also known as: Put-Call Parity, PCP, the no-arbitrage relationship between calls and puts.
No programming experience? With the Finance Toolkit MCP server, AI assistants such as Claude and ChatGPT can calculate the Put-Call Parity for you. Just ask in plain English.
Calculate the Put-Call Parity in Python
The Put-Call Parity is available in the Options module of the open-source Finance Toolkit. Install it with:
pip install financetoolkit -U
Then call get_put_call_parity as shown below.
from financetoolkit import Toolkit
toolkit = Toolkit(["AMZN", "AAPL"], api_key="FINANCIAL_MODELING_PREP_KEY")
parity_gap = toolkit.options.get_put_call_parity()
parity_gap.loc['AMZN']
Parameters
get_put_call_parity accepts the following parameters:
- start_date (str | None, optional): The start date which determines the stock price. Defaults to None which means it will use the most recent date.
- strike_price_range (float): The percentage range to use for the strike prices. Defaults to 0.25 which equals 25% and thus results in strike prices from 75 to 125 if the current stock price is 100.
- strike_step_size (int): The step size to use for the strike prices. Defaults to 5 which means that the strike prices will be 75, 80, 85, 90, 95, 100, 105, 110, 115 and 120 if the current stock price is 100.
- expiration_time_range (int): The number of days to use for the time to expiration. Defaults to 30 which equals 30 days.
- risk_free_rate (float, optional): The risk free rate to use for the calculation. Defaults to None which means it will use the current risk free rate.
- dividend_yield (float, optional): The dividend yield to use for the calculation. Defaults to None which means it will use the dividend yield as obtained through annual historical data.
- show_input_info (bool, optional): Whether to show the input information. Defaults to False.
- rounding (int | None, optional): The number of decimals to round the results to. Defaults to 4.
- standardize (bool, optional): Whether to standardize (Z-Score) the result across the time to expiration columns for each ticker and strike price. Defaults to False.
Related Option Pricing
The Options module page introduces the module, and the sidebar lists all of its functions.