Backtesting Using Stock Investor ProDownload printable PDF
Over the years, we have received numerous questions on whether you are able to backtest using Stock Investor Pro. The answer to this question is yes, but with a caveat. There is no single-click backtest feature built into the program. However, previous Stock Investor Pro data points are archived online going back to the beginning of 2003. Using this data, you can perform a backtest manually. This installment of Stock Investor News shows you how.
To backtest with SI Pro, you need to start with an advanced understanding of the main features of the program. You should be able to quickly and easily create screens, back up and restore custom user files, create custom fields and run reports before attempting to backtest investment strategies. Each of the following Stock Investor Pro functions is used during the backtesting process. Here, we assume that you are able to perform all of these functions with ease. To review these functions, please click on the name to go to the explanation:
Needless to say, in order to backtest, you must also know the investment methodology or strategy that you want to test. You can test any investment methodology that can be created as a screen. Additionally, you must decide on a time frame and rebalancing period. For the sake of simplicity, here we backtest a strategy that is already built into the program, Piotroski High F-Score, over the first three months of 2014 using monthly rebalancing. In reality, backtesting a strategy over such a short period is not recommended, but for our purposes a three-month period is long enough to adequately illustrate the process. Furthermore, it will allow us to quickly check the validity of the example backtest using the screen’s return that is currently shown in the stock screens area of the AAII website. With data as of March 31, 2014, the current year-to-date return for the Piotroski High F-Score screen is 17.8%.
The first step to backtest a strategy is to install Stock Investor Pro data for the date at the beginning of the backtest time frame. For example, since we are backtesting the Piotroski strategy for 2014 using monthly rebalances, we need to calculate the performance of the screen for the months of January, February and March. The performance for the screen during January is based on the companies passing the screen as of the end of December in 2013 (December 31, 2013 data). Similarly, to calculate performance for February and March, the passing companies as of January 31, 2014 and February 28, 2014, respectively, are required. To install the program and data as of December 31, 2013, go to the SI Pro Data Updates page in the Stock Investor Pro area of AAII.com and click on Past Updates. Scroll down the list to find “stockinvestorinstall_20131231.exe - Full Program and Data Update, Data as of 12/31/2013.”
After downloading and installing the program and data, open Stock Investor Pro and make sure that the data date is correct—in our case, December 31, 2013. Keep in mind that since this is an older version, the program may prompt you to update to newer data. Make sure that you do not update. Running the Piotroski Screen yields five companies. Next, save these companies as a portfolio. This step allows us to calculate the performance for the companies during the month of January. So, we name the portfolio January 2014.
In order to properly backtest a strategy, we also need to create a custom field and a custom view: The custom field tests the previous month’s performance of each company, and the custom view shows the average performance of the companies when running a report. First, the Monthly Performance custom field is created using the following expression:
GrowthRate([Price M001],[Price M002],1)
Then, the Backtest Performance custom view is created containing the Monthly Performance custom field.
After the results of the Piotroski screen have been saved as a portfolio and the custom field and view have been created, we need to back up the custom user files into a clean folder using Stock Investor Pro Utilities, so that we can use them with the other data updates.
We move forward one period and install the program and data for January 31, 2014. Then, restore the custom user files through Stock Investor Pro Utilities. The January 2014 portfolio, Monthly Performance custom field and Backtest Performance custom view should now all be available in this installation of the program. To calculate the performance of the Piotroski passing companies for the month of January, select the January 2014 portfolio and run a Statistical Summary Report for all companies in the active notebook. In the Statistical Summary – Active Notebook window that pops up, select the Backtest Performance view that we created earlier. The Statistical Summary report created shows that the average price-change return for the Piotroski screen during January was 7.48%.
This process must now be repeated for the months of February and March; however, the custom field and view do not need to be recreated. Create a February 2014 portfolio and back up the file before installing the program and data as of February 28, 2014. For the month of February, the average price change is 0.34% and for the month of March, the average return is 9.20%. We use these three monthly performance figures to calculate the year-to-date return using the following formula:
(1.0748 × 1.0034 × 1.0920) – 1 × 100 = 17.76%.
As you can see, this matches up with the current return shown on the AAII website, confirming our calculation.
This backtesting methodology can be used for any time frame and rebalancing period that you choose. Keep in mind that Stock Investor Pro data only goes back to the beginning of 2003. Note that during 2003, the data points were archived on a monthly basis; subsequent to 2003, data points are archived on a weekly basis. You are not able to backtest using a more frequent rebalancing period. It is also worth mentioning that the returns calculated are based on a “best-case” scenario. The return does not include fees, bid-ask spread, time slippage or other commissions. However, it also does not include dividends that may have been paid. As always, screening should only be the first step in the investment process. Additional research is prudent when using stock screens.