American option binomial tree python

  • December 21, 2020 |

The binomial model is a simple yet effective pricing model. In this article we will explain the maths behind the binomial pricing model, develop a Python script to implement it and finally test it out on some real market data from Yahoo Finance. 

We will also show the relation between the binomial model and the famous Black-Scholes model. We will only consider European type options in this article, there will be a future article focused specifically on American style options. However, the prices for calls are often very close if not equal for EU and American expirations. 

Before we move on to the actual model, it may be useful to give some simpler analogous examples to explain the maths that will be used throughout this article.

Example

You are offered to play a game in which a fair coin is flipped n times and you get paid $1 for each head that comes up. 

Say we flip the coin 4 times. What is a fair price for this game? Below is a list of the 16 possible outcomes from the 4 flips given be 2x2x2x2 = 24  the results are color coded to represent the same outcome regardless of order therefore HHHT = THHH

HHHH     THHH

HHHT     THHT

HHTH      THTH

HHTT      THTT

HTHH      TTHH

HTHT       TTHT

HTTH      TTTH

HTTT       TTTT

Now that we have the sample space defined above. Let's make a payoff table recalling that we get paid $1 for each heads [H]. 

#Heads Outcomes with n Heads       Payoff         Probability         Weighted Payoff          
0 1 0   \[\frac{1}{16}\] 0
1 4 1 \[\frac{4}{16}\] 0.25
2 6 2 \[\frac{6}{16}\] 0.75
3 4 3 \[\frac{4}{16}\] 0.75
4 1 4 \[\frac{1}{16}\] 0.25

The fair price of this game is 0.25 + 0.75 + 0.75 +0.25 = $2 

What do we mean by a fair price ? 

Well you can think of this intuitively as you would be neutral as to whether you are playing this game or offering someone else to play this game. The reason you are neutral is that on average when playing this game you can expect to neither win nor lose on average. 

In terms of a game of this nature the fair price and expected value can be used interchangeably. If offered to play the game for price \[p\ \text{for any} \ p

Chủ Đề