NIDE 4 DEPORTES DE HIELO
IV. Gran Pabellón y Palacio de Congresos
4.2.2. CAMPOS GRANDES Y PISTAS PEQUEÑAS AL AIRE LIBRE
A mechanical trading system is really a predictive model of a given mar- ket. Many predictive models suffer from the effect of noise or an inade- quate understanding of the problem being modeled. In most fields outside of trading, the errors of the last few forecasts are analyzed in order to improve future forecasts. This concept is Most predictive models output numerical values. A simple trading system has four dis- crete values: (1) long, (2) exit long, (3) short, and (4) cover.
HOW FEEDBACK CAN HELP MECHANICAL TRADING SYSTEMS
In a mechanical trading system, feedback is valuable in efforts to iden- tify which signals from the system have the highest probability of being profitable. Feedback also helps in selecting which system to trade when multiple systems are trading in the same market. Later in this book, we will discuss how to implement this application using advanced technolo- gies such as machine learning.
We measure the performance of a system based on its trade history. We can look at the trading results from two different perspectives: (1) on the basis of only closed-out positions, or (2) on a bar-by-bar basis, by record- ing the opening equity of each position. In this book, we will study only the equity of closed-out positions.
We also can consider how technical and intermarket analysis can be combined with equity analysis to improve system performance. When we analyze which component of a trading system model generated a signal and combine this knowledge with trading performance feedback, we are able to see relationships that are important in modeling the markets but would not otherwise be observed.
METHODS OF VIEWING TRADING PERFORMANCE FOR USE AS FEEDBACK
The first method of viewing performance is to build an equity curve, which is a moving cumulative value of all closed out trades over the eval- uation period for a particular system. A modified version of this method is to view not all trades, but only closed-out trades, over a period of days-usualiy, the past 100 days.
Another method is to view a trade history, which can be generated in a program like The trade history would have a trade on each row and would show the type of signal, entry date and price, exit date and price, trade profit and loss, and current equity. al- lows exporting this type of history to a spreadsheet.
We can also view closed trade equity versus technical or intermarket relationships. For example, a change in equity can be plotted on the Y axis, and volatility on the X axis. Figure 10.1 is an example of this type of chart.
Alternatively, current volatility can be plotted versus the next N-day change in equity.
The interrelationships between the trading systems and the market price actions are very complex and are well hidden from simple analy- sis. When a system is complex and uses many indicators, it becomes
1 4 2 Based Market Prediction Using System Feedback to Improve Trading System Performance 1 4 3
2 3 35
FIGURE 10.1 A change in equity versus 1 volatility.
impossible to judge how it will perform in any given market condition. Feedback analysis is a valuable tool for making this impossible job man- ageable. All mechanical systems have a given trading pattern or “foot- print.” When we test most trend-following methods over a long enough time period, a common trading pattern emerges. The classic channel breakout system will win 35 to 50 percent of its trades, and the average winner will be much larger than the average loser. The winner will also have more bars in its winning trades than in its losing trades. Another often overlooked fact is that most trading systems are directly or indi- rectly based on cycles, System performance will change as the different dominant cycles in the market appear, disappear, and shift. We will also see changes in the trading results as changes occur in the composite of multiple cycles present in the market.
WALK FORWARD EQUITY FEEDBACK
In Chapter 9, we showed how we can simulate a trading system and calcu- late its adverse excursion on a system. We can then use this information to
develop stops for the actual trading system in a walk forward adaptive manner. The same idea can be used to adapt system parameters and rules based on a moving window of equity.
Let’s look at an example of how this approach can improve system per- formance. We will use a channel breakout, as in Chapter 4, and will apply this analysis to the D-Mark.
Channel breakout systems can be helpful using equity feedback be- cause there are dependencies for trades. For example, if the last trade on the buy side was winning, the chances of the next trade on the buy side, winnings are increased. Let’s now develop code for
which can track a simulated equity curve for both the long and the short sides. We need to simulate these trades because once we change the trades based on our analysis, we have, in effect, changed the system. If we want to develop statistics on our original system and use them to modify a new system, we need to simulate the trade. The code for sim- ulating both the long and short sides for a channel breakout system is shown in Table 10.1.
These two simple user and
Long-keep track of the equity on the side and the short side, respec- tively. They work well, but in order to simplify this example, we avoid handling several special cases. First case is that, if you are using
contacts, we do not handle cases in which prices of a commodity go negative. Another unaddressed issue is when both a long and a short signal are generated on the same day. These issues are not a problem with com- modities like the currency, the and T-Bonds, but they are a prob- lem with crude oil because this market often moves in a tight range. The
code for handling these issues exists but is beyond the scope of this book. Let’s now use these routines in the channel breakout trading system. We ran this system on the D-Mark, using data from to
Using equity analysis, we found a pattern that worked well on the D-Mark: Take only short trades when the system has been profitable on the long side but has losing money on the short side. Using the same
logic, we take only long trades when the system is making money on the short side and losing on the long side. We also wait 10 trades before ap- plying equity analysis. The code for our feedback channel breakout sys- tem is shown in Table 10.2.
We tested this code on the D-Mark data from the period to Our results are shown in Table 10.3, along with the results for the original system.
144 Statistically Based Market Prediction
TABLE 10.1 CODE TO SIMULATE EQUITY ON LONG TRADES ONLY.
Inputs:
Returns(O);
if then
If and then begin
end:
If and then begin
Position=-1; end;
if and then
Code to simulate equity on short trades Inputs:
Returns(O);
if then
If and then begin
end;
If and then begin
Position=-I; end;
and then
Using System Feedback to improve Trading System Performance 1 4 5
TABLE 10.2 CHANNEL BREAKOUT WITH
SIMULATED CODE.
Input:
If then begin
Buy point Stop;
Sell point Stop:
end;
If and then Sell
-1 point Stop;
at point stop;
If and then Buy
-1 point Stop;
at point stop;
By using this method of equity feedback to filter our trades, we reduced both the number of trades and the by almost half. We made 11 percent less money but increased our average trades by 84 percent.
Our second example, a channel breakout system applied to the D-Mark, used a moving-average crossover of equity as a filter for both long and short trades. We take only long trades when a faster period ing average of long equity is greater than a slower period one. We take only short trades when a faster period moving average of equity on the
TABLE 10.3 CHANNEL BREAKOUT ON D-MARK WITH AND WITHOUT EQUITY ANALYSIS.
Original System Equity Feedback Demo 1 Net profit
Trades 104 50
W i n % 50 54
Average trade $544.84 $1
146 Statistically Based Market Prediction System Feedback to Improve Trading System Performance 147 TABLE 10.4 CODE FOR MOVING AVERAGE OF EQUITY FILTER
WITH CHANNEL BREAKOUT SYSTEM.
Input:
If then begin
Buy 1 point Stop;
Sell 1 point Stop;
end; If then Sell 1 point Stop; at point stop; If then Buy point Stop; at point stop;
short side is above a slower period one. The code for this system is shown in Table 10.4.
On the basis of our analysis, we found that using a average of equity minus a average produced good results. It might be sur- prising to know that these two moving averages produce
when they are so close together. We were surprised, but almost all of the top sets of parameters had moving-average lengths very close together. Using lengths this close reduced our analysis to a mechanical way of saying that the last trade was profitable, and we did not have a quick or whipsaw. The results based on these parameters, over the same period used earlier, are shown in Table 10.5.
TABLE 10.5 RESULTS OF CHANNEL BREAKOUT WITH EQUITY FILTER.
Net profit Trades Win% Average trade Profit factor 69 2.11
Using this moving average filter, we cut the by over 200 percent and filtered out a little more than one-third of the trades. We did this while slightly increasing net profit.
HOW TO USE FEEDBACK TO DEVELOP ADAPTIVE SYSTEMS OR SWITCH BETWEEN SYSTEMS
Equity curve analysis is a powerful tool for improving the performance of trading systems. The examples presented are only a sample of what be done using this technology. In another application, this technol- ogy can be used to switch between different trading systems. Suppose we had a channel breakout system, a system based on intermarket analysis, and a countertrending type of system. We could simulate the equity curves for each of these systems, and then, based on our analysis, select the one that currently has the highest probability of producing the best trade. When developing these types of models, we can combine technical or fundamental factors with our equity curve analysis to further improve performance.
Another application of this technology is to adjust parameters for a given system in a walk forward manner. This can be done by simulating the equity curve of many different sets of parameters for the same sys- tem and then, based on our analysis, selecting the best one to currently trade.
WHY DO THESE METHODS WORK?
For a channel breakout system to work well, two conditions must be true: 1. The market must be trending.
2. The performance of a channel breakout system is linked to a rela- tionship between the period used in breakout and the dominant cycle.
If the cycle length becomes longer, then the channel breakout system will get whipsawed during Elliott Waves two and four. ADX can be used to see whether the market is trending. The problem is that the interaction between the dominant cycle and how much the market is trending is
148 Statistically Based Market Prediction
complex and has a major effect on the performance of a channel break- out system. Modeling this interaction would require developing complex rules that will make the system less robust. Equity curve analysis can be used to solve this problem because the equity curve contains information about this interaction that can be used to improve the system without a lot of complex analysis.
The concept of system feedback is a powerful trading tool that can im- prove profit, drawdown, and the winning percentage for most trading strategies. Trading a system without at least being aware of the equity curve is like driving a car at night without lights-possible, but dangerous.