Simplifying Put-Call Parity on Plain Vanilla European Options in Python — Part 1

Ben Diagi
6 min readDec 6, 2021

--

In this first article, I will breakdown the concept of Derivatives, Options, and then visualise the payoff and profit on European Call & Put Options in Python.

Background:

Derivatives: A derivative is any financial instrument that derives its value from another asset, usually called an underlying asset. Derivatives are usually used for either hedging or speculation.

Hedging: Imagine you are a rice farmer, looking to produce 50,000 bags of rice for sale. It will take 5 months to grow, harvest and process that quantity of rice, however the price of rice may rise or fall significantly within that time period.
If the market price per bag of rice in 5 months rises above your breakeven price, you would be in a net loss, so it would be great if you could lock-in a desired price today and deliver in 5 months at your locked-in price.
In this scenario, it may be desirable for you to create a hedge using a Forwards or Futures contract which ensures that you can sell 50,000 bags of rice in 5 months at your desired price. This arrangement will only benefit you if the price per bag of rice declines below your Forwards/Futures price.

This type of derivative is called a Forward Commitment because you have an obligation to sell the asset at whatever price you initially agreed to, with your counter-party or broker.

Speculation: Imagine that a tech company you follow just set a date for a major event at which the CEO will make a series of announcements about upcoming products and services.
You believe that the announcements at this event will cause the price of the company’s stock to increase significantly, however you do not want to buy the stocks because they are too expensive.
In this scenario, it may be desirable to buy a call option to bet on the direction on the stock’s price. If the price of the stock at expiration is higher than the (strike price + the option premium), you will make a profit. Your profit is unlimited with a call option and your losses are limited to the cost of the premium.

This type of derivative is called a Contingent Claim because the decision for the buyer to exercise or not to exercise is based on the the intrinsic value of the option at expiration.

The two broad classes of derivatives, as described above are Forward Commitments and Contingent Claims.

Options: An option is an example of a contingent claim. If you buy an option, you have the right but not the obligation to buy the underlying asset (stock, bond, commodity) at a specified price (stirke price) within a specified time period.

All options have a:
1. Strike price
2. Expiration date
3. Premium
4. Underlying asset

When you decide to buy an option contract, you will select the underlying asset, pay an option premium (to the seller), select a strike price and an expiration date.

The strike price is the the agreed upon price at which you will buy/sell the underlying asset in the future.

Unlike a futures contract, you must pay a premium to buy an option contract.

All options have a fixed expiration, however, because you have a right not an obligation, you can decide not to exercise your option on expiration. Regardless of your decision, the option premium is non-refundable, so it makes sense to exercise an option only if the benefit of exercising the option is greater than the cost of the premium.

An in-the-money option is an option that has positive intrinsic value; the benefit of exercising the option outweighs the cost of the option.

An out-of-the-money has negative intrinsic value. So we will not exercise it. We will simply lose only the premium we paid when we bought the contract.

With respect to expiration, there are three types of options. American options can be exercised on any day before the expiration day, European options can be exercised only on the exercise day, and Bermudan options can be exercised on predefined days before the expiration date.

Call option: A call option gives you the right, but not the obligation to buy an underlying asset at a given strike price on a given date in the future. The value of a call option increases when the price of the underlying asset increases, therefore, you will have a positive payoff only if the price of the underlying asset is greater than the strike price.

Suppose we have an asset with prices ranging from 0 to 100.
We have a call option with a strike price of $50; this implies that we have the right (not the obligation) to buy the underlying asset at $50.
The option premium is $5.

Following the principle of “Buy Low, Sell High”, it makes sense to exercise the option only if the asset price is at a price above ($50 + the $5 premium).

The payoff is the value of the option before premium is deducted: (Asset price - Strike price).

The profit is the value of the option net of premium: (Asset price - Strike price - Premium)

If the price of the asset is below $55, we do not need to exercise. We can simply let the option expire out-of-the-money, and our loss will be the $5 premium.

Put Option: A put option gives you the right, but not the obligation to sell an underlying asset at a given strike price on a given date in the future. The value of a put option increases when the price of the underlying asset decreases, therefore, you will have a positive payoff only if the price of the underlying asset is less than the strike price.

Suppose we have an asset with prices ranging from 0 to 100.
We have a put option with a strike price of $50; this implies that we have the right (not the obligation) to sell the underlying asset at $50.
The option premium is $5.

Following the principle of “Buy Low, Sell High”, it makes sense to exercise the put option only if the asset price is at a price below ($50 - the $5 premium).

The payoff is the value of the option before premium is deducted: (Strike price - Asset price).

The profit is the value of the option net of premium: (Strike price - Asset price - Premium)

If the price of the asset is above $45, we do not need to exercise. We can simply let the option expire out-of-the-money, and our loss will be the $5 premium.

Thanks for reading.

In future articles, I will explain and illustrate various types of option trading strategies, and describe the process of engineering various combinations of derivatives, risk free bonds and underlying assets to create perfectly hedged portfolios.

Cheers

--

--

Ben Diagi

I’m a Product Manager & Designer. I write about Product, Design and Finance. In my spare time, I build trading algorithms and create UX prototypes.