r/quant 1d ago

Tools What do you think of the way I'm calculating liquidity on my options legs from NBBO prices?

This is part of a project I started yesterday for a box spread scanner, I need to calculate the liquidity on each leg to rank the entire box spread amongst multiple pairs, so here's what I'm doing is:

Say an option with ask: $92 and bid: $90 and ask_size: 15 and bid_size: 20

Get the mid and spread first

1. Mid = ask + bid/2 = 92+90/2 = $91 and Spread = ask-bid = $2

Calculate the relative spread in bps by dividing spread over mid and multiplying by 100
2. realtive_spread_bps = spread/mid = 2/91 * 100= ~220 bps

Take 10,000 and divide by the relative spread, (+1 is in case of 0)

3. 10,000/ (relative_spread_bps +1) = 10,000/220 = 45
Total size is bid+ ask size

4. total_size = bid_size+ ask_size = 15 + 20 = 35

5. size_score = min(35, 10,000) = 35

Get liquidity from spread score and size score

6. liquidity = spread_score * size_score = 45 * 35 = 1,575

Here's a gist from my codebase: https://gist.github.com/Eyob94/767af6f6216db1bdc5b3e021cb5d26da

Update:

The options are constituents of a box spread, for those who're not aware, a box spread is basically a 4 leg option combo that you can use to lend or borrow money at fixed rates close to the SOFR and has a few other benefits compared to a regular bank loan, SBLOC or margin loan. You can search up about them or check boxpsreads.io as well.

For those who're mentioning delta should be part of the equation, the reason I'm pushing back is because for every strike you'd buy/sell both the call and the put, effectively netting a 1 or -1 delta, will delta still be beneficial then?

Upvotes

18 comments sorted by

u/Puzzleheaded_Use_814 1d ago

It's quite bad... first because you are not scaling numbers properly, what makes you think 10,000 and 35 are comparable? How many times the min is dominated by left term versus right term?

Also, 1 option is not a comparable unit between different instruments, you need to sum the delta in USD or USD*vol, otherwise how can you compare 2 stocks with different price value?

u/Eyoba_19 1d ago

Chill bro. This is a box spread, so it’s only for SPX. As for the 10,000 number it’s to have a higher range for tighter spreads and larger amounts

u/Puzzleheaded_Use_814 1d ago

Even for 1 instrument it's a bad metric, because 100 options at 0.01 delta is completely different from 100 options at 0.5 delta.

u/Eyoba_19 1d ago

Ok that I didn’t know, could you please elaborate or point to where I can read more about it?

u/Puzzleheaded_Use_814 1d ago

You can look into Black-Scholes model, what is delta etc... on google or ask the AI agent.

1 option at 0.01 has basically the same risk as 1% of a share while 1 option at 0.5 has 50% of the risk.

So effectively it means the liquidity of high delta options is boosted compared to low delta options.

u/Eyoba_19 1d ago

I know what the greeks are, I meant how they affect liquidity though.

An option with 0.01 delta could have much more liquidity cause it’s a support line or a gex point or sth, 7000 call probably has more liquidity than 7450 even though the delta is lower, that only tells you there’s more open interest at that strike.

Is there sth else, you were referring how a delta affects liquidity or fill chance?

u/Puzzleheaded_Use_814 1d ago

They affect liquidity because you need more of low delta option for the same exposure.

If you want to make the same money, you need to buy more options with low delta options. So basically you need to discount the number.

100 options at 0.1 delta represent 10 shares in terms of risk, while 100 options at strike 0.5 represent 50.

That is exactly what liquidity is: are you easily finding the counterparty for a certain risk?

if you want 20 shares of exposure on option you will be able in the case of 0.5 delta but not 0.01, which means at same bid/ask quantity one is actually more liquid.

u/Eyoba_19 1d ago

You’re referring to delta exposure, I’m referring to 2 options with the same underlying at different strikes and I have their NBBO prices, how can I determine one is more liquid than the other and likely to get filled, I’m not buying more options because of their delta, only 1, this is a box spread, not a delta hedge strategy

u/Puzzleheaded_Use_814 1d ago

Ok, then you can do something like:

  • Take the spread on the option
  • Assume the spread is constant and you get filled once your order at mid has been executed (which means price of option has moved by 0.5 spread in against your order)
  • You can take simple model like Black-Scholes and compute what is the probability of the option price moving of 0.5 spread in your direction in let's say 10 min or 1 hour, this is your probability of getting filled. (Again here delta is relevant as you can likely assume most of the move of each leg is driven by the delta, which translates to option with higher delta moving more and having more chance of getting filled for the same spread value in ticks of the S&P)

u/Eyoba_19 1d ago

I see, I’ll try this one, appreciate it man

u/Puzzleheaded_Use_814 1d ago

If you want a good metric maybe you can do this:

  • delta at bid/ask
  • Spread in bps
  • find the ratio of order of magnitude between median spread and median delta?
  • Do min(spread, ratio* delta) or the average between the 2 instead of min.

u/NatGaz 22h ago

Why do you look at the spread in bps and not in ticks (genuine question) ? I'm bad at options.

If Option1 has a BBO 1.5 / 1.6 and Option2 has a BBO 3.1 / 3.2 (same underlying let's say), Option1 seems more valuable than Option2 ? Because at the end, you will delta-hedge and then balance/manage in a smart way the Gamma of the book, I don't get why Option1 should be prefered.

u/Eyoba_19 1d ago

I’m still not convinced on how a delta has anything to do with the liquidity of an option bro, would love if you can explain that to me

u/NatGaz 22h ago

Let's say delta is 5% or 10%. How much would you quote ?

u/Eyoba_19 4h ago

So, I think I should've explained a bit about box spreads at first, but the issue is that for every strike you buy both the call and the put, so the delta is effectively 1 or -1

u/DidYouTrainNeckToday 22h ago

“Mid = ask + bid/2”

u/Eyoba_19 22h ago

?

u/DidYouTrainNeckToday 22h ago

Do you know what parentheses are?