AlgoTraderAlgoTrader Documentation

Chapter 11. Performance Measurement

11.1. Portfolio Value Logging
11.2. Portfolio Value Restoration Feature

AlgoTrader provides a sophisticated Performance Measurement functionality that consists of the following components:

All Performance Measurement features depend mainly on the Entity Portfolio Value which has the following attributes

In Live-Trading Mode Portfolio Values are recorded to the database for all running strategies on an hourly basis. In addition Portfolio Values are recorded every time a transaction occurs that influences performance. For the AlgoTrader Server these are Credits and Debits and for strategies, these are Rebalances. The corresponding value of the transaction is recorded in the optional attribute cashFlow of the Portfolio Value.

In Simulation Mode Portfolio Values are recorded to the file PortfolioReport.csv through the PortfolioReport class on a daily-basis using the AlgoTrader Reporting Functionality, see: Chapter 30, Reporting.

In case a transaction that influences performance needs to be recorded for a prior period in time, all Portfolio Values since that time period are invalid and need to be restored.

Through the class RestorePortfolioValueStarter which uses PortfolioPersistenceService.restorePortfolioValues() Portfolio Values can be restored for the specified strategy and time period. For the restoration of each Portfolio Value all corresponding transactions up to that time have to be evaluated.