Option Payoff
An option payoff diagram is a graphical representation of the net Profit/Loss made by the option buyers and sellers.
where,
S = Underlying Price
X = Strike Price
Before we begin with the explanation, it is important to note that the "Breakeven" point is the point at which you make no profit or no loss. Options Premium is the upfront payment made by the option buyer to the option seller to acquire the option.
Graph 1
You can see that the option buyer will make a loss (represented by the red line) until the “Breakeven” is crossed. The loss is capped, but profits grow with the price.
The long call holder makes a profit equal to the stock price at expiration minus strike price minus premium if the option is in the money. The call option holder makes a loss equal to the amount of premium if the option expires out of money, and the writer of the option makes a flat profit equal to the option premium.
Graph 4
Here, it is visible that the option seller will make profits once the "Breakeven" points are crossed. The profits are capped, but the loss can grow to be very high if the market crashes.
For the put option buyer, profit is made when the option is in the money and is equal to strike price minus stock price at expiration minus premium. And, the put writer makes a profit equal to premium for the option.
Buying a put option gives you the right, but not the obligation, to sell the underlying security at the given strike price within a specific time period. Therefore a put option payoff at expiration depends on whether the underlying price is relative to the put option strike price.
Try Free Course on Options Trading to learn options basics and plot payoff diagram using Python.

Let us see the put option buyer payoff chart and put option seller payoff chart with the Python code below:
# Import necessary libraries
import numpy as np
import matplotlib.pyplot as plt
# For making attractive and informative statistical graph
plt.style.use('seaborn-darkgrid')
# Define a function put_payoff that calculates the payoff from buying a put option
def put_payoff (sT, strike_price, premium):
pnl = np.where(sT<strike_price, strike_price - sT, 0)
return pnl - premium
# We will define the spot price, the strike price, premium, and a range of possible values for the Infosys
stock price at expiry
# Infosys stock price
spot_price = 900
# Put strike price and cost
strike_price = 900
premium = 20
# Stock price range at the expiration of the put
# We have defined range for the stock price at expiry as +/- 10% from spot price
# Syntax: numpy.arange(start price, stop price)
sT = np.arange(0.9*spot_price,1.1*spot_price)
The function takes sT, which is a range of possible values of the stock price at expiration, the strike price of the put option and the premium of the put option as input.
It returns a numpy array containing the profit from the put option for different stock prices. When the stock price is less than the strike price, the profit is measured as the difference between the strike price and the stock price, and when the stock price is greater than the strike price, then the profit is zero.
After this, a put premium is deducted from the Profit-n-Lose(pnl) to compute the payoff.
# Put option buyer payoff payoff_long_put = put_payoff(sT, strike_price, premium) # Plot the graph fig, ax = plt.subplots(figsize=(8,5)) ax.spines['bottom'].set_position('zero') ax.plot(sT,payoff_long_put,label='Put option buyer payoff') plt.xlabel('Infosys Stock Price') plt.ylabel('Profit and loss') plt.legend() plt.show()
Output:
Now, to get the payoff graph for the option seller, we have multiplied the payoff of the option buyer by -1.0, as the option buyer makes the profit, the option seller will lose the exact same amount and vice-versa.
# Put option seller payoff payoff_short_put = payoff_long_put * -1.0 # Plot fig, ax = plt.subplots(figsize=(8,5)) ax.spines['bottom'].set_position('zero') ax.plot(sT,payoff_short_put,label='Put option seller payoff',color='r') plt.xlabel('Infosys Stock Price') plt.ylabel('Profit and loss') plt.legend() plt.show()
Output:
Similarly, you can use the above Python code for call payoff, i.e., both call option buyer payoff and call option seller payoff.
You can explore the course on Options trading strategies in Python to learn about option payoff. It is a basic course for beginners in options trading. This comprehensive course also covers the topics such as moneyness, put-call parity, volatility and its types, hedging with options, and various options trading strategies.