Tom, one of our users (not his real name), had several list of trading rules and he wanted to use the genetic algorithm optimizer to create a profitable trading strategy. The trading system optimizer works as follow: It picks one rule from each list of rules in the buy list and then picks one rule from each list of rules in the sell list. By combining buy rules (AND) and sell rules (OR), the optimizer will then create a trading strategy given the settings you have defined and return the performance of the strategy to the optimizer so it can analyze it and decide whether to use the current combination/trading system to create the next generation of the population. What Tom wanted is that the optimizer picks a pair of buy-sell rule. For example: if the optimizer selects "close > sma(20)" as a buy rule, he wanted it to automatically select "close < sma(20)" as a sell rule. Trading System Optimizer The trading system optimizer is very easy to use. You just need to update the strategy settings, set one or several list of buy rules and one or several list of sell rules. As we said earlier, the optimizer will simply pick one rule from each list to create a trading system (You can also include system settings and money management variables in the optimization process). The problem of Tom is that these rules are not linked and consequently the optimizer will simply pick random buy and sell rules. This issue could be solved if we can instruct the genetic algorithm or PBIL (Population based incremental learning algorithm) optimizer to select a particular sell rule for each buy rule. We can for example synchronize two list of rules (one buy and one sell rules) so that if for example the optimizer picks rule number 12 from buy list 1, it must automatically select rule number 12 from sell list 1 (Assuming buy list 1 and sell list 1 are synchronized). In order for this to work, both list must have the same number of rules and for each buy rule the corresponding sell rule must have the same index in the trading rules list. Synchronize Buy/Sell List of Rules Few days after Tom contacted us, we have created the buy-sell rules synchronization feature. Here is how it works: After you create a new trading system optimizer and in the "Trading System" panel, you can select the number of buy and sell rules (Genes). For each gene, you must specify one list of rules the optimizer should use to get one single trading rule when creating one chromosome. To synchronize two trading rules, click on "Select Rules" and associate a list to the first buy Gene, then associate the corresponding sell rules list to the first sell Gene. Right click on the Gene 1 cell, select "Synchronize with" then choose the first buy rules list. Next to the cell content, the optimizer tool will add the following text "[SYNC: rule name 1]" to indicate that this list of rules is synchronized with "rule name 1". Note that you can synchronize two lists of rules only if they have the same number of trading rules.
|