Client Smart Tip: Using the New “Resume” Function for Backtesting
By Enrico Grande, PhD, Associate, Client Support
Beginning with version 6.13 of Axioma PortfolioTM, clients can resume a backtest from the last successfully processed period.
Backtesting is a computationally intensive and often time-consuming task. Axioma Portfolio enables clients to easily backtest their strategies by exploiting Axioma’s proprietary optimizer, while seamlessly handling corporate actions, historical identifiers, and other aspects involved in a simulation over time. Nevertheless, a backtest can encounter problems (such as strategy infeasibility or data-related issues) that can halt the process.
Prior to version 6.13, when a period rebalancing failed, or if more periods had to be appended to a pre-existing backtest, the process had to be restarted from the beginning after applying corrections or updates. In the case of an infeasible rebalancing, or in situations with data issues (e.g. a missing file or incorrect format), the backtest could fail after a substantial amount of time had elapsed. Furthermore, since resuming the test from the point of failure was not an option, correcting the data or the strategy didn’t necessarily mean that the problem would be solved in one round. The simulation could potentially get stuck again at a subsequent period, requiring the whole process to be started yet again.
The new, time-saving functionality of Axioma PortfolioTM offers a compelling solution to the problems outlined above, by allowing the users to simply resume a backtest from the last successful period. The holdings resulting from the last successful rebalancing are used as the initial portfolio in the resumed backtest. The relevant data from previous periods is stored in JSON (JavaScript Object Notification) format in a user-defined location. This avoids the need to restart the entire process. This new functionality provides the possibility to modify the strategy and to modify the dates by adding subsequent processing periods. The backtest can be resumed multiple times, even when an already resumed backtest fails at a subsequent period.
The resume functionality is very easy and intuitive to use. Just right click on the backtest and go to Resume (see Figure 1). This automatically detects periods subsequent to the last successful rebalancing and resumes the backtest.
Figure 1. Resuming a backtest
Once the backtest is complete, the reports relative to the resumed period are located in the folder indicated in the Report Options Tab. In the example below, the backtest was resumed from the 31st of May 2013, which was the last successful period. Note that the reports generated during the period prior to the resume action and those generated after resuming are named differently. The resumed reports contain the label “RESUMED” and the date of the first period of the resumed backtest. It is important to highlight that the resumed reports will contain the full summary and period information. However, the results prior to the backtest being resumed will be based on the strategy used to that point, while the results after the backtest is resumed will reflect changes made to the strategy, if any.
Figure 2. List of reports after resuming a backtest
As noted earlier, in order to retrieve the relevant data, each backtest is associated with a JSON file. The location where JSON files are stored is specified in the Point in Time GUI preferences, under File > Preferences > Time Series Resume
Figure 3. The location of the JSON files is set in the Preferences window of the Point in Time GUI.
The JSON archives are labelled with a RESUME_ID, which uniquely associates the file with a particular backtest.
Figure 4. JSON files are labelled with their unique RESUME_ID
The RESUME_ID is also referenced in the xml code of the associated time series workspace (.tsw)
Figure 5. The Time Series Workspace is linked with the associated JSON file.
When the backtest is resumed, the application looks for the JSON file with the appropriate RESUME_ID in the directory set in the Preferences. If the Time Series application does not find the JSON file in that directory, a prompt is displayed that specifies the archive file needed to proceed.
Figure 6. When the JSON file is missing in the default directory, the application allows you to point to another folder
With this new capability, Axioma PortfolioTM adds functionality that significantly facilitates and streamlines backtesting of your strategies, making the process of testing new ideas quicker and easier in terms of setup and of proof of concept.