|
Innovative Portfolio Management Software for Successful Traders, Investors Business & Educators |
|
Designing and Testing Trading Systems: How to Avoid Costly Mistakes |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Author: Louis Mendelsohn |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Early Approaches Lack Testing Capability By comparison, the black box approach did generate signals. However, they were based on secret indicators that had fixed, preset values. There was no way to verify whether a system's logic was even based on sound technical analysis principles. Therefore, all traders using a particular black box system, regardless of their differences in risk propensity, trading style, and financial goals, received the identical signal at the same time and were expected to act on it on blind faith. Neither approach had a history tester. Traders could not design and test their own trading models on real price data to find the best model to use for each market. Introduction to Historical Modeling But historical modeling did not become practical until the replacement of the Apple computer (with its limited memory and disk capacity) by the much more powerful IBM and low-cost compatibles as the computer of choice among traders. Before long, a plethora of trading systems followed suit, adopting ProfitTaker's modeling concept. Then, as satellite technology became more cost effective and daily prices more volatile, traders turned increasingly to day-trading. Now, even traders with limited trading capital can analyze realtime tick-by-tick prices on their computers. Quotation services, which previously provided only price quotes and news information, now offer built-in technical analysis and system modeling software. Costly Mistakes Must Be Avoided This process, by which traders design trading models, test their profitability and search for the best model to use, is widely known as "historical optimization." Too often, however, after models founded on historical data are applied to current prices in real-time trading, the expected profits are not realized. With so many traders now using computers to design and test trading systems, it is important to examine the intricacies of the modeling process itself and to identify commonly made mistakes that could be costly to your bottom line. Full Disclosure Testing Is the Means to the End The goal of historical modeling is to find models that have a high likelihood of producing profits and remaining stable in the ensuing period when you are actually trading in real time. To do this, you should look for a broad band of profitable models with the best performing one located near the middle. To either side of the best model are other profitable models, with their performance dropping off gradually the further they are from the best one. A model chosen from this profit cluster is more likely to remain stable even with subsequent changes in price characteristics. Keep It SimpleAs you make an arithmetic increase in either the number of indicators in a system or the range over which each of the indicators can vary, the number of models to be tested increases geometrically. Table 24-1 illustrates the effect that the number of indicators has on the number of models to be tested.
You can see that a system with three indicators, each of which can have a range of 25 values, results in a universe of over 15,000 models. When a fourth indicator is added, the number of models increases to nearly 400,000. Adding a fifth indicator raises the number of models to nearly 10 million. Increasing the range of values over which the indicators vary also causes the number of models to increase, but less dramatically. For instance, a system with five indicators, which can each have 20 values, creates a total of over three million models. Keeping the number of indicators constant at five, but increasing their range of values from 20 to 25, increases the number of models to nearly 10 million. The amount of time it takes to test a system varies in direct proportion to the number of models tested. Therefore, it would be impractical on a microcomputer to test a system on even one market using more than four or five indicators. The coarse testing and fine testing method would be required, and even then the increment sizes might need to be so large that only a small percentage of possible models could actually be tested. Under these circumstances, there is a tendency, after you pick a model to use in real time, to feel compelled to change to other models or to switch indicators each time you incur a string of back-to-back losing trades. This syndrome, known as paralysis of analysis, can become immobilizing. Still, many traders believe that the more indicators a model comprises, the better the system's profitability. This may be true up to a point, but then diminishing returns set in. If you use a limited number of indicators in the modeling process, you will discern a general pattern to a market that objectively exists. By contrast, when you employ too many indicators, you merely superimpose a pattern, which actually does not exist, onto the historical data. This is particularly true of indicators that are highly correlated with one another. Then you risk using seemingly profitable models in real time trading. They look good on paper, but conform so closely to the historical data that they have little, if any, predictiveness. This serious pitfall is commonly known as "curve-fitting." Such models tend to be unstable, decay rapidly, and will therefore subject you to unnecessary losses. Some software programs now give traders considerable flexibility to write their own trading rules. While this much flexibility may be useful to certain traders who have the time and resources to engage in extensive trading system design, most traders find this much flexibility to be a hindrance to their success as traders. Such software encourages traders to build complex systems with numerous indicators, in the search for the "Holy Grail." By doing so, traders risk picking "curve-fitted" models, or becoming immobilized by the paralysis-of-analysis syndrome. Most off-the-shelf systems already offer more than enough user flexibility. Unless you have considerable spare time to spend, or are a full-time professional technical analyst, it really isn't cost-effective to recreate the wheel by designing your own system from scratch. You're better off leaving that to professional trading system developers. Know When to Reoptimize To make this process virtually a turn-key operation for my clients, I provide a monthly report to them, called ProfitTuner, which tests eighteen actively traded markets on a mainframe computer. In some the models may change from one month to the next, while in other markets the models are quite stable. Since the object is to find models that are not curve-fitted, ProfitTuner lists the 50 best-performing models for each market, rather than the one model that produces the maximum profit. Whenever a fundamental event takes place, affecting specific markets in a way that could not have been anticipated by the modeling process, you should retest. For instance, a weekend meeting of the G-7 trading partners, with an unexpected announcement of a revised trading range for the U.S. dollar, should immediately raise a red flag for you to perform retesting on those markets. Check Your Models for Curve-Fitting Blind-simulation testing should actually be performed as part of your routine testing. Different size testing and trading windows for each market could be explored, since the window sizes affect the test results and choice of models. Finding the optimal window sizes for each market could substantially improve real-time trading performance. Make Realistic Assumptions As you can see in this example, Model A has $10,000 total profit, 25 trades, and $2,000 maximum drawdown. Model B has $12,000 profit, 45 trades, and also $2,000 drawdown. At first glance, when overhead is excluded, Model B appears to be superior to Model A. The risk/ reward ratio of profit to drawdown is higher for Model B. Then, when a $100 overhead for slippage and commissions is included, both models produce identical net profit and risk/reward ratio. The inclusion of $100 overhead costs is more damaging to Model B because of its higher frequency of trading. This pattern is further exacerbated as overhead costs are increased. At $250 per round turn, Model B's ratio of profit to drawdown is less than 1.00. At $300, it has a net loss of $1,500. In effect, the impact of overhead is magnified on models that generate a substantial number of trades. Models that look good when overhead costs are not taken into consideration may prove to be big losers when realistic costs are factored in. Overhead assumptions regarding slippage should reflect differences in each market's price volatility. You also need to set realistic values for the limit move in each market. Otherwise, your modeling results will not be based on realistic execution prices. It is incorrect to record the execution of a trade as occurring at the time that the signal is generated when that market is lock-limit. Limit conditions must be accounted for and executions deferred until feasible. The big move in the silver market in 1979-1980 is a classic case where hypothetical track records of trading systems overstate profits due to unrealistic lock-limit assumptions. A major improvement in this area could be made if data suppliers were to report each market's daily limit value and the 90-day T-bill rate on a daily basis along with prices, volume, and open interest. Then modeling software could be programmed to check precisely for normal and expanded daily limits during testing to avoid unrealistic price executions, and compare a system's daily rate of return to the risk-free return.
MODEL A
MODEL B
Test the Right Contracts Test the Right Data Of course, you should also verify the accuracy of your data. If it is not clean, your test results will be distorted. Automatic daily updating using a modem will eliminate typo errors that would otherwise be introduced when prices are updated manually from daily newspapers. The cliché garbage-in, garbage-out must be respected when doing historical testing. Know Your Own Risk Propensity Check the ratio of cumulative net profit to maximum drawdown. Examine the drawdown. Drawdown should not be calculated as the dollar value of back-to-back losing trades. It's the maximum equity drop from a high point in equity to the subsequent low point in equity until the high point in equity is breached to the upside. Table 24-3 Performance Measures to Use When Evaluating a Trading Model
This ratio gives you a good indication of your risk/reward payoff. Essentially, it tells you the number of dollars you can expect to win for every dollar you put at risk. You should know your own risk propensity. Some traders are willing to risk a dollar to make a dollar. Others need more payoff for each dollar put at risk. Ask yourself how many dollars you would need to make on a given trade to motivate you to risk a dollar by taking that trade. That's the minimum ratio of profit to drawdown that you should accept. Make sure that the system's characteristics and performance are compatible with your temperament, style of trading, and the depth of your pockets. If you can't handle emotionally or financially the frequency of back-to-back losing trades or the short term drawdowns that a particular system incurs, what good is it if it's a big money maker in the long run? Other Modeling Ideas to Explore Another interesting approach is to incorporate economic or fundamental indicators into your trading strategy. For instance, you might use one or more fundamental indicators to identify a bias for each market as either bullish, bearish, or sideways. Then, for instance, you would only act on your technical system's buy signals if, at the same time, that market's fundamental "bias" is bullish. In effect, you are applying a fundamental filter to confirm the technical signal generated by your trading system. This approach can eliminate false signals and alert you to impending turning points in the markets. Recently, I developed a software program called Trader that lets the user do just this by correlating the effects of 50 economic indicators on the price direction in each market. Conclusion Reprinted with permission by Louis Mendelsohn at www.tradertech.com
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Back to the top | Anfield Capital © 2004-2010 |
||||