Exporting IG Index / IG Markets Historical Price Data to AmiBroker

AmiBroker is a popular trading software package for Strategy Development, Trading System Validation and Portfolio Backtesting.

Many traders use AmiBroker to backtest their trading ideas with historical market data. However, the accuracy and therefore success of any system is dependent on high quality market data. Ideally the market data you design and test your strategy with should be sourced from your broker as this will reflect more realistically how you strategy will perform in the real world.

AmiBroker software screenshot

AmiBroker provides several methods for sourcing market data including the AmiQuote application. However, these methods do not include an easy method for importing historical data from IG Index / IG Markets.

This is where the Excel Price Feed Add-in comes in, it can save you lots of time and effort by making it easy for you to import IG historical price data into AmiBroker.

Getting Started

The process is to use the Excel Price Feed Add-in to download historical IG prices to a comma separated file (.csv) which you can then import into AmiBroker:

1. If you haven't done so already, download, install and activate the Excel Price Feed Add-in.

2. Configure the Add-in with your IG account details.

3. Setup a watch list on the IG web platform of the instruments you would like import into AmiBroker.

This enables you to download historical data for multiple instruments in one-go. For example, here is one of my watchlists on the IG platform:

IG Index Watchlist

4.Follow the instructions here to download the historical data for the instruments in your watchlist to a .csv file.

The contents of the .csv file will look something like this when opened in Excel:

IG Index Historical Data Download to File Screen

Importing IG Price Data into AmiBroker

Once you have downloaded the .csv file you can now use the AmiBroker ASCII importer function to import the data into AmiBroker:

Load IG Index historical prices into AmiBroker

Ensure you have the "Skip first lines" option set to 1 so the column headers are ignored.

Also, if you are downloading data with a resolution lower than daily, for example hourly, then ensure you map the additional time column.

Once you have used the Import Wizard to create the import definition you can re-use it next time to quickly update your AmiBroker historical data with IG prices.