Automatically Adding Instruments in Greek Engine

High-Tech Greek Engine

This afternoon I've been adding code to my Greek Engine to enable it to automatically add instruments from the exchange feeds based on some simple rules. The problem is that many times, the first time we'll get word of a new option will be in the ticker feed from the exchange. They happen intra-day, and it's something we have to be able to respond to no what the conditions. There will be both stocks and options being added intraday, so I needed to be able to add either - but the trick with the options is that I need to know who to place this option on.

This means I needed to expand the list of all the stocks I know about, and when I get a new one, I'll add it to this list as well. Then, a new option can see if it's underlying is defined, and if so, add itself appropriately. If not, then it falls on the floor simply because we don't have enough information to place it in the structure. So it goes.

These changes didn't really take all that long, which was nice, but I'm guessing there might be some things I have to polish about this before it hits production... after all, the legacy code it's replacing didn't handle stock additions at all.