Researching impact of delta hedging with Python

Researching impact of delta hedging with Python

One of the things which I found confusing at first with options, is the fact that lots of the folks trading them, don't really have a view about whether the spot price will go up and down. They are basically trading the volatility parameter from options pricing models (Emanuel Derman explains the point about trading parameter much better than me here and also here).

One of the most common volatility trading strategies is selling volatility to collect the volatility risk premium. The rationale is that generally volatility used to price the option ends up being higher than the future realized volatility. This differential is known as the volatility risk premium. Typically, this involves selling a straddle. If the price doesn't move that much, happy days, and you pick up the option premium! The problem is when you have large directional moves, you'll be subject to large drawdowns... But what about delta hedging? If we're short a straddle, delta hedging would involve buying spot as it climbs higher, and conversely selling spot if it goes lower. So at least for large directional moves (admittedly with slippage), we'd be able to limit our losses somewhat.

In order to test this idea on some real data, I've done an FX options backtest. It can be extremely fiddly to do FX options backtests. First you need to download all the market data. Then you have to create a total returns time series, repricing the options at every point, working out expiry dates and so on. Then you need to work out a trading filter etc.

To make things much easier, I'll be using my open source Python finmarketpy library (get it from GitHub) for selling short dated straddles in EURUSD and USDJPY, which are repeatedly rolled at expiry. I've included transaction costs since 2007 and I've reported monthly P&L below...

To read the rest of the article on the Cuemacro website, please click here!

Very nice work! Hope I can give your Lib a try in the near future 👍

Like
Reply

There's lots of further work to do on this, but the point is that historically delta hedging can help mitigate the large directional moves (to some extent) you might see with short gamma strategies. Given the nature of the strategy, it is difficult to eliminate all large drawdowns (cf. long FX carry). There are many details to sort out though with such a strategy, in particular working out more optimal ways to delta hedge (in presence of transaction costs) and also thinking about ways to filter the option strategy (ie. so it is not persistently short gamma).

Like
Reply

To view or add a comment, sign in

More articles by Saeed Amen

  • Neudata London March 2026

    A decade ago, I liked burgers, and a decade on, well, I still like burgers. However, one thing that has changed greatly…

    4 Comments
  • It's five to eleven

    Whenever I travel somewhere, I like to read books about the place I'm visiting. It helps in way to provide some context…

    3 Comments
  • TradeTech FX USA 2026

    Over recent years, the finance community in Miami has grown, given that a number of hedge funds have opened up large…

    1 Comment
  • AI coding is like making a burger with sugar

    Have you ever had a burger, and then noticed something is kind of off. You’re hunting for the reason.

    3 Comments
  • Hundreds of quant papers from #QuantLinkADay in 2025

    I tweet a lot (from @saeedamenfx and at BlueSky at @saeedamenfx.bsky.

  • QuantMinds London 2025

    "Are you on mute?" is perhaps the most succinct catchphrase which most comprehensively describes the post-covid…

    5 Comments
  • What would you have said?

    I recently went back to Imperial College. Whilst, I've been back many times since I graduated, this was the first time…

    8 Comments
  • Quant Strats London 2025

    Quant Strats has been a feature of the quant calendar for a number of years. I went to my first event recently after a…

    2 Comments
  • WBS Training Palermo Conference 2025

    Italy is made up of twenty regions, each of which is very different from another, from Veneto to Lazio to Puglia. Two…

    1 Comment
  • Gelato and accurate financial data

    I've been subscribing to the FT for many years. Primarily, I read it to keep track of financial markets.

    1 Comment

Others also viewed

Explore content categories