Sources for Data in Amibroker

There are several sources for market data that you can use in Amibroker.

Each has benefits and drawbacks.

It’s a lot to learn all of Amibroker right from the outset, so it’s useful to separate usage into two phases:

  1. Backtesting
  2. Real-time trading

Backtesting is simpler since you don’t need to generate signals in real-time.

For that reason, I always have traders start with the backtesting phase first.

(And when you create your strategy with an awesome equity curve and you’re ready to trade it, you’ll have plenty of motivation to tackle the more complex real-time workflow.)

So let’s focus on data sources for backtesting.

The cheapest way to get lots of market data for backtesting is the Polygon flat file service.

Polygon provides a flat file each day of intraday minute bar data that you can download.

You’ll need one level up from their free service (currently the “Stocks Starter” plan) to access the daily file downloads.

Once you get access, you’ll need to do some Python/LLM wrangling to get the data in a format that Amibroker can import.

You can completely automate this process using Amibroker’s Import Wizard and ASCII Import.

Other options for backfilling your database are:

  • Amibroker’s IB plugin (free with an IB account, but the IB data is rate-limited so it’s not practical for complete backfilling)
  • IQFeed real-time data service (also has excellent backfilling history, but most costly than the other options)
  • eSignal real-time data service (nice backfilling history, but even more costly than IQFeed)
  • Norgate data (no intraday data, daily only)
  • See P.S. for another option from a list member

Tomorrow I’ll go over the best way to approach your first data import.

-Dave

P.S. Long time list member Matt H. created another way to download historical data for free to import into Amibroker through Alpaca. He’s graciously shared his Python code to do this through an Alpaca account. I haven’t tested this, but here’s the link to his Github repository. Thanks, Matt!