American Option Pricing with Binomial Trees || Theory & Implementation in Python

Sdílet
Vložit
  • čas přidán 20. 07. 2024
  • In this video we look at pricing American Options using the Binomial Asset Pricing Model and show how you can implement the binomial tree model to price an American option in Python. We also show why it is not optimal to early exercise an American Call option with no dividend (or positive interest rates).
    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 American 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:35 Theory || What are American Options?
    01:05 Theory || Early exercise is not optimal for American Call
    04:44 Theory || American Put Options
    06:52 Theory || Some other considerations
    08:30 Python Implementation || American Tree Slow
    18:10 Python Implementation || American Tree Fast
    21:55 Python Implementation || Comparing the Slow vs Fast Implementation
    ★ ★ Code Available on GitHub ★ ★
    GitHub: github.com/TheQuantPy
    Specific Tutorial Link: github.com/TheQuantPy/youtube...
    ★ ★ QuantPy GitHub ★ ★
    Collection of resources used on QuantPy CZcams channel. github.com/thequantpy
    ★ ★ Discord Community ★ ★
    Join a small niche community of like-minded quants on discord. / discord
    ★ ★ Support our Patreon Community ★ ★
    Get access to Jupyter Notebooks that can run in the browser without downloading python.
    / 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.
    www.thetadata.net/
    ★ ★ Online Quant Tutorials ★ ★
    WEBSITE: quantpy.com.au
    ★ ★ Contact Us ★ ★
    EMAIL: pythonforquants@gmail.com
    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.

Komentáře • 14

  • @lornemalvoo
    @lornemalvoo Před 3 lety +3

    This channel is certainly a gold mine. Please sir keep it up.

  • @thetrickingcorner439
    @thetrickingcorner439 Před 5 měsíci

    This video is amazing. Thank you so much :)

  • @daves1413
    @daves1413 Před 2 lety

    Awesome tutorial, keep it up

  • @schnohr3292
    @schnohr3292 Před 2 lety +1

    Great video!
    Have you done a video on pricing in trinomial trees or do you plan on doing one? More specifically on pricing American call options using a two-factor Hull-White model?

    • @QuantPy
      @QuantPy  Před 2 lety +1

      Yes will get to trinomial trees and can include hull-white model 👍

  • @bhdkid1
    @bhdkid1 Před rokem

    Hi @QuantyPy , great video. when proving the idea that you should never discount earlier for American call option, why do we use e (assume continuous compounding) for the interest earned for our bank account given that none pay that? I always wondered that when seeing e in many formula.
    Thank

  • @wajihchtiba34
    @wajihchtiba34 Před 2 lety

    i really like your channel !

  • @siddharthsidselvamohan2051

    Hey, Thanks for the video. I am getting different values when using different # of steps. that is, for N = [3,10,1000,5000], I think we should define u and d inside the function and compute them with varying N, if using constant u of 1.1, then the option price is varying a lot

    • @AlgoFrenchTrader
      @AlgoFrenchTrader Před 5 měsíci

      Right, u and d are fonctions of the time step value. So : u = exp[sigma * sqrt(T / N)] where N is the time steps number and T the maturity given in years. The expression for d is straightforward.

  • @joshuasmilde5198
    @joshuasmilde5198 Před 7 měsíci

    Legend

  • @tejusrawal3871
    @tejusrawal3871 Před 11 měsíci

  • @tim2138
    @tim2138 Před 5 měsíci

    I dont think you can compare valuation of the same portfolio for different time

  • @lebagnard6018
    @lebagnard6018 Před 2 lety +1

    could we get the trinomial tree ? please ? :D

    • @QuantPy
      @QuantPy  Před 2 lety

      Yes 👍 I’ll make some videos soon