What is Delta Hedging || Dynamic Delta Hedging like a Quant || Profit & Loss Options Trading

Sdílet
Vložit
  • čas přidán 28. 06. 2024
  • Today we look at hedging options from a quant’s perspective. In this video we look at the difference in Profit and Loss (P&L) with three different strategies: dynamic delta hedging, static delta hedging and no delta hedging.
    Delta hedging is a way to reduce directional risk of the underlying to your options positions by transacting in the money markets (bank account) and the underlying (stocks/futures/etfs/index). By continually adjusting in the underlying and bank account, we can effectively replicate the changes in payoff of the ‘new’ option contract. Essentially instead of betting on the direction at one time spot (on entry) we are now making a series of bets at different levels.
    Hopefully in this video the importance and relevance of realized volatility becomes apparent and hence why market marking firms like Optiver are so keen on forecasting realized volatility as accurately as possible.
    ★ ★ Code Available on GitHub ★ ★
    GitHub: github.com/TheQuantPy
    Specific Tutorial Link: github.com/TheQuantPy/youtube...
    00:00 Intro
    00:22 What is Delta Hedging?
    01:40 Importance of Realized Volatility
    02:00 Real world examples
    03:56 Full worked example: Short CBA Nov 102 Call
    06:40 Looking at P&L over 1000 trades
    07:45 P&L distributions for different hedging strategies
    Introduction to financial markets and instruments - Kaggle edition: / @optiverglobal
    Optiver Realized Volatility Kaggle Challenge: www.kaggle.com/c/optiver-real...
    ★ ★ 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 • 49

  • @deepdivestocks
    @deepdivestocks Před 2 lety +3

    Fantastic recap of hedging and its applicability in real-world trading.

  • @bbqchickenlemon
    @bbqchickenlemon Před 2 lety +17

    you've taught me more than my prof with a PHD ever could

    • @dzi333
      @dzi333 Před 2 lety

      Well this is actually very well explained in the literature of the subject, like Natenberg.

  • @kaiwang2924
    @kaiwang2924 Před rokem

    Thanks for the excellent video, you make it so easy to understand!

  • @christianhjerrildblom5972

    Your videos are amazing, I'm currently doing a Bsc in mathematical finance and these videos are so inspiring to me. Keep up the good work!

  • @alexandert6172
    @alexandert6172 Před 7 měsíci +1

    Briliant explanation

  • @pzhangd
    @pzhangd Před měsícem

    THanks, I learned a lot

  • @IStillHaveDialUp
    @IStillHaveDialUp Před 9 měsíci

    Another great video

  • @vwedeagboro-jimoh6556
    @vwedeagboro-jimoh6556 Před 2 lety

    This is mint!

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

    awesome

  • @Lukas-cm2b
    @Lukas-cm2b Před rokem +1

    you made it look very easy that with hedging you almost not lose any money eg the low P5, but if the price dips 50% then your long shares are in 50% loss so i am not really sure about that profit distributions.

  • @ghostwhowalks5623
    @ghostwhowalks5623 Před rokem +1

    This is super-useful! Silly Q - how do you control the change the hedge frequency from say monthly to weekly (daily etc.).....do you keep the number of steps constant and only change the time step; "dt"? Thanks!

  • @fminc
    @fminc Před 2 lety

    Thanks for your work, great channel. (ha ha ha, you slipped when you explained the short at 1:30, but thats all good, well explained as such).

  • @olivermohr417
    @olivermohr417 Před rokem +2

    How do you model the delta in your simulation? You can simulate a random walk with a previously set volatility, but then you need market volatility to calculate the delta on each step. Which vol do you use there?

  • @Freewill888
    @Freewill888 Před rokem

    Hi Jonathan, I happen to find your channel and would like to know whether you upload a video subsequent to understand market maker to explain how they predict the realized volatility. If you do can you let me know which video is it? Thanks!

  • @wetradealerts2594
    @wetradealerts2594 Před 11 měsíci +2

    Hey! I have a question. On your code, the number of weeks is set to 11. The option had an expiry of appx 2 months and you had converted that to years and divided by 11 to get each time step. My question is, if i take smaller time steps and delta hedged, lets say instead of 11, I delta hedged every day, lets say instead of 11, i put 100. Will the P/L distribution of delta hedge flatten out and be close to 0 ?

  • @poorbadger
    @poorbadger Před rokem +1

    How were you calculating P5, P95, mean - via Monte Carlos Analysis?

  • @martinluther3712
    @martinluther3712 Před rokem

    Hi, could someone tell me the name of the chair you use?

  • @yassinetac6646
    @yassinetac6646 Před 2 lety

    Hi thanks a lot for the very useful content. I am considering studying a certificate in it quant operations and it is a lot about making a Python api bot to automatiquely rebalance hedging. My question is:how do banks make money from that? What can be the monthly or annual outcome of using dynamic hedging? Thanks

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

      did you end up getting the certificate, or create the api. Cheers from a year ago haha

  • @maurohalpern
    @maurohalpern Před 4 měsíci

    I am just buying low volatility and selling hi volatilty at same time using different stocks of a list.....very profitable; for me makes more sense "hedging" each leg of my cheap options with expensive ones, not using the stock itself

  • @carrotblog1746
    @carrotblog1746 Před 2 lety +3

    set the speed to 0.75 is much better :))

  • @_el_yeyo
    @_el_yeyo Před 2 lety +2

    I assume the simulations are based on Black Scholes for the profit calculations?

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

      Yes apologies if I didn’t make that clear, but feel free to adapt the code with whatever mode you want.

  • @junchenggeng2949
    @junchenggeng2949 Před rokem +1

    when you calculated the original stock pnl, why is 102.59-102 instead of 102.69-102 @5:59

  • @josephwehby9313
    @josephwehby9313 Před 2 lety +2

    Is there an advantage or disadvantage to rebalancing your deltas daily versus weekly?

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

      I'll point you in the right direction here, as I can't give financial advice. You'll be interested to know that there are a number of studies that show that fixed time discrete delta hedging (day/week) is suboptimal.
      Recommend jumping on Google Scholar and reading 'A Note on Hedging: Restricted
      but Optimal Delta Hedging,
      Mean, Variance, Jumps,
      Stochastic Volatility, and Costs' by Hyungsok Ahn and Paul Wilmott (2009).

    • @josephwehby9313
      @josephwehby9313 Před 2 lety +2

      @@QuantPy thank you. I’ll check it out. Keep up the great content

  • @junwang0525
    @junwang0525 Před rokem

    what if a stock is paying dividend

  • @mathieusaussez7345
    @mathieusaussez7345 Před 2 měsíci

    Short selling is you sell when the price is high to buy it low

  • @investwithvincent6329
    @investwithvincent6329 Před 2 lety

    as per row 1, what's the formula to get "3" ?

    • @investwithvincent6329
      @investwithvincent6329 Před 2 lety

      ok... i see that 3 represents the change from the delta value in row 1 to row 2 and so fourth

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

    Can you help me understand what Is p5 and p95 ?
    Thank you great work 👍

    • @QuantPy
      @QuantPy  Před 2 lety

      No problem, glad you enjoy the videos.
      I’m just referring to percentiles of a distribution. In this case p5 is 5th percentile and p95 is 95th percentile.
      Think of it in terms of a ranked list of values.

  • @investwithvincent6329
    @investwithvincent6329 Před 2 lety

    as per row 1, what's the formula to get "1.16" ?

    • @QuantPy
      @QuantPy  Před 2 lety

      Please refer to code on my website.
      Link in description 👍

  • @MrLisaFischer
    @MrLisaFischer Před rokem

    Oh lord, why do I find Option trading so difficult. Where can I obtain introductory lessons on Options trading, all that Gamma and stuff😵

  • @janegoodall1837
    @janegoodall1837 Před 8 měsíci

    At 4:28 you state you have to immediately buy 54 shares to be delta neutral. But The very first adjustment you make in week 1 is entering a short position making the account -3 of the stock? But if you bought 54 shares immediately when you sold the call, wouldn't you still be long 51 shares of the stock?
    If the delta changes by 3 week 1. Then how come when you start with 54 shares its not 54 - 3, but 0 - 3?

    • @QuantPy
      @QuantPy  Před 8 měsíci +1

      You are exactly right. When we first entered the position (Short Call), we had a delta of -54, therefore we also bought 54 shares to offset this directional risk.
      In the table you are referring to there, I am only showing the adjustment process so we can calculate, adjustment cashflow and interest on adjustment separately to the initial positions we put on. You can then add the ending results of the Short Call and initial 54 shares purchased back in at the end to get the final PnL. That is what I showed here.
      Hopefully that's clear, if not I encourage you to read Option Volatility & Pricing by Sheldon Natenberg

  • @strawberrymilk836
    @strawberrymilk836 Před 10 měsíci

    The code doesn't work anymore

  • @defface777
    @defface777 Před 8 měsíci +1

    Gamma scalping...

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

    Assuming you sell a call(short) and at the same time you delta hedge it with stock. if the stock price drop say significantly, do you keep the premium at expiration or will the hedge offset the premium and you end up with 0 impact ?

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

      Please watch the video all the way to the end, I attempt to explain the difference in hedging strategies. What you’ve described is a static hedge.

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

      @@QuantPy I watched the video till the end. Assuming IV does not change and ignoring the interest, will the call writer collect the premium at expiration assuming the stock price drop by more than the primium collected? Logically no as the stock purchased will lose value and offset the the premium collected. I would like to confirm if my understanding is correct. Thank you in advance.

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

      In summary, it’s probabilistic.
      In the video I show the Monte Carlo like analysis of the different PnL outcomes that can occur. If you statically hedge once, there are definitely scenarios as you’ve described if you write a call, and buy the stock, if the price goes down dramatically you can lose you entire premium.
      However the edge is, over a large number of trades using delta hedging your premium (that you’ve collected at IV) if there is a positive difference between realised and implied volatility then you decrease your variance around your expected value.

  • @esmailpirasteh3098
    @esmailpirasteh3098 Před 3 měsíci

    Lost me on the second put option example

  • @tcurson1
    @tcurson1 Před 2 lety

    It may have been better to use underlyings with better liquidity, like the S&P500 ETF. Also if you sell a call then buy 50 shares, then the market goes up a ton in a week, buying the x shares to delta hedge, then having the market go down, etc is just locking in loads of losses. At this point just sell a call against your short put

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

      Thanks for your comment. By delta hedging you’re offsetting the changes in the price of the option with respect to the underlying. And yes, you can also do this by offsetting delta changes by buying/selling other derivatives

  • @Footprints1111
    @Footprints1111 Před rokem

    It’s just another strain of Corona. 😂