Option chains and trading class

hi Brian, all,

I am collecting option chains from IB using collect_ibkr_option_chains.

For some liquid European equity index options (ESTX50, DAX), I only get one trading class, rather than all options.

For reference, when using ib-insync, I get the following:

| exchange | underlyingConId | tradingClass | multiplier |
| EUREX | 4356500 | OESX | 10 |
| EUREX | 4356500 | OEXP | 10 |
| | | | |
| | | | |
| exchange | underlyingConId | tradingClass | multiplier |
| EUREX | 825711 | ODAX | 5 |
| EUREX | 825711 | ODXS | 1 |
| EUREX | 825711 | ODAP | 5 |

With collect_ibkr_option_chains, for DAX, I only get ODXS, multiplier 1. This is the least liquid and least interesting one.

In the absence of tradingClass as an argument for collect_ibkr_option_chains, I don't see any way around this.

Any thoughts?

Thanks,
Arto

Thank you for reporting this.

Internally while collecting option chains, QuantRocket is keying by underlying and multiplier, when it should be keying by underlying and trading class. This causes the problem you’re seeing with DAX and ESTX50 because they have multiple trading classes with the same multiplier. (My test results differ a little from your reported results in that I get results for ODXS with multiplier 1 plus one of ODAP or ODAX with multiplier 5, i.e. I get 2 of 3 trading classes rather than 1 of 3.)

This is a straightforward fix, and I’ve gone ahead and backported the fix to the current release (and it will also be included in the next release). Assuming you’re on the latest version of QuantRocket (2.10.1), you can access the fix by pulling the quantrocket/master image and redeploying it, like this:

docker compose pull master
docker compose up -d master 

And try to collect the option chains again.

hi Brian,
thank you for the quick response and impressively quick fix. I've been running the new collect function over the last day, and it seems to pull in lots more data. I'll validate the results in the next day or two.

thanks again,
Arto