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 👍
John-David Seelig
Ilya Varlakhin
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).