AlgoTraderAlgoTrader Documentation

Chapter 5. Managing data

5.1. Reference Data
5.2. Historical Data

During live trading, all relevant information like orders, positions and transactions are stored in the MySql database.

To view database data please open TOAD for MySql.

On the left-hand side of the application double click on root@localhost (algotrader).

You now see all AlgoTrader tables listed below

To view the contents of a table (e.g. the strategy table), double-click its name and go to the Data tab

The table security contains a list of all available instruments that can be traded with the system. This table can for example be used to find the securityId for the BTC/USDT pair traded on Binance.

Reference Data like instrument definitions, strategies etc. are also stored in MySQL (in tables like security, security_family, strategy, etc.)

Before an AlgoTrader based trading strategy can trade a particular instrument in needs to be defined in the database.

For further details visit the AlgoTrader documentation regarding Reference Data.

For Back Testing AlgoTrader can use historical data provided by .csv files. For the EMA strategy the AlgoTrader Strategy Wizard created a sample historical bar data file /algotrader-ema/files/bardata/fx/EURUSD.csv. The file name (EURUSD) needs to match the symbol column in the database table security of the instrument the strategy is going to trade.

For further details on naming conventions and the location of historical data .csv files see the AlgoTrader documentation regarding Market Data File Format.

As a more sophisticated alternative to providing historical data through .csv files, the Time Series database InfluxDB can be used for storage and retrieval of historical data. For further details on downloading, storing and using InfluxDB data for back testing please visit the AlgoTrader documentation on Historical Data.