Code Monkey home page Code Monkey logo

optimal-hedging's Introduction

Optimal-Hedging

In this project we implement optimal delta hedging on S&P 500 index options under the industry-famous stochastic volatility model, the SABR model. The SABR model is calibrated on SPX option time series, which is dynamically hedged using SABR delta and Bartlett's delta.

References

Most implementations in this project are based on Bartlett's delta in the SABR model by Hagan and Andrew (2019) and Optimal Delta Hedging by Hull and White (2016).

Scripts

  • data: SPX 500 options data from 2023-02-01 to 2023-02-28 from WRDS
  • papers: a list of papers used for this project
  • presentation: presentation slides for the project
  • sabr_calibration.ipynb: an example of SABR model implementation and calibration
  • optimal_hedging.ipynb: main notebook that calibrates SABR model and optimal delta hedging

Overview

SABR Model

SABR model is a stochastic volatility model given by

$$ \begin{align*} dF(t) &= \sigma(t)(F(t)+\theta)^{\beta}dW_1(t), F(0)=f\\ d\sigma(t) &= \nu\sigma(t)dW_2(t), \sigma(0)=\sigma_0\\ \end{align*} $$

where $W_1(t)$ and $W_2(t)$ are two correlated Wiener processes with correlation $\rho$, namely, $dW_1(t)dW_2(t) = \rho dt$.

  • F: forward rate
  • $\sigma$: volatility of forward rate
  • $\nu$: volatility of volatility (volvol)
  • $\theta$: shift parameter to avoid negative rates

The SABR model gains its popularity due to its ability to capture the volatility smile observed in the market. It is a common practice to set $\beta=0.5$ for interest rate derivatives and $\beta=1$ for equity options.

Optimal Delta Hedging

The SABR delta is given by $$\Delta^{\text{SABR}} = \frac{\partial B}{\partial F} + \frac{\partial B}{\partial \sigma} \frac{\partial \sigma_{\text{imp}}}{\partial F} $$

The Bartlett's delta further incorporates the adjustment for the implied volatility skew

$$\Delta^{\text{Bartlett}} = \frac{\partial B}{\partial F} + \frac{\partial B}{\partial \sigma} \left( \frac{\partial \sigma_{\text{imp}}}{\partial F} + \frac{\partial \sigma_{\text{imp}}}{\partial \sigma} \frac{\rho \alpha}{C(F_t)}\right) $$

Bartlett's delta is the optimal delta for hedging in the SABR model, which can be approximated by $$\Delta^{mod}\approx \Delta^{BS}+\text{Vega}^{BS}\times \eta$$

Hedging Performance Evaluation

In Hull and White (2016), the effectiveness of a hedge is measured by the $Gain$ metric, defined as the percentage reduction in the sum of squared residuals resulting from the hedge, i.e. $$\text{Gain} = 1- \cfrac{\sum(\Delta f - \delta_{\text{SABR}}\Delta S)^2}{\sum(\Delta f - \delta_{\text{BS}}\Delta S)^2}$$

Results

Implied volatility Smile Calibration

BS Delta (Blue), SABR Delta (Red), Bartlett's Delta (Green)

Bartlett's Delta for Different Maturities

Hedging Parameters Evolution

Hedging Gain for Bartlett's Delta

SABR Delta vs. Bartlett's Delta

Short Summary

  • SABR model calibrates the implied volatility smile of SPX 500 options data extremely well.
  • Both SABR delta and Bartlett’s delta are effective in hedging the options, much better than Black-Scholes delta.
  • Bartlett’s delta performs slightly but consistently better than SABR delta.

optimal-hedging's People

Contributors

bradleyboyuyang avatar

Stargazers

Ryan Shen avatar Lubdhak Mondal avatar Guocong Song avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.