Thursday, June 16, 2016

AmiQuote Download of Quandal Data

AmiQuote (which is part of the Amibroker suite) has had the ability to download Quandl data since its 3.10 release.  The support for Quandl is quite primitive, and as on June 2016 it is still hard-coded to the default 'WIKI' database.  This can be verified by capturing the calls made to the Qandl API - see the image below captured using Fidler.



This call is attempting to the get the front month VIX contracts in the Wiki Continuous Futures (CHRIS) database.  The problem is that the correct request path for this data source in the CHRIS database is api/v1/datasets/CHRIS/CBOE_VX1.csv?...  Note the absence of the '/WIKI' folder in the correct path name.

There is a way to work around this limitation.  Buy adding a ../ to the start of the symbol name, the path becomes a relative path that navigates out of the Wiki database on Quandl, allowing access to any other arbitrary database.  For the CBOE front month VIX data in the CHRIS database  the symbol name in Amibroker would become  ../CHRIS/CBOE_VX1.  This is a quite ugly symbol name, and fortunately Amiquote supports a custom mapping table.

For an Amibroker database with the front and second month VIX future contracts given symbols of VX1 and VX2 respectively, the mapping table would be:

VX1, ../CHRIS/CBOE_VX1
VX2, ../CHRIS/CBOE_VX2


Note in the screen shot that the Quandl.com data source is selected.

With this all in place, Amiquote can happily import from any Quandl database.  The figure below shows the VIX front month contract happily living in Amibroker with a sensible symbol name.