Is every expiry month to be stored as a different instrument or is there another way?
I would store every contract as a different instrument, where a contract is a unique combination of underlying symbol, call/put, strike, and expiration date.
Isn't there a smart way? For example can we store all the data in a database like mysql and selectively refer to data. The afl, for example, may be needing Call2700May2018 for now so there is NO need for Call2800June2018.
The beauty of programming is that there are almost always multiple ways to solve a problem. If you believe there are advantages to storing all your data in an external database rather than the AmiBroker database, then by all means give that solution a try. Since you've posted absolutely no design requirements, system limitations, obstacles faced, etc. it's pretty difficult to offer any actionable guidance.
Well the option system i am trying to create is not very different from futures or stock trading system. The only difference in case of options is the thousands of strike-month will be created. I am looking for a way around that.
Is something like this possible:
- Decide which strike-month is needed by the afl at runtime
- query mysql and import the data for the reqd strike-month into a ab instrument
- Do the calculations