Today I will introduce the Theory of the Binomial Asset Pricing Model and show how you can implement the binomial tree model to price a European call option in Python. The theory section of this video is long (sorry) and aims at giving you the absolute basics for understanding why and how to derive the discounted expectation of future payoffs under risk-neutral probabilities given the Binomial Model.
For those who just want to code, please skip ahead to the Python Implementation section. I will take you through two implementations of a simple binomial tree model in Python, one that will use ‘for loops’ to step through each node at each time step (a function I have defined as binomial tree slow), and the other (binomial tree fast) will vectorize these steps using numpy arrays, improving overall computation time as N time steps increase. Although not necessary for the example today, using numpy arrays and vectorizing our calculations will improve computations as we delve deeper into financial mathematics and implementation heading forward.
In this tutorial series we will be breaking down the theory described and published in Steven Shreve’s book’s Stochastic Calculus for Finance I & II. As a guide for implementing these concepts in Python, we will refer to the numerical methods and practices outlined in Les Clewlow & Chris Strickland’s book Implementing Derivatives Models.
00:00 Intro
00:50 Theory || What is Arbitrage? – Type I & II
04:20 Theory || No Arbitrage Pricing – The Law of One Price
05:47 Theory || One-period Binomial Model
11:00 Theory || Deriving the discounted expectation of future payoffs under risk-neutral probabilities
20:10 Theory || No Arbitrage Conditions
24:10 Theory || Multi-period Binomial Model
29:50 Python Implementation || Binomial Tree Slow
41:12 Python Implementation || Binomial Tree Fast
46:55 Python Implementation || Comparing the Slow vs Fast Implementation
★ ★ Code Available on GitHub ★ ★
GitHub: https://github.com/TheQuantPy
Specific Tutorial Link: https://github.com/TheQuantPy/youtube-tutorials/blob/8e64e19629cee840928b51baf4660e5c777e87e7/2021/003%20Jul-Sep/2021-07-06%20Binomial%20Option%20Pricing%20Model%20_%20Theory%20_%20Implementation%20in%20Python.ipynb
★ ★ QuantPy GitHub ★ ★
Collection of resources used on QuantPy YouTube channel. https://github.com/thequantpy
★ ★ Discord Community ★ ★
Join a small niche community of like-minded quants on discord. https://discord.com/invite/aY2Af4CxHP
★ ★ Support our Patreon Community ★ ★
Get access to Jupyter Notebooks that can run in the browser without downloading python.
https://www.patreon.com/quantpy
★ ★ ThetaData API ★ ★
ThetaData's API provides both realtime and historical options data for end-of-day, and intraday trades and quotes. Use coupon 'QPY1' to receive 20% off on your first month.
https://www.thetadata.net/
★ ★ Online Quant Tutorials ★ ★
WEBSITE: https://quantpy.com.au
★ ★ Contact Us ★ ★
EMAIL: [email protected]
Disclaimer: All ideas, opinions, recommendations and/or forecasts, expressed or implied in this content, are for informational and educational purposes only and should not be construed as financial product advice or an inducement or instruction to invest, trade, and/or speculate in the markets. Any action or refraining from action; investments, trades, and/or speculations made in light of the ideas, opinions, and/or forecasts, expressed or implied in this content, are committed at your own risk an consequence, financial or otherwise. As an affiliate of ThetaData, QuantPy Pty Ltd is compensated for any purchases made through the link provided in this description.