Читать книгу The Harriman Book Of Investing Rules - Stephen Eckett - Страница 9
ОглавлениеRichard J. Bauer Jr.
Dr Richard J. Bauer, Jr., is Professor of Finance at St. Mary’s University in San Antonio, Texas. His research has appeared in many journals including Financial Analysts Journal, Journal of Business Research, and Managerial Finance.
He is co-founder and co-owner of ANSR Company LLC, which develops investment software based on evolutionary computation techniques.
Books
Genetic Algorithms and Investment Strategies, John Wiley, 1994
Technical Market Indicators, John Wiley, 1998
Technical Market Indicators: Analysis and Performance, Wiley Trading Advantage Series, 1999
Building trading systems using genetic algorithms
1. Begin by thinking about ‘proof’.
A good starting point is to ask yourself the following question: if someone brought you evidence that a given investment strategy had merit, what would constitute enough proof that you would be willing to follow the strategy?
The reason this question is important is that evolutionary computation techniques, such as genetic algorithms and genetic programming, are optimization procedures. They search for optimal or near-optimal solutions to complex problems. Using these techniques to search for attractive trading rules requires that you first define the parameters of the search and a ‘fitness’ function.
The fitness function could be something simple (see rule 3) like highest compound return over some time period. If you would be willing to employ a trading rule because it had the highest compound return of a general class of rules, then that is all you require as proof. That would form the basis of your system. In practice, you probably require more than that.
2. Think carefully about your constraints.
Suppose you are building a system to optimize stock selection criteria based on fundamental variables. Further suppose that you use a genetic algorithm procedure to identify the optimal stock selection variables. When you evaluate the results, you realize that the selection criteria leads to just one stock every year. Are you really willing to put all your eggs in one basket? Or, do you require the criteria to be general enough to identify at least 20 stocks each year? If the latter, you will need to build this constraint (and others) into your search procedure or fitness function.
3. Obvious fitness choices probably won’t work.
Good trading rules are the ones that make the most money, right? Yes and no. While this is the ultimate goal, rules built to simply maximize return over some historical test period without any other constraints will probably be useless going forward. Good fitness functions require lots of work.
4. Beware of overfitting.
If you don’t build in some good constraints, you are likely to end up with a rule that fits the historical test period nicely but has little value. Genetic algorithms, for example, can find some really bizarre rules that overfit the test period.
5. Put lots of thought into your database design.
Your first attempts will probably be modified or expanded in some way. Much of the programming effort concerns data management and data interface issues. Try to think ahead when you design your database.
6. Check results from a theory standpoint.
A rule that at first looks strange may be just that. You may have overfitted and found a useless rule. Or, there may be a good rationale as to why this rule has worked and will continue to work. Think critically about your results.
7. Beware of data mining.
Today’s computer horsepower allows us to explore enormous numbers of potential trading rules. If you look long enough, you will no doubt find rules that work great over the test period, but are not necessarily so good for other periods.
8. There is a tradeoff between quantity and quality.
Suppose you are developing trading rules based on technical analysis. Rule A says to buy when pattern X occurs. Rule B says to buy when pattern Y occurs. Will combining A and B lead to a really great trading rule? Perhaps. However, the combination rule may occur so infrequently that it is not as good as simply buying whenever either A or B is applicable.
9. Consider using a portfolio of rules.
Another way to diversify is to use a portfolio of rules rather than a single rule.
10. Decide in advance when to bail out.
In a way, the question here is similar to that raised in rule 1. What will you consider proof that your rule is not working?
‘Since 1950 an excellent strategy has been to invest in the market between November 1st and April 30th each year, and then to switch into fixed income securities for the other six months of the year.’
Yale Hirsch