If you like to solve problems I have had several people work on this for two years. It is the same program.
This program is for investment strategy research using asset class momentum. I used it to develop the investment strategy that I follow and offer to others. It has about 30 years of monthly back data on 51 asset classes and it has a control variable sheet that allowed me to explore a number of strategy alternatives. I started it in 2005/6 and I add to the data base each month. I post monthly on a free web site (
www.copstrat.com) [Now closed], along with the investment strategy documentation. The essence of the strategy, which has now been verified by a great many academic researchers, is that high profit performance in a give asset is likely to repeat the next month, ie, performance has momentum.
After the description of the program that follows I will point out the option that fails.
When you open the program please select sheet “FullCase2.” This is the latest run after having been updated with the data from January. Look at line #69 (“H=1”). This is the performance result for basic strategy case for this run. As you can the strategy does very well returning 21.19% average over 20 years and 18.45% last year. This case invests in the top three performing assets (out of 51) each month. It is also shown on Chart 3. In chart 3 the “compare case” is the same except that the six top assets were invested in. Both sheets show the S&P500 (SPDR) in comparison.
Sheet “FullCase1” shows by color coding which assets were invested in. On FullCase1, yellow indicates a high level of momentum measurement which would lead one to invest in that class the next month. Green indicates that the investment was made and the performance sustained. Orange indicates that the investment was made and the performance did not hold up. Note, however, that in many cases where the performance did not remain in the top 3 it was still fairly good which is also verified by the returns accumulated on the next page.
The ContVar sheet allows one to select how many funds were held at a given time (The red number by TN). The more classes you invest in the lower the volatility and the smoother the performance, however, the total return goes down as well. Give it a ride by changing TN and hitting Execute.
The sheet AC (second page) is intended to allow one to exclude some asset classes in a test case. To illustrate the problem with this option, you can look at FullCase1 and see that the program did not invest in certain classes at all in a given year or two, say 2010 and 2011. By placing a 0 next to these classed in AC and running a repeat case you would not expect the results in those years to change. Indeed, all the way through FullCase1 the program seems to execute perfectly. FullCase1 is missing the excluded classes and all of the same classes are selected as in the prior case. So the performance calculations should be the same for those years, but, they are not. In fact the performance is clearly way off.
I can pinpoint the problem more closely for you (It seems like a relatively simple indexing logic problem.) The VBA routines for FullCase are where the returns are calculated. Those routines scan through FullCase1 color codes for each month and calculate the return for the classes that were invested in. That is the sum up the returns of the asset classes that have a green or orange color. For those classes the program goes to RM1 to get the individual monthly returns. If all classes are selected (have a “1”) in Sheet AC then the returns are calculated correctly. I believe that you could have 0s at the beginning and at the end of the list as well and it would work. It only does not work if the 0s are mixed in the columns with the 1s. That seems like a simple indexing problem doesn’t it? I am afraid that I am too simple to solve the problem.
I very sincerely hope that you can find the time to help me with this problem.
Mal Williams