Hi All,

As I work through with OptionChainProvider, it provides a lot more flexibility to add specific contracts, rather than the broad universe provided by AddOption and SetFilter. It has a marked effect on the speed (and in fact lets me test much longer algorithms before timing out due to spending more than 10 minutes in a timestep.)

I'm learning that, even though OptionChainProvider lets you use RemoveSecurity, ever having had those securities in the universe seems to slow things down progressively over time.

Accordingly, I think it is instrumental to limit the number of contracts added to begin with. I'd love to hear anybodies suggestions as to ways we might do this with OptionChainProvider / InitialFilter. For example, I can limit the number of strikes reasonably trivially. One thing that is difficult is limiting strikes if you want to find an option with a low delta (say at a delta of 0.15 to reduce margin requirement) To do this requires loading the chain with a quite wide range of strikes. Since you don't know how many strikes away the delta is likely to be, you need to overestimate - filling the universe with many contracts you don't intend to use. However, you can't access the Greeks until the contracts are loaded, which makes it difficult to do any other way.

I guess the question is more general than anything. Does anybody have any thoughts on how to limit the number of contracts when using OptionChainProvider?

Author