Now we’ll step across each training and out-of-sample window. The combined systems’ statistics are shown in "Window analysis" (below).
For our test, we’ll use the 30-year T-bond 24-hour market. Our positively correlated market is UTY and our negatively correlated market is silver. We will use 30 for our near neighborhood parameter, 1,000 for our training size and re-optimize every 250 days. The performance is shown in "Trading both ways" (below).
The system made money on both the long and short side. Our results are consistent; we are profitable on both the long and short side and were profitable during the bear market of 1994. This is just a starting point for using this technology, which is only limited by the computer power in terms of how many strategies can be run in parallel.
Portfolios of markets & systems
Consider a jet plane. If one component fails, the whole plane does not crash. Redundant systems protect from the worst-case scenario. Treat your trading program like a plane with built in redundancy and worst-case scenario protection. This built-in protection should be at both the component and overall levels, which ensures that each system has some level of inherent safety.
There are several ways to build these fault tolerances directly into the trading system. We’ll discuss two: equity curve feedback and trade plan level protection.
With equity curve feedback, we use virtual systems that have the same rules as the original system. Based on that system’s performance, we make decisions about the actual system. For example, we can turn off the short trades if they have been losing money recently; alternatively, we could anticipate a short-side turnaround and trade more. How you approach it depends on historical analysis of the equity curve.
Sample code to implement an equity-curve filter is shown online. Here’s how it works:
- We monitor the long, short and combined profit on the virtual trading channel. This channel mirrors the real signals for our system.
- Our simple logic turns off the buy and short signals if any of them have recently lost money. This type of analysis gives this system a fault-tolerant quality.
- It turns the system off after a trade is stopped out for a given period of time or a condition is met.
- Turns off the "SE" entry signal for 20 bars after it has been stopped out. When we are short, we have a protective stop at 2.5 average ranges above the open. Without these coding tools, this type of logic would be difficult to implement and hard to test.
At the other end of the risk-control spectrum is trade plan level fault tolerance. However, it pays to think differently than the crowd. Many commodity trading advisors trade trend-following systems and diversify across many different markets. This is a viable approach, but the problem is that sometimes trend-following methods do not work. There are years when trend following is not profitable.
One solution is not only to trade multiple markets, but also multiple systems. These systems include not only those that use different parameters for each market, but also completely different systems with different methodologies, such as a trend-following system combined with a countertrend intermarket system. This approach produces a smoother equity curve and better risk-adjusted returns than using one system.
One example trade plan uses five different systems and allocates the money between them. These five systems involve different methodologies and markets. They are:
- One trend-following system
- One countertrend stock index system
- One intermarket bond system and
- Two intermarket systems: One for oil and other for copper.
Combining a mix of systems in this way can be expected to produce backtests with returns of more than 40% with drawdowns of about 25%. The problem with this approach is that many system developers are lucky if they can develop one robust concept, let alone five. It can take years or even decades to build the research background and technical analysis to create multiple systems that work together in the real world.
Trading is one of the most exciting and challenging professions in the modern world, and it is always changing. Although what worked yesterday will not necessarily work tomorrow, the past always will be the best roadmap for the future. The key is to recognize fundamental shifts in market dynamics and then use that knowledge to alter execution. Dancing on the cutting edge takes quick and sure footwork, but the rewards can be considerable.
Murray A. Ruggiero Jr. is the author of "Cybernetic Trading Strategies" (Wiley). E-mail him at firstname.lastname@example.org.
Click here for additional codes.
In a subsequent feature, Ruggiero will describe in detail one of the following systems:
1. Replacement for opening range breakout in electronic markets
2. Equity curve feedback.
Comment below to let us know which you would prefer.