Sergei Perfiliev Profile picture
Feb 3 54 tweets 14 min read
Are you tired from constantly living in the dark, fully unaware of the current Gamma Exposure?

Are you frustrated from having to guess the Zero Gamma level ALL THE TIME?

Are you annoyed from not knowing what the f*ck all of this even means!?!

I know, I was.

👇
Hello, my name is Sergei.

And today, I'll show you how YOU can change YOUR life, once and forever!

After this 10-minute tutorial, you'll be able to take full control of your gamma needs and live the life YOU want.

Impress your boss, colleagues, friends, spouse, children, dog!
By the end of this thread, you will be able to:

• Create a simple spot gamma chart for your favourite stock index.
• Compute its total gamma exposure.
• Construct a sleek-looking gamma profile chart 😎
• Calculate a Zero Gamma level (aka Flip Gamma).

🔥 !! AND !! 🔥

👇👇👇
• UNDERSTAND WHAT ALL OF THIS MEANS!!!11

😲

Now, I know what you're thinking:

"Oh Sergei, it sounds too good to be true!"

"We'll probably need an expensive Bloomberg Terminal for that!"

"And some premium exchange options data..."

"And a powerful quantum computer!"

Right?
NO!

WRONG!

We will calculate gamma exposure using simple tools that you can find around the house!

That's right!

So put that Bloomberg Terminal away and get your power tools out! 🧮

It's time to do some maths!
First of all - if you feel like refreshing your understanding of gamma and how it impacts the market, you can take a look at this non-technical thread below 👇

In this thread, we'll finally get our hands (and minds) dirty and talk about the calculations behind those charts.

Let's start by constructing a simple spot gamma visualizer tool 🔥

For that, we'll need:
• A cup of coffee ☕️
• Some options data
• Excel
Since coffee and Excel are easy to come by, let's talk about the options data.

At the most basic level, we'll need the standard option chain stuff, like strikes, expiries and open interest (OI).

But we'll also need to get our hands on the unit gamma for each option.
And gamma is a bit more challenging to find.

Sometimes it's provided on the option chain, along with implied volatility (IV) and deltas.

But it could be that it's not offered for your specific asset, and you'll need to calculate it manually.
If that's the case for you - keep reading, as we'll be calculating gammas later on anyway 🤓

For the rest of the thread, I'll use $SPX index as an example.

Luckily, for US stocks, @CBOE provides an excellent options data tool, which includes gamma, among other things.
This is available here 👇
cboe.com/delayed_quotes

Search for "SPX" -> click on Options tab -> set Options Range == All -> set Expiration == All -> click View Chain.

To download the entire options chain, scroll all the way down, and click on Download CSV.
We now have an entire snapshot of the SPX options data in Excel.

Fantastic! Well done!

I think we all deserve a break now.

*slurp* ☕️

While we're enjoying the coffee, a couple of words about this data.
First, note that the open interest figures are updated once per day.

Almost always, this will be yesterday's data.

Nonetheless, I found that CBOE updates it earlier than other sources and frequently shows yesterday's data, while the rest show OI from the day before.
Secondly, this data is best served fresh 🥦

It's better to download it during market hours, as overnight data from the last close can be a bit noisy.

I had trouble replicating some gamma values obtained after the close.

Alright, break over.

Back to Excel.
We want to find out two things:
• How much gamma the dealers are sitting on across the index levels, and
• What's their current total gamma exposure.

For these calculations, ideally, we need to know how many of each particular option the dealers hold.
Unfortunately, they're a secretive bunch and keep their cards close to their chest 🤫

Hence, we need to make an assumption about that.

A crude approximation is that the dealers are long the calls and short the puts, which is true to some expend on an index level.
For single-stocks, it's more debatable, as the street can be short the calls due to some speculative buying frenzy.

*cough* Telsa *cough*

It is possible to build up a more accurate dealer positioning picture from trade reporting data, however, it's not for the faint-hearted.
So, we'll assume that calls carry positive gamma and puts negative.

Let's now calculate the total gamma contribution from each option.

The formula is:

Option's Gamma * Contract Size * Open Interest * Spot Price * (-1 if puts)
This gives the total option's gamma per ONE POINT move in the index.

To convert into percent, we must multiply by how many points 1% is.

Hence, we multiply by 1% * Spot Price, giving the final formula:

Option's Gamma * Contract Size * Open Interest * Spot Price ^ 2 * 0.01
Summing gamma contributions across the options gives us the total gamma exposure.

Doing this in Excel for 1 Feb 2022 gives me -$19Bn.

In plain English:

Option dealers need to SELL $19Bn worth of $SPX index for each 1% move DOWN, and BUY $19Bn for each 1% move UP.

#shortgamma
Frequently the gamma exposure is an overstatement, and the actual delta-hedging flows are typically smaller than this calculation would imply.

This is because investors:
• Also sell puts for yield (structured products)
• Buy calls for leverage
• Trade spreads and combos
So that's something to keep in mind.

Let's now look at how gamma exposure is distributed across strikes and expiries.

Select the area with the headings and the data and click on Insert -> Pivot Table.

Ehmmm.... what are you waiting for?

Go on! You can do this one 💪
Pivot Table allows us to easily aggregate the gamma values for a range of strikes and expiries.

Under PivotTable Fields, drag-and-drop Strike into the Rows and drag Total Gamma into Values.

This will give you a total gamma exposure per strike!
If you now click on the Pivot Table Analyse tab -> Pivot Chart, you'll get an excellent visualisation.

This chart shows how much gamma is outstanding at each strike from the point of view of the current spot.

This is why it's called spot gamma exposure.
Each bar represents how much delta needs to be bought or sold if the market moves by 1% from where it is now.
And the beauty of the Pivot Table is that you can effortlessly slice and dice the data any way you want.

Want to see the largest gamma expiries?

No problem -> remove the Strikes from Rows and add Expiration Date instead.

Boom! 🎇
Want to see gamma for calls and puts separately?

Replace Total Gamma with Put Gamma and Call Gamma and put the Strike back in place of Expiration Date.

Boom! 🎇
I know, I know - MIND BLOWN! 🤯

But that's NOT all, folks!

We were only getting warmed up for what lies ahead!

Are you ready?
So far, we calculated the gamma exposure for the current spot level only.

But what if we wanted to know an approximate gamma exposure if the market drops by 10%?

Or how about if it rallies by 10%?

Would the dealers be short or long gamma, and at what point would it flip?
This is a slightly more complex question since we must compute the gamma exposure not just for the current spot but across the index levels.

As in, we need to do that Excel calculation for different spot values.

Well, that's great news - we already know how to do that!
Yeah... there is just one tiny problem....

When we change the spot, options gammas will change.

This means we can no longer use the same gammas so thoughtfully provided by CBOE.

Those have to be recalculated.

For every option.

For every spot price 😐
And while it's possible to do it in Excel, it's a bit of an overkill...

It's time to dig into your toolbox and pull out some Python.

So how do we go about that?

Allow me to demonstrate.
I want you to meet my little friend.

This is a 4,000 put option, expiring on 18 Feb.

(Sorry, he's a little shy...)

Using a Black-Scholes formula, we can calculate its gamma since we have most of the ingredients we need.
The CBOE data provides strikes, expiries and, most importantly, IV levels for each option.

We'll use those.

We also need to source the interest rate data (ideally swap rates) and a projected dividend yield.

I leave this as an exercise for the reader (Muahahahaha!!!)
In this example, we'll set rates and divs to zero (or to 1.5-2% to be closer to the current levels for $SPX).

Although, they don't really impact the final figures that much.

A billion here, a billion there, not a big deal...

Blame it on the rounding error.
Let's come back to our 4,000 put.

Hi there! 👋

So for this option, we do the following:
• Download its data into Python.
• Apply the Black-Scholes and calculate unit gamma for a range of spot levels.
• Using unit gamma, calculate the total gamma exposure at each spot price.
This gives us the following chart 👇

It shows the gamma exposure at each spot level resulting from this single option.

As expected, it's lowest at the strike, and its gamma impact diminishes as we move closer to the current spot.
Ok, how about we add a few more in the mix?

Enter 4,800 call...

Wow, she's absolutely gorgeous!

Sexy little thing...

She gives you hope, but at the same time, keeps you at a distance.

She loves to tease...
Sorry, where was I?

Ah right. Now we have the gamma exposure for two options.

As you can see, they have their own sphere of influence, sometimes offsetting each other.

If we add them, we'll net out their impacts and get the overall gamma exposure 👇
Let's now throw in 4,300 put and 4,600 call 👇
As we keep adding more options, we get a more complete picture of the gamma exposure for this expiration. 👇
To get the overall gamma exposure profile, we'll need to do this exercise for all options across all expiries.

And if we do that, we'll get the following chart!

*drumroll*

👇
Ta-da!

You might have seen this kind of chart before.

It shows an approximate amount of dealer hedging flows across index levels, assuming the current state of the world.

Short gamma to the left.

Long gamma to the right.
Two levels are notable on this chart.

The first one is where the Total Gamma Exposure blue line crosses the current spot red line.

This point represents the current spot gamma exposure and occurs at around -$19Bn.

Yes, the same -$19Bn that we calculated earlier in Excel! 🤝
The second level is where the Total Gamma Exposure blue line crosses zero.

On the chart, it occurs at around 4,575 SPX level.

This is the Zero Gamma point, where the dealer gamma exposure flips from positive to negative.
Above this level, dealer hedging flows are stabilizing and add liquidity to the market.

Below this level, dealer hedging flows are destabilizing and add to the volatility instead.

At this level, flows are zero, as delta doesn't need rebalancing due to spot moves.
And now...

The moment we've all been waiting for!

The star of the show! 📽️

The one and only!

Please welcome!

The Python script that generates the gamma profile!

*applause* 👏
Well, unfortunately I can't embed the Python code into the Twitter thread.

But you can find the code to generate the above charts at the bottom of the blog post version of this thread:

👇
perfiliev.co.uk/market-comment…
All you need to do is:

Download the "quotedata.csv" file from CBOE for whatever index you want.

Put it in the same directory as the script.

Run it.

And sit back and relax 🎶🎷

Let the script do it all for you.

Easy.

For example, do you want some gamma for $NDX?

Voila! 👇
Russel 2000?

Bam! 👇

You can also adapt the script and feed your data into it, or change any of the inputs or assumptions 👍
Thanks for reading, and I hope it was helpful!

Do you want to see more threads like this one?

Consider supporting us and help us create even more awesome content!

👉 perfiliev.com/support

Without a source of income, your help makes a tremendous difference at the moment! 🙏
Also, follow me (@perfiliev) for more educational threads around stocks, options and other topics within financial markets.

In case you enjoy watching videos, I'd like to invite you to my YouTube channel, where I also cover various financial topics:
youtube.com/c/PerfilievFin…
TL;DR:
• Spot Gamma shows the gamma exposure at the current spot level.
• Gamma Exposure for an Option = Option's Gamma * Contract Size * Open Interest * Spot Price ^ 2 * 0.01
• To find total gamma exposure, sum up the above formula across strikes and expiries.
• To calculate the Zero Gamma level:
• For each spot price, calculate the gamma contributions from every option outstanding and sum them up.
• That gives the total gamma at that level.
• Do that across the spot levels and check where the line crosses zero.

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Sergei Perfiliev

Sergei Perfiliev Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @perfiliev

Jan 21
Yesterday, many noticed that @squeezemetrics's GEX index hit an all-time low.

Lowest reading ever.

Since GEX measures gamma exposure, a low value implies the dealer's delta is less sensitive to index moves.

However, why would this be a bullish signal?
This is something I tried to understand, so here are some thoughts behind this.

Historically, a very low GEX has indeed been a short-term bullish signal.

This can be seen even from visually observing the chart on dix.sqzme.co
The low points of the GEX coincide with SPX moving higher shortly after.

Important to note is that low values also coincide with a selloff in the index shortly before.

It makes sense as we move from the positive-gamma dealer-long-call region into the negative-gamma price range.
Read 11 tweets
Jan 13
TO ALL EQUITY PMs:

YOU MAY NOT BE INTERESTED IN OPTIONS, BUT OPTIONS ARE INTERESTED IN YOU!

$SPX options make up 16% of the $SPX market cap!

Options gamma is one of the most significant structural flows within the equity markets.

Let's explore how it impacts your business 👇 Image
Options are often linked to insurance.

And many times, rightfully so.

They can help protect your portfolio when the sky is grey, and the rain washes down your hard-earned gains.

However, there's a key and vital difference.
Traditional insurance business typically uses diversification as a risk-management tool.

The exposure to any single adverse event can be hedged by insuring other adverse events that fail to materialize.

With enough uncorrelated bets, it's possible to achieve a positive return.
Read 37 tweets
Jan 5
Wait, wait! Hold on!

Yes, #JHEQX. Again. I know.

But sorry, over the last few days I was very... busy... 🍷🎄

And looking into the #JHEQX roll, I can't say that I fully understand it.

(and based on the discussions, it looks like I'm not alone...)

Let's see what happened 👇
The trade sparked many heated conversations on Twitter, with everyone trying to understand what exactly will be its impact.

Some argued that there's a huge delta to buy, which might move the markets.

Others claimed that it's all been priced in already, and no money can be made.
What I want to understand is:

• Was there a huge delta to buy?
• If there was, why was the market down on 31 Dec?
• If there wasn't, why?
• If it's priced in, then how?
• What mechanics allowed #JHEQX to alleviate the market impact?

Read 30 tweets
Nov 26, 2021
The media seems to attribute the current sell-off to new Covid variant.

However, I'm curious how much of the sell-off is actually due to Covid and how much is due to a less dovish Fed, as there were news that Fed might double its tapering and raise rates quicker than expected.
If the market is indeed falling due to a new variant, in my opinion, the impact might be limited.

Even if this variant is more serious than earlier ones, it's very unlikely it will have the same worldwide economic impact as the original coronavirus pandemic in March 2020.
The world has been living with Covid and we all know the drill by now.

If anything, an argument can be made that Covid is good for stocks, as $SPX more than doubled since its Covid lows.

A new variant can give Fed an excuse to carry on with QE and keep the BTFD mentality alive.
Read 4 tweets
Nov 17, 2021
Looking at Nokia, I noticed there's a non-trivial open interest sitting at January 10-strike call:

327,961 contracts.

This is the largest OI across Nokia options.

With $NOK trading at $5.68, the option is quite deep OTM, and its gamma impact is muted...

Unless... Image
Unless $NOK rises and wakes up the sleeping beauty 🙂

How many shares would market makers need to buy to delta hedge this option?

Let's completely ignore any call overwriting and assume that OI is held long by investors and short by market-makers (a bold assumption, I know).
If dealers are short this option, they need to buy $NOK in order to delta hedge.

At the moment, this option's delta is ~0.05.

If (and only if) on 21 Jan 2022, $NOK closes just above $10, its delta will become 1.
Read 20 tweets
Nov 8, 2021
Hello and welcome!

Every now and then, I write educational threads about trading, investing and other exciting topics within the financial markets 📈📉

Have a look at the most interesting and popular threads below 🧵👇 Image
If you like them, you can also follow me (@perfiliev) to make sure you won't miss the next one 😉
Read 6 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

:(