Backtesting Options on AmiBroker

Hi,

I would like to backtest an options strategy on amibroker. I have the data but coding it seems to be a problem. Is there any existing code which I can run ?

@Karan, I will not define it a problem.

It is for sure more complicated than developing a pure stocks strategy of you will consider both the options and their underlying asset, since you need to keep track of many other variables (expirations, volatility, liquidity, greeks, etc.).

All this probably need be part of the system, and in general, just to keep track of historical options data for many instruments and expirations is a significant task.

Moreover - especially if you want intraday quotes - you need to plan for efficient storage and retrieval of such data using an external database (that AmiBroker can use via ODBC or some other custom developed plugin) or via some more fancy solutions (cloud-based, Web APIs, etc.)

AmiBroker is exceptionally flexible and powerful so technically is undoubtedly possible. Doing it is another matter!

For this reasons, I doubt that you'll find any "code" ready to run! My 2c.

@Karan, I completely agree with @beppe in that AmiBroker is entirely capable of doing options testing (I have done this myself), but there is a lot more effort involved to find the appropriate strikes, deal with expiration dates, etc. In addition, it can be challenging to obtain accurate data, so expect to spend some time verifying that the data you have is of high quality.

What kind of historical options data do you have? What interval, length of history and data fields?
-S

I've got Nifty Index options 1 minute data from 2011 onwards.

Thanks @mradtke. I completely agree with you. I have 1 minute data from 2011 onwards. I've verified the data from 2017 onwards with the data I've got from Interactive Brokers. The data seems to be good. ( There is no way to verify data prior to 2017)