Most retail traders use options to bet on direction. Volatility desks trade the gap between implied and realized volatility instead. This article breaks down three institutional algorithms: delta-hedged volatility selling, gamma scalping, and index dispersion, with the edge behind each one, how the algo is built (signal, hedging loop, vega-neutral sizing) and the risk rules that keep you from blowing up.
Antoine
CEO - CodeMarketLabs
2026-11-06
Most people who trade options use them to bet on direction: buy calls if they think the market goes up, buy puts if they think it goes down. On a volatility desk, that is not how it works at all. We trade volatility, not direction. I spent several years in trading rooms, and the three algorithms in this article are part of the infrastructure I built for my own trading. This is not forum material: it is what actually runs on institutional options desks. I will give you the thesis behind each strategy, how the algorithm is built, what you can expect from it, and, just as important, where each one can hurt you.
What this article covers
Why implied volatility sits above realized volatility most of the time, and why that gap is the real edge in options.
The gamma PnL equation: when being long or short gamma makes or loses money.
Algorithm 1: delta-hedged volatility selling, its hedging loop and the risk rules that stop it from blowing up.
Algorithm 2: gamma scalping, a rehedging loop that mechanically sells high and buys back low.
Algorithm 3: index dispersion, a vega-neutral short correlation trade on a basket of stocks.
The single engine behind all three: forecast volatility, take the trade, hedge the Greeks, attribute the PnL.
1. The Common Thesis: Implied Volatility vs Realized Volatility
All three strategies rest on the same investment thesis: capturing the difference between implied volatility and realized volatility. Implied volatility is the volatility baked into the price of options currently quoted on the market. Realized volatility is the volatility you actually experience if you hold the underlying. On indices, implied volatility is, on average, above realized volatility.
A recent example: in the month leading up to the US midterms, the spread between implied and realized widened sharply. Once the results came out, implied volatility started converging back towards what the market had actually realized over the previous 30 days, roughly 2 to 3 points of tightening at the time of recording. A properly delta-hedged short volatility position would have captured exactly that difference in premium.
Why does this gap exist? Because market participants buy options to protect their portfolios. As soon as they start to fear a recession or a regime change, they rush into protection, which inflates option premiums and therefore implied volatility. That structural demand for insurance is what creates the volatility risk premium.
2. Delta, Gamma and the PnL Equation
Delta is the sensitivity of an option's price to a move in the underlying, whether an index or a single stock. Gamma is the sensitivity of that delta to a move in the underlying, in other words the second derivative of the option price with respect to the underlying. The PnL of a delta-hedged option position breaks down into a gamma term that depends on two things: whether you are long or short gamma, and how realized volatility compares with the implied volatility you traded at.
Put simply: if you are long gamma, you make money when the volatility actually realized over the holding period is higher than the implied volatility you paid when buying the options. If you are short gamma, you make money when realized volatility stays well below implied. The three algorithms below are three different ways of playing that equation, in both directions.
To play it cleanly, you need algorithms, because you have to neutralize the direction of the underlying permanently. Delta hedging means buying or selling the underlying stock or index to cancel your directional exposure, so that only the volatility component of the PnL remains. Doing that by hand, around the clock, is not realistic.
3. Algorithm 1: Delta-Hedged Volatility Selling
This is the textbook model. You know realized volatility tends to come in below implied, so you sell straddles or strangles. You are short gamma, and the algorithm continuously buys or sells the underlying to keep the position delta-neutral. If realized stays below implied, you collect the difference: the volatility risk premium, or VRP.
L'edge de la vente de vol : l'implicite au dessus du réalisé, jusqu'au crash.
The build is straightforward. A model analyses the spread between implied and realized volatility and tries to forecast future implied and future realized volatility, for example with econometric models. When the signal reaches a level you consider significant, the algorithm enters the trade, then delta-hedges the whole position continuously.
The critical design choice is when to hedge and when not to. In a perfect model, hedging every millisecond would be ideal. In reality, you pay fees on every order, and over-hedging eats the very premium you are trying to earn. So you set a delta threshold: beyond it, the algorithm fires an order; below it, it waits for a bigger move. The job is to find the sweet spot between hedging often enough to stay neutral and rarely enough to keep costs down.
L'edge de la vente de vol : l'implicite au dessus du réalisé, jusqu'au crash.
4. Selling Volatility Is Not a Free Trade: Risk Rules
Plenty of online videos sell this strategy as easy money. It is not. You are short gamma: you win very often because the thesis holds most of the time, but when it flips, during a crash for instance, you lose a lot because the market runs straight through your strikes. Without strict rules, one bad week can wipe out months of premium.
The rules I use: first, a vega limit relative to portfolio size, so the position is sized by its sensitivity to volatility rather than by notional. Second, a stop loss on the PnL coming from volatility moves. Third, a hard circuit breaker on the algorithm when the VIX explodes above a given level. For example, if the VIX crosses 20, everything is cut immediately and the algo waits for the market to normalize before re-entering.
5. Algorithm 2: Gamma Scalping
Gamma scalping is the exact opposite. You buy options that look cheap relative to the realized volatility you expect. You delta-hedge just the same, but now you collect the gamma PnL: when the market rises, you have to short the underlying, so you sell high; when it falls back, you buy it back, so you buy low. Every move in the market pays you, and the more volatile the market, the more you capture, provided your hedging is close to perfect.
L'edge du gamma scalping : le réalisé bat une vol implicite trop basse.
This is not free either. Being long gamma means your options lose time value, or theta, every single day. Each day with no movement, with very low realized volatility, is a day you lose money. The real question before deploying it: do I expect realized volatility to be high enough for my scalping gains to cover the theta decay plus the fees?
You face the same calibration problem as with volatility selling. The faster you rebalance, the more you pay in fees; the slower you rebalance, the more gamma PnL you leave on the table. The rehedging threshold is where the strategy is won or lost.
L'algo de gamma scalping : une boucle de rehedge qui vend haut et rachète bas.
6. Algorithm 3: Index Dispersion
Dispersion is the strategy I like most, and it has been working very well for several months. It plays the gap between the volatility of an index and the volatility of the stocks that make it up. The volatility of the S&P 500 depends on the volatility of each of its constituents and on the correlation between them.
The thesis: the market often prices in too much correlation between index constituents. Why? Because in a crash, almost every stock re-correlates to 1 and falls at the same time, so investors pay up for index protection. The algorithm therefore sells index volatility and buys the volatility of the constituents. You end up short correlation: if stocks move each in their own direction while the index stays calm, you pocket the difference, and the reverse when everything moves together.
L'edge de la dispersion : les actions s'écartent, l'indice reste calme.
7. Building Dispersion: Basket, Vega-Neutral Sizing, Hedge
On the S&P 500, you obviously will not trade straddles on 500 names. You pick a basket that tracks the index as closely as possible, say 20 to 30 stocks, while keeping the directional divergence from the index as small as you can.
The trap: if you sell 100 percent of the S&P 500 volatility against only 20 or 30 constituents, you end up with a disguised volatility bet, when what you want is a pure correlation bet. So you regress index volatility on the volatilities of the stocks you trade, and only trade the share of stock volatility that explains index volatility. On top of that, the vega of an option on a stock running at 50 percent volatility is nothing like the vega of an index at 15 percent, so you weight the basket and the index short so that total vega is neutral.
The last step is the same as for the first strategy: delta-hedge both the index and the single-stock legs. Once you are delta-hedged and vega-hedged, the only exposure left is the correlation between stocks inside the index. It is the hardest of the three to run with a basket, because staying vega- and delta-neutral at all times is difficult. That is why institutions often implement dispersion through variance swaps, swapping index variance against single-stock variance. The listed options version works, it just takes more care.
L'algo de dispersion : panier, signal, sizing vega neutre, hedge.
8. One Engine for Every Options Strategy
What makes options algo trading efficient is that all three strategies run on the same engine: forecast future volatility on an index or its components, take a long or short volatility position, hedge the relevant Greeks (delta, vega, or both), then monitor which part of the PnL is actually explained by the strategy rather than by moves in the underlying. Build that engine once, and you can run any options strategy by telling the algorithm which Greek to hedge.
To be blunt: unless you are speculating on direction, you have no real way to build an edge on options without this kind of setup. Understanding the principles is the easy part. Running them live is another story: you need clean pricers, proper risk and simulation models, quality options data to backtest over time, and full infrastructure to monitor PnL and trade automatically, day and night, without bugs. A badly managed options book can put you in personal bankruptcy very quickly.
If you already have a strategy, options or not, and want it running automatically with proper PnL and risk monitoring, I code trading algorithms for institutions and I have recently opened that service to individual traders. And if you are still refining your approach and want to ask questions live, a coaching call is the faster route.
Is selling volatility really profitable over time?
On indices, implied volatility has historically sat above realized volatility most of the time, so a delta-hedged short volatility position collects a premium on average. The catch is the tail: in a crash, realized volatility explodes above implied and losses can be large. It is only viable with vega-based sizing, a volatility stop loss and a hard circuit breaker.
What is the difference between volatility selling and gamma scalping?
They are mirror images. Volatility selling is short gamma and earns money when realized volatility stays below implied. Gamma scalping is long gamma and earns money when realized volatility exceeds the implied volatility paid, at the cost of daily theta decay.
How often should a delta hedging algorithm rebalance?
There is no universal answer. Hedging too often eats the edge in fees, hedging too rarely leaves you exposed to direction. Most desks use a delta threshold that triggers an order only beyond a certain exposure, calibrated to the instrument's volatility and transaction costs.
Why is dispersion described as a short correlation trade?
Index volatility depends on constituent volatilities and their correlation. By selling index volatility and buying constituent volatility in vega-neutral proportions, the only remaining exposure is correlation: you win when stocks move independently and lose when they all move together.
Can I run dispersion without variance swaps?
Yes, with listed options on the index and a basket of 20 to 30 constituents. It is harder: you need regression-based weights, vega-neutral sizing and continuous delta hedging on every leg. Institutions often prefer variance swaps because they deliver cleaner exposure.
Do I need a full infrastructure to run these strategies?
To run them seriously, yes. You need reliable pricers, quality historical options data for backtesting, risk and simulation models, automated execution and live PnL attribution. Without that, you cannot tell whether your PnL comes from the strategy or from luck on the underlying.