True but not always. Can you use Foreign() in a loop to dynamically form string Symbols (for Option Symbol syntax shown before) to fetch its quotes in order to form an independent Array (like PCR, IV, Prob calc etc..) whose elements are to be used bar-by-bar (or to Plot) using AB? I doubt that otherwise how else you could perform Option BT with continuous datapoints! Rather one could simply go for Python or R or SQL or anything else, do whatever that is needed and then import that back to AB (caveat: only EOD no real-time IEOD). Problem is the expiry date in our option symbols. So anyways whenever we get data from our exchange or from any 3rd party data vendor they provide option symbols that contain string expiry date. Thus, it becomes suitable to use an external source for calc and then cascade the data back to AB. The project that you are bragging about I am certain that you did not had to deal with string expiry date from your data source. Hence you could loop that up solely in AB DB itself.
@Loss_Lover Very valid points bro.
Seems like trash is not familiar with the issues that we have to face because of the Options Symbol Naming Mechanism being used by most data sources. It is not such plain forward to use these option strike symbols, because of continuous change in their names after every expiry.
For instance NSE option symbols shows up like MARUTI18NOV6800PE with a syntax <SYMBOL><yy><MMM><strike><OptionType>.
And then there is added complexity because of the different naming scheme for BankNifty WEEKLY Expiry symbols as well. That is why it was earlier mentioned by
@NJ23 that he had to spent almost a month to figure out this Options Symbols Naming Issue. Since trash does not seem to trade the Indian Markets, so it is understandable why he misses this point.
It would be interesting to know, how
@TracerBullet bro managed this issue in Python.
For making trash familiar with this issue, I am posting here the Naming Scheme used by GFDL Data Vendor for the Option Symbols -
MONTHLY Options Example -
NIFTY13AUG10500CE.NFO,
BANKNIFTY30AUG1827000CE.NFO
<underlying>
<expiry year in 2 digits>
<expiry month in 3 characters>
<strike price>
<CE for CALL Option and PE for PUT Option>
.NFO
-------- The BIGGER NAME contains 5 separate blocks as described above.
Weekly Options Example -
BANKNIFTY02AUG1825800CE.NFO,
BANKNIFTY30AUG1825900PE.NFO
<underlying>
<expiry date in 2 digits>
<expiry month in 3 characters>
<expiry year in 2 digits>
<strike price>
<CE for CALL Option and PE for PUT Option>
.NFO
-------- The BIGGER NAME contains 6 separate blocks as described above.
I hope trash will not start a fight in this thread and offend so many knowledgeable trader friends who have tried to positively help in this thread about the issue which is faced by most Indian traders whenever they start to think about doing some kind of backtests on Options Data. This is a very practical problem, which is faced by many of us, at some time or the other. Hopefully because of this collective effort, we will be able to figure out some solution, if not in Amibroker, then maybe in some other tools.
Best Regards to you all.
PS: I am not a programmer and I do not have knowledge about coding. Maybe some real good coding expert can solve above mentioned issues in a jiffy, but I find it quite complex.