Skip to Content
NeurotraderDocs
Concepts

Data sources

The market data a simulation reads: instruments, providers and venues, the range and interval every source shares, and where the candles come from.

Before an algorithm can trade, you tell the simulation which markets it reads and over which period. Each market you add is a data source. This page explains what a data source is made of, why all the sources of one simulation share their dates and their interval, and how the candles reach your computer.

Data sources

A data source is one instrument's candles, as a simulation reads them. A historical data source has three parts:

  • An instrument, such as BTCUSDT or a stock.
  • A date range: the first and the last day the simulation replays.
  • An interval: the length of one candle, such as one hour or one day.

A live data source has no date range. It is a subscription: the instrument, the provider that streams it, and the interval. It starts when the run starts and continues until you stop the run.

You add data sources on the Data step of the new simulation wizard, or later on the Data card of the simulation's page. A simulation in Simulation mode reads only historical sources, and a live simulation reads only live ones.

Screenshot
The Add data source dialog with BTCUSDT and ETHUSDT picked, a start date and an end date covering one whole month, and the interval set to 1h

Tickers, providers and venues

Three words describe where an instrument's candles come from:

  • A ticker is one tradable instrument as one provider serves it: a symbol such as BTCUSDT, the asset being priced (BTC, the base asset) and the asset it is priced in (USDT, the quote asset). The app also calls a ticker a pair or an instrument.
  • A venue is the market the instrument trades on, such as Binance or a stock exchange.
  • A provider is the service the candles come from. Binance provides its own crypto pairs. Stocks, funds and ETFs come from a market data provider. See Market data providers.

A symbol alone does not identify an instrument. The same symbol can name a coin, a share and a fund, and two providers can serve the same listing. The instrument picker therefore shows each entry with its venue, its provider and its asset type, and you pick the entry, not the symbol.

For a live data source, the dialog asks for the Provider first and then lists only the pairs that provider streams.

One range and one interval

Every data source of a simulation covers the same date range at the same interval. You set them once in the Add data source dialog, and they apply to every pair you add.

The reason is the way a run works. The simulation moves through time one step at a time, and at each step every algorithm sees the candles that closed at that moment. Sources with different dates would leave an algorithm with a market that is missing for part of the run, and the results of the algorithms would cover different periods.

Two consequences follow:

  • A change applies to all sources. If you add a pair with different dates or a different interval, the dialog warns you that the sources already in the simulation are changed to match.
  • The interval offered is the one every pair supports. Each provider serves an instrument at certain intervals and from a certain first day. The dialog lists only the intervals that all the picked pairs share, and holds the start date to the latest first day among them. A crypto pair next to a stock that is served daily leaves 1d as the choice. If the pairs share nothing, the dialog says so.

An instrument sweep depends on this rule: every copy of the setup runs over the same period at the same interval, so the only difference between them is the instrument.

Intervals

Neurotrader works with these candle intervals:

UnitIntervals
Seconds1s
Minutes1m, 3m, 5m, 15m, 30m
Hours1h, 2h, 4h, 6h, 8h, 12h
Days and longer1d, 3d, 1w, 1mo

Which of them an instrument offers depends on its provider. Crypto pairs from Binance are available at every interval. Stocks are available as daily candles.

The interval of the data is also the pace of the algorithm: with 1h candles an algorithm decides once per hour of market time. A run's charts can be read at a coarser resolution than the run's own interval, which helps with long runs. See Charts.

Date ranges

A historical range is a start day and an end day. Historical data is published in whole months, after the month has ended, so a range cannot reach into the month in progress. The dialog opens on the latest completed month, which is always a valid range, and the date pickers do not offer days that are outside what the provider serves.

If a month inside your range is not available from the provider, the run does not start, and the message names the months that are missing. Neurotrader does not run over a range with a hole in it.

Origin of the data

You do not find, download or clean price data yourself.

  • Downloaded on first use. When you start a run, Neurotrader checks which months of each data source are already on your computer and downloads the rest from the Neurotrader data service. The simulation's page shows the download's progress before the run begins.
  • Kept locally. Downloaded candles stay on your computer, so the next run over the same data starts at once. The local copy is encrypted and is read by Neurotrader only.
  • Visible on the Repository page. The Repository page lists every instrument you hold data for, with the intervals and the date ranges as bars on a time axis. From there you can also download data ahead of time with Download candles. See Market data downloads.
Screenshot
The Repository page listing BTCUSDT and ETHUSDT, each with rows for the 1h and 1d intervals and a bar showing the date range held on this computer

Downloading needs you to be signed in, and the amount of data you can download depends on your plan. See Plans and quotas.

Every provider's data arrives in one common format, so an algorithm reads a stock's candles and a crypto pair's candles in the same way. Where a provider does not report a value, the value is absent. Neurotrader does not fill it in with an estimate.

Live data

A live data source streams candles from the provider as the market moves. The algorithm receives a candle only after it has closed, never while it is still forming, so a live run obeys the same no-look-ahead rule as a backtest.

A live run keeps a record of every candle it received, because a live market cannot be replayed afterwards the way history can. Live market data goes directly from the provider to your computer.

Data sources and algorithms

A simulation can hold several data sources, and each algorithm reads the ones you link it to. On a single account, an algorithm reads every data source of the simulation unless you choose otherwise. In a comparison, each algorithm has its own links, so two algorithms can trade different instruments in the same run.

At least one data source must be an instrument quoted in the simulation's primary quote asset. Without one, the account cannot be valued and the run does not start.

On this page