First, in How to create a market timing system, we created a list of market indicators including composites, market breadth and economic time series. Then, in Correlation of market indicators, we analyzed the correlation between these indicators and dismissed time series with high correlation. Today we will create a ranking system that combines the indicators we previously gathered. This ranking system will be our market-timing indicator. For those who have not used the ranking system tool yet, the plug-in allows you to enter several rules or indicators and to assign a weight to each one. It can be accessed by clicking on "Analysis" then "Ranking System Manager". Once the "Ranking System Manager" is opened, click on "Create" and type in your market timing indicator name. All the profitable rules we created in the last article should be added to your ranking system. To do this, you do not have to type in rules one by one, instead, right click on the main node and select "Add rules from a list of rules". Select your market timing list of rules and click on "Load". You will be prompted with a form that lets you select the weight and the factor to assign to each trading rule. The factor is simply a number that is used to multiply each rule or indicator's result. Since our rules return a value of one or zero, we keep the factor number at 100. The "Weight" does not matter here because it is equally distributed across trading rules. Click on "OK" to continue. The ranking system will return a value between 0 and 100. For a particular date, a value of 0 means that no indicator passed, while a value of 100 means that all the indicators were TRUE. Therefore, the higher the ranking system value is, the more bullish our index should be. As you may have guessed, we will use this ranking system as a trading indicator. Click on "Analyze Ranking System" and add your index in the Symbols control. Select a rebalance period (10 days for example), a number of bucket (two or a higher number if you have many rules) and the first ranking system calculation method (The boundaries between states are chosen so that each state is assigned the same number of positions); finally click on "Analyze". The last bucket should have the best performance. If it is not the case, then analyze the nodes one by one (by selecting "Analyze nodes") to reject the ones that are not performing well. Here is the backtesting result of our ranking system: The red line represents the first bucket and the green line represents the second bucket. The second bucket contains all the positions that had a ranking position higher than or equal to 42.7. Here is how to use this market timing system in QuantShare - Trading Software: buy = Ranking("", "the name of your market timing's ranking system") > 42.7; You can try to further improve your ranking system by testing several thresholds, smoothing it with a moving average for example or using the genetic algorithm optimizer.
|