Skip to content
kebetsi edited this page Feb 16, 2015 · 11 revisions

#Introduction TradingSimulation is a framework for back-testing trading strategies, designed in a modular fashion. The system is composed of multiple components which do processing and send data on previously set up edges. The Fetchers and Replay feed live and past data, respectively, into the system. The MarketSimulator maintains its own order books and produces transactions and delta orders when orders are matched. Trading strategies are defined in Trader components which submit orders to the MarketSimulator depending on the input orders, transactions or Indicator values. The framework was intended for usage in two main configurations Live and Replay. In Live mode, market data is fetched from external APIs. In Replay mode, historical data is used as input to the system.

##Live Live transactions and orders data are fetched from external APIs in a pull or push approach, depending on the API. This data is saved in a persistent storage to allow replays. These orders and transactions are distributed to various components such as the MarketSimulator, the Indicators or directly to the Traders.

Live mode

##Replay In Replay mode, past data is used as input to the system, it allows to test the system in multiple configurations on a given input. Orders and transactions are loaded from persistent storage by a Replay component with a time compression rate. It is connected to the MarketSimulator, Indicators and Traders in the same way as in live mode.

Replay Mode