Perry J. Kaufman. Smarter Trading. Improving Perfomance in Changing Markets
Home My photos Forex My trading Books Contacts
   
 

free download links about online stock trading, forex, futures, stock investing, market, trading systems
Improving the
Performance of Existing Systems

After the completion of tests, measuring and monitoring performance continues the process that results in a successful trading program. A careful comparison of actual results with expectations shows how well the testing was performed. Because there can be a tremendous gap between testing and trading, it should not be surprising that results are different. To be successful, however, they cannot be so divergent that expected profits are turned into real losses. It will be necessary to trade a system to know whether the testing assumptions were realistic. After that, it is necessary to figure out how to improve the program while maintaining its integrity. The following sections discuss some of these improvements.

Measuring and Monitoring Predictability

The most important part of performance monitoring is to discover whether you have correctly measured the risk of loss, and to find out as soon as possible. There are many ways to proceed when there are trad­ ing profits, but only one choice when losses are larger than expected. Monitoring actual results gives the only accurate assessment of expec­ tations. Before that, we can only estimate. Burdening tests with slippage and other costs that are too big will make good strategies look bad and

Making a Trading Strategy Robust

increase the time and effort needed to find a good trading method. On the other hand, expecting larger costs is safer than underestimating them.

What Do Ton Monitor?

We always monitor trading to find the difference between expected and actual results. Expected performance comes from testing; actual results come from trading. Actual results are not accurate if they reflect the trading of a small position when the intention is to trade a large one.

Deltas. The difference between an expected and an actual value will be called a delta (shown as the symbol A). There can be execution deltas to compare fill prices, and total performance deltas, as follows:

¦ Record the difference between the program's estimated trade price
and the actual average execution price. Separate the entry and exit
values, because there is often more finessing of entries:

long entry A = (system entry - actual entry) short entry A = (actual entry - system entry) long exit A = (actual exit - system exit) short exit A = (system exit - actual exit)

•  Record the system profits and losses from those trades not filled at all
(unables).

•  Calculate the total unit profit and loss for the system and actual
trades:

total unit A = (total actual P/L - total system P/L)/number of contracts traded

Although the most important value is the unit difference between the system's expected profit or loss and the actual results, the breakdown of those values provides information to help improve executions. The unit difference should be used to estimate future results, if nothing changes, and to use realistic transaction costs in testing. The other values are all evident. Chapter 2 discussed the impact of unables (those orders not filled) on profitability and showed that unables reduce profits but not losses, increasing the diffculty of trading a program successfully.

Liquidity

Execution problems can sometimes be caused by the type of order used to implement the trading system, but they are all related to market liq­ uidity. If your order is too big for the market at the moment it hits, then the execution is bad. It may be necessary to average in over a few hours, or shift the orders closer to the opening or closing of the trading session. Limit orders may need to be replaced by market orders spaced over a longer period. One thing is certain: If you do not execute each order given by the trading program, you cannot expect to achieve its results.

Feedback

Monitoring performance is the only way to find the real cost of trading. It is valuable information and can be used for testing other systems. Although different types of orders have their own peculiar costs, all of them have some slippage, and all of them have unables. It is most important that we know what they are.

Chi-Sqnare Test

In the spirit of simplicity, it does not require high-powered mathemat­ ics to know that your trading is not going as planned. A loss that is larg­ er than any historic one, or a series of losses longer than any before, is sure to get your attention. But not all situations are clear until they become a problem. The chi-square test is a simple way to compare his­ toric (expected) and trading (actual) results to find out whether some­ thing is wrong.

For example, your new system has had 20 trades and only 4 were profitable, but historic testing showed that 40 percent of the trades should be profitable. What are the chances that something is wrong? Use the chi-square test:

chi-square = © SUM ((actual — expected) A 2/expected)

The test is the sum of the percentage difference in the actual versus expected results. When the two numbers are very close, the chi-square value is small. To find out whether a chi-square value is large enough to indicate a problem, Table 11-1 must be used.

If you want to compare the frequency of profits, the expected profit frequency and the expected loss frequency are both used because the chi-square test requires a minimum of two cases:

Making a Trading Strategy Robust

Table 11-1. Distribution of Chi-Square

Cases

 

 

Probability of Occurring by Chance

 

 

Lessl

.70

.50

.30

.20

.10

.05

.02

.01

.001

1

.15

.46

1.07

1.64

2.71

3.84

5.41

6.64

10.83

2

.71

1.39

2.41

3.22

4.61

5.99

7.82

9.21

13.82

3

1.42

2.37

3.67

4.64

6.25

7.82

9.84

11.34

16.27

4

2.20

3.36

4.88

5.99

7.78

9.49

11.67

13.28

18.47

5

3.00

4.35

6.06

7.29

9.24

11.07

13.39

15.09

20.52

6

3.83

5.35

7.23

8.56

10.65

12.59

15.03

16.81

22.46

7

4.67

6.35

8.38

9.80

12.02

14.07

16.62

18.48

24.32

8

5.53

7.34

9.52

11.03

13.36

15.51

18.17

20.09

26.13

9

6.39

8.34

10.66

12.24

14.68

16.92

19.68

21.67

27.88

10

7.27

9.34

11.78

13.44

15.99

18.31

21.16

23.21

29.59

(actual profit freq - expected profit freq) A 2

chi-square = ----------------------- \ A ,.. « . ---- ^

expected profit freq

(actual loss freq - expected loss freq) A 2 expected loss frequency

where actual is the real trading performance and expected is the tested result. The expected profit frequency and expected loss frequency must total 100 percent:

(20 - 40^2 (80 - 60^2
chi-square = ------- ——— + -------- - 1 — = 16.67

Referring to Table 11-1, we compare the results of 16.67 with the first line because there are two cases. We see that 16.67 is greater than the value associated with .001 and is considered highly significant. Therefore, there is something wrong with the system if it shows a 20 percent trading reliability. But we have not yet considered the number of trades. Based on 20 trades, the sample error would be 1/@sqrt(20) = .22, or 22 percent. Then the value of 16.67 could fall to 13.00, still above 10.83. Certain levels are considered important for the chi-square test:

chi-square > .001 probability, then it is highly significant. chi-square > .01 probability, then it is significant. chi-square > .05 probability, then it is probably significant.

The chi-square test can show whether the actual pattern of price runs (the number of sequences of moves in the same direction) compares with a random distribution. Table 11-2 gives the columns of a spread­ sheet and the total of the column (E - A) A 2/E is the value of chi-square. For eight cases, Table 11-1 places the chi-square value at a level indi­ cating more than a 50 percent chance of the pattern of runs being ran­dom. As more cases are included, the statistic shows that the compari­ son gets closer.

Anticipation

Theoretical profits can only be realized with anticipation. Chapter 2 tried to point out that screen lag, slippage, and unables could easily change a theoretically sound trading strategy into a losing venture. One solution offered was to target profits per trade that are large enough to absorb the loss. Another way is to anticipate the trading signal. Be pre­ pared to execute an order at the exact time the technical system gets its signal, rather than waiting until you get a confirmation. Even better, execute the order just ahead of the computer.

To show the importance of anticipating signals, consider a moving average system using the closing prices. The system buys when the trendline turns up, and sells when the trendline turns down. Figure 11-1 and Table 11-3 compare performance of a selection of moving average speeds for entries taken on the same day as the moving average calcula­ tion with executions on the close of the next day. Three very different markets were tested, the Hong Kong Hang Seng Index, the Deutsche mark, and IBM. The trend speeds covered a reasonably broad range of 5 to 75 days.

The results form a clear pattern. Faster trends lose from 50 to 400 per­ cent of their profits when entries are delayed for one day. Slow trends

Making a Trading Strategy Robust


-400

65

55

75

25

35 45 Trend Speed

The three very differ­ ent markets show similar results from a 1 -day entry lag of a trend system. Fast trends have much worse performance while slow trends are not affected.

Table 11-3. Comparison of Same Day and 1-Day Lag Performance

 

 

Moving Average

Hang Seng

Deutsche Mark

 

IBM

 

Same

Next

Percent

Same

Next

Percent

Same

Next

Percent

Days

Day

Day

Change

Day

Day

Change

Day

Day

Change

5

106.8

55.2

(48.3)

10.0

(10.7)

(206.8)

38.7

4.9

(87.4)

15

82.7

44.1

(46.6)

23.0

(1.2)

(105.3)

8.7

(25.1)

(387.1)

25

55.9

22.3

(60.0)

35.9

(3.6)

(110.0

9.7

8.6

(11.5)

35

43.4

12.2

(71.8)

21.3

(13.0)

(160.9)

15.0

9.2

(38.6)

45

37.8

7.9

(79.1)

38.3

3.2

(91.8)

18.5

19.9

7.5

55

. 18.6

18.6

0.2

32.1

(10.3)

(132.2)

24.9

14.5

(42.0)

65

10.2

19.3

90.3

21.6

9.6

(55.7)

24.0

22.8

(5.1)

75

16.3

33.1

102.9

16.3

7.3

(55.0)

38.4

32.7

(14.8)

are not affected. This shows that timing is critical for the 5-day moving average and that the first day holds the largest profits: Hang Seng prof­its dropped 48 percent, the Deutsche mark fell from a 10 percent profit to a 10 percent loss, and IBM lost 87 percent. Longer trends are not as dependent on a specific entry price, and while the first day may be prof­ itable, it is not a large percentage of the total profit. The profits shown

Improving the Performance of Existing Systems 225

in the 75-day Hang Seng due to the delay should not be expected. It is most likely that it is simply a distortion due to fewer trades.

It seems reasonable that any short-term trading that depends on momentum, or a burst of price movement, to generate a buy or sell sig­ nal, will be hurt by a delayed entry. By knowing the price, in advance, at which a trading system will get a new signal, it is possible to elimi­ nate a number of problems. The most important is the ability to execute at the system price, not afterward. Small orders could be placed as stops or resting orders.

The need for better executions with faster trading implies that the bulk of the profits occur early in the trade. This supports the earlier dis­ cussion of profit-taking, which argues that holding a trade until the trend reverses causes the return/risk ratio to drop. The amount of prof­ it compared with the risk gets worse as you hold the trade longer.

Windowing Large Orders

Large orders can be executed by creating a window around the system calculation time, and entering orders throughout that window. For example, a forex trader has a momentum program based on hourly data. Once the 11:00 calculation has passed, he knows that a new buy signal will occur if prices are above 156.50 at 12:00 . Because his experi­ ence has shown that an order of 25 million $/sterling should only take 11 minutes to fill at that time of day, he starts buying at 11:55 if the price is safely above 156.50 at that time. If the executions take 10 minutes, the average price should be close to the price at 12:00 , when the computer calculates its signal and posts an entry price.

As the hour nears when the system signals are calculated, it usually becomes clear whether or not the order should be placed. Sometimes, prices are right at, or just below the (buy) signal price and you are not certain whether the order should be placed. If you start buying and push prices higher, then you force the system signal yourself. Yet wait­ing until after 12:00 might mean getting a much worse fill.

The fact that anticipation greatly improves returns tips the balance in favor of executing marginal cases. You begin filling the order slowly, watching for the 12:00 price. If it gives a signal, you finish filling the order; if not, you reverse the position as quickly as possible. Exiting a "false anticipation" is less costly over the long run than waiting until after the signal to begin executing the order.

A false anticipation can occur at any time. Prices can seem safely above a buy signal level, then plummet in the 60 seconds before 12:00 , even while you are buying. Once the 12:00 price is fixed, you know whether to continue or reverse the positions that have been set.

Making a Trading Strategy Robust

Calculating the Anticipated Price

Finding the signal price in advance is straightforward, but it requires some algebra. You write the formula for the moving average, Relative Strength Index (RSI), or other indicators based on the next period price (e.g., tomorrow for daily data), then solve for the next price. For exam­ple, a 5-day moving average for today is:

@ moving_average(price,5)

= (price + price[1] + price[2] + price[3] + price[4])/5

Using the function @sum(price,days), which sums the previous n days of price, we could shorten this to:

@moving_average(price,5) = @sum(price,5)/5

where price is the last price, price[1 ] is the prior price, and so forth. Using real numbers, we get:

@moving_average(price,5) =

(154.50 + 153.20 + 153.60 + 152.70 + 152.50)/5 = 153.30

What price is needed for tomorrow's close so that the moving average turns down by .10? The new value of the 5-day moving average @mov- ing_average would need to be equal to 153.20. By moving the calculation forward one day, we can find today's value using simple algebra:

@buy_signal = 153.20 = (next_price + @sum(price,4))/5 then next_price = 153.20*5 - @sum(price,4)

which solves for next_price by multiplying both sides by 5 and subtract­ ing the sum of the four known values from both sides. The values @sum(price,4) are the most recent four prices. Using the sample prices gives:

766.00 = next_price + 154.50 + 153.20 + 153.60 + 152.70 152.00 = next_price

Therefore, the moving average turns down by .10 if the price of the ster­ ling closes at 152.00 or lower. Box 11-1 gives a few common formulas and the calculations for anticipating the next price.

Equipment with Programmed Studies

Complicated calculations are not necessary if you use one of the many pieces of quote equipment with preprogrammed studies. TeleTrac, TradeStation, MarketView, CQG, and many others already calculate mov­ ing averages, stochastics, and other indicators in a way that allows" you to change the number of periods in the calculation. The last price is automatically used to find the next value, therefore the machine is con­ stantly telling you whether you will get a signal at the next 15-minute, hour, or daily interval. Institutions that plan to customize the process will find the formulas in Box 11-1 to be helpful.

Filtering System Signals

Trading risk increases with high prices and high volatility. Because there are so many unique strategies and time frames, the "high" level associated with risk that is "too high" is likely to be different for each one. One approach to controlling risk is to use a protective stop; how­ever, the market can jump through your risk level at exactly the time you need that safety the most. Financial stops based on personal risk preferences have been discussed as ineffective protection. And, while logical stops (based on significant support and resistance levels, or out­ side factors such as economic indicators) may reduce day-to-day risk, they cannot protect the loss due to a price shock. Whether you intend to hold a trade for an hour, a day, or a year, a price shock will produce the same loss if you are unlucky enough to be in the wrong position.

Filtering Price Levels

Often, a pattern of trading performance is associated with entering a market at a significantly high or low price. And, while the term "low" is reasonably clear, "high" is not obvious. Physical products can be con­sidered low at levels equal to the lowest prices seen during the past 10 years, or at the cost of production. Controlled markets, such as crude oil, may have a different pattern.

Both low and high price levels vary with inflation and structural change. Again, low prices do not present a difficult problem. If you were trading a long-term moving average for copper, and prices dipped below 50 cents per pound, there would be limited opportunity for prof­ its by going short. Yet a short position at 45 cents would have nearly the Moving Average

@moving_average(price,n) = @sum(price,n)/n where n is the number of periods.

The next price needed to generate a new buy or sell signal, where the moving average value rises or falls by the min_move:

buy_signal = pricefn] + n*min_move selLsignal = price[n] - n*min_move

For a spreadsheet (in typical row 75), and a 10-day moving average, this becomes

Column A: Date

Column B: Price

Column C: @ Sum(B75. .B66) Sum of past 10 days

Column D: +C75/10 10-day moving average

Column E: @ Sum(B75. .B67) Sum of past 9 days (MA less 1)

Column F: +D75 + 1 Buy signal is minimum upmove for

moving average

Column G: +D75 — 1 Sell signal is minimum downmove for

moving average

Column H: +F75*10 - E75 Lowest price to give a buy signal Column I: +F75*10 - G75 Highest price to give a sell signal

Exponential Smoothing

@exp_ma(price,sc) = ema = ema[1] + sc x (price - ema[1])

where sc = the smoothing constant expressed as a percentage ema = the value of the trendline

The next price needed to generate a new buy or sell signal is: @buy_signal = ema.+ min_move/sc @sell_signal = ema - min_move/sc

Momentum (Price Difference)

@momentum(price,n) = price - price[n] The next price needed to generate a new buy or sell signal is:

@buy_signal = price - price[n] + price[n - 1] + min_ move @sell_signal = price - price[n] + price[n - 1] - min_move

Making a Trading Strategy Robust

same risk as a short entered at 60 cents. As prices reach absolute lows, the profit potential for short positions decreases faster than the risk.

High prices are different. The tail of the price distribution is very long on the upside, which means that prices can move up to surprisingly high levels. Even adjusted for inflation and other economic factors, it is difficult to tell where a new long position has greater risk than reward. To make it more complex, some programs perform better when prices and volatility are high.

A scatter diagram, as shown in Figure 11-2, can be used to find an entry price for a crude oil trend-following system. It plots the entry price level against the resulting profit/loss. The trades have been sepa­ rated so that Figure ll-2(a) has only the long positions and (b), only the shorts. Oil is an interesting example because OPEC tried to hold the offi­ cial selling price at a fixed level, about $20/bbl during this period. Other markets have their own patterns, equally as interesting.

Trend Longs. Crude oil gives a clear example of the risks associated with entering at a relatively high price. Long positions (see Figure ll-2(a)) generate many small profits and losses, and a few larger profits, below entry levels of $25/bbl. Most losses are clustered together and are less than $4/bbl, while profits net as much as $12/bbl. Frequent small losses and a few large profits comprise a profile typical of a trend-following system. At entry prices above $25/bbl, there are only losses, and those losses have a pattern of getting larger as the entry price increases.

The total picture seems very understandable. There is less opportuni­ty and more volatility when long positions are entered at very high lev­ els. Of course, without a diagram such as this, it would be difficult to know what was "high." Because we know that OPEC targeted an offi­ cial selling price of about $20/bbl. during this test period, other patterns can be seen. For example, profits dropped as the entry price neared $20. Larger profits were made when oil prices dropped well below the OGSP (Official Government Selling Price). Unfortunately, this analysis bene­ fits from hindsight. If OPEC's target price had dropped to $18/bbl, we could have expected a decline in profits for long positions entered near that level. We could have reasonably expected the same performance pattern, centered around a new level. Had we chosen a longer test peri­ od, including oil prices that were stable at $30/bbl, the pattern would not have been nearly as clear because it would have included more than one target area.

Trend Shorts. We would expect to have more opportunities for profit by setting new short positions at high prices. Figure ll-2(b) shows that one trade produced a profit just under $14,000 on a 1,000-bbl contract, and four other short positions, entered above $25, posted larger than average loss­ es. As expected, shorts entered below $15/bbl, a relatively low level, also produced losses. The pattern shows that volatility, for both profits and losses, increases as the price increases.

Price Level, Profits, and Risk. Unadjusted price levels, plotted against profitability, paint an understandable picture. Neither inflation nor price evolution can alter the fact that entering new shorts at low levels has little opportunity and unattractive risk. Buying at high prices is never as clear, but experience indicates that the risk of a large loss is much greater than the opportunity for any profit. Market factors should prompt periodic reevaluation of those levels, but only a simple analysis is needed to see the obvious benefits.

Filtering Volatility

The volatility at the time of entry is a more dependable indication of expected profits and losses. Even more important, high volatility means high risk. A trade that has a good chance of being a loss, and includes high risk, is an excellent candidate for elimination. Figure ll-3(a) shows plots of the same WTI trades seen in Figure 11-2, this time using entry volatility against profits and losses. Volatility was calculated as the 10-day average of the absolute price changes (in $/bbl).

Filtering Volatile Long Entries. Figure ll-3(a) shows a similar, but slightly regrouped, pattern as the one in Figure ll-2(a), where entry price was used. A steady pattern of losses appears when long positions are entered during high volatility. The chart shows that these cases of high volatility also occurred at high price levels. Longs set during periods of low volatility were profitable, and some do not correspond to the lowest price levels, which showed some losses.

Filtering Volatile Short Entries. Short positions are different when plotted against volatility rather than price entry. Many of the trades are pushed to the far left where they are entered at about the same volatility level, and the remaining five trades were set when volatility was from 2.5 to 6 times greater. The trades entered on high volatility were predictably larger losses.

Making a Trading Strategy Robust

Using Filters

The charts for filtering trend-following trades using entry price and volatility show the simplest choices and the clearest results. Although this example only used crude oil, the same patterns will appear for other commercial and industrial products, where there is a real high and low level. Currencies are different and more complex. There are no absolute levels for exchange rates. The temporary normal levels are set by each country based on their relationship with trade partners. When the cur­rency is at an acceptable level/or equilibrium, volatility is low. When prices move away from equilibrium, by becoming either stronger or weaker, they become more volatile. You might consider a currency price as "high" when it is away from normal, and "low" when it is at the nor­ mal level. For currencies, volatility is the only measurement that counts.

Expectations

Filtering trades is a clear way to improve performance, where there are a few concepts are fundamentally sound. Using volatility does not nec­essarily improve profits, but it should always reduce the risk more than the profits, giving a much better performance profile.

Programming Rules for Filters

This method of filtering was chosen because the volatility calculation can be made at the time of the entry decision. If the volatility is too high (or too low) then the trade is not taken. The following steps are necessary to find the best filters for a trend-following system:

•  Select a trend-following method, such as an exponential moving
average.

•  Produce a table of all trades, summarizing the net profit and loss
from long and short positions separately.

•  Calculate the volatility at the time of entry. Use the sum of the
absolute price changes over, for example, 5 days (as in the crude oil
example).

•  Move the position (long or short), entry volatility, and profit/loss to
a spreadsheet. Move entry price if you intend to do a price-level
analysis.

•  Plot all the long positions on a scatter diagram with volatility versus
net profit/loss. Plot the short positions in the same way.

•  Visually identify the levels of highest risk and consistent losses. You
may want to eliminate all trades with entry volatility either too high
or too low.

•  Add the volatility filter(s) to the trend system by testing volatility at
the same time that a trend entry occurs.

Reversing the Optimization Concept

In Chapter 10, broad-based testing (called "optimization") is used to evaluate the merits of a trading strategy, or to see if a change of rules improves overall results. We anticipated large regions of profits, allow­ing us the latitude of selecting from many parameter combinations, any one of which would trade successfully. Now consider the worst results. It is common to see erratic patterns of profits and losses in the fast trading zone. If these losses are not caused by transaction costs, they indi­cate a very good place to enter a new trade in the direction opposite to the long-term trend position.

For example, a long-term trend produces two trades per year, while a comparable 5-day model generates one new trade each week. Both fast and slow models have a buy signal at the same time. We expect that over the longer interval the trade will be profitable, while the short-term sig­nal has a high likelihood of being a loss. This tells us that, in the short term, prices should be lower than the immediate entry point; otherwise, the short-term trade would tend to be profitable. It is not a good time to enter the long-term trade, nor is the timing of a longer trade particularly important (as seen in the section, "Anticipation," earlier in this chapter).

Trading Rules

Soon after the long- and short-term signals occur, the short term is closed out with a loss. If our timing is right, the faster model now goes short. Because this position is also expected to be bad, we set part of our long posi­ tion. If the fast system produces a loss, our timing would have been good. A sensible plan for systematizing entry points that follows from this reasoning is:

•  Select a long-term profitable trading strategy for determining market
direction.

•  Select the short-term strategy with low reliability and losses not
including transaction costs.

Making a Trading Strategy Robust

•  Enter V 3 of the trade when the long-term model gives a (buy) signal.

•  Then enter % of the trade when the short-term model closes out a
(long) position.

•  Finally enter V 3 of the trade when the short-term model enters an
opposite (short) position.

The market will give signals when it is volatile, appearing to show immediate profits. Most often, these fast-moving markets have very high slippage, and reverse sharply once the initial momentum lapses. Placing an order for V 3 or V t of the full position gives you an opportuni­ ty to decide objectively whether this method improves the performance of the basic approach. The last 2 / 3 of the liquidity is set while prices are moving contrary to your objectives; therefore, slippage should be low.

Overnight Risk

Moving through Time Zones

Opening price gaps can cause windfall profits or losses, and increase overall risk. They represent uncontrollable risk. For many financial market and foreign exchange traders who watch the U.S. , European, or Far East markets only during their business hours, that risk can be siz­ able. For the growing number of traders who have facilities to follow a market as it moves through time zones, it is possible to reduce a large part of the risk.

Expanding liquidity in world markets allows nearly continuous, 24-hour trading. Agreements between major exchanges make execution transparent with regard to order placing and margining. You can buy in Chicago during the morning and sell in Singapore 12 hours later by call­ ing the same local trading desk. Or, you can use Globex or any of a num­ ber of other electronic exchanges with growing liquidity and great convenience.

To understand the importance of opening gaps, Table 11-4 compares the size of the average opening gap with the daily close-to-close price move for a broad selection of futures markets. Figure 11-4 gives the per­ centage of the opening gap relative to the net daily move.

Favoring Primary Markets

The results show that primary markets have smaller opening gaps and less risk. U.S. bonds, trading on the Chicago Board of Trade represent the primary market for bonds during its normal business hours.

Table 11-4. Overnight Risk

Total Points

 

Exchange

Open

Close

Days

Day

%

Financials

CBT U.S. Bonds MM U.S. T-Bills LIFFE Euroyen LIFFE German Bund LIFFE JGB

126.7 11.17 1.83 9.91 14.60

515.87 20.39 8.67 20.26 22.57

1280 369 100 142 122

0.10 0.03 0.02 0.07 0.12

24.6 54.8 21.1 48.9 64.7

Currencies

IMM D-Mark (in %) IMM British Pound

2.18 0.89

3.80 1.07

1056 167

0.21 0.01

57.4 83.2

Metals

CMX Gold CMX Silver

229 2586

310 4380

242 1056

0.95 2.45

73.9 59.0

Other

NYMEX Crude Oil CBT Soybeans CME Pork Bellies

10.97 1141 416.7

20.26 2295 916.8

142

597 1056

0.08 1.91 0.39

54.1 49.7 45.5


Pork Bellies Soybeans Crude Oil

Silver Gold

British Pound Deutsche Mark

JGB

German Bund

Euroyen

U.S. T-Bills

U.S. Bonds

10

20 30 40 50 60 70 Percent Represented by Opening Gap

Figure 11-4. Opening gaps as a percentage of the dally move. Markets with active 24-hour trading and those whose primary markets are closed show much larger opening gaps than exchange-traded markets that are open at the same time as their primary cash market. These large opening gaps translate into uncontrol­ lable risk.

Making a Trading Strategy Robust

Similarly, the Euroyen traded on the London International Financial Futures and Options Exchange (LIFFE) is active during its primary market. These showed the lowest impact of opening gaps, 24.6 and 21.1 percent, respectively.

The worst performer, the British pound trading on the IMM, had 84 percent of its move overnight. We can conclude that during the time between the London opening and the IMM opening about 5 hours later, most of the financial news affecting the sterling was already in the mar­ket. Prices had moved to their proper level and the IMM was faced with "catching up." The Japanese Government Bond (JGB) traded in London is similar. Most of the news relevant to the JGB occurs while the LIFFE is closed, therefore 64.7 percent of the daily move is missed due to the opening gap.

The average level of overnight risk might be as high as 50 percent. We can account for the large gaps in gpld by recognizing that it is an inter­ national store of value; therefore, it is traded around the world. Soybeans and pork bellies are fairly domestic markets, yet show high overnight risk. From this, we should expect that these gaps will add slippage to both entries and exits.

Leverage, Costs, and Trend Speed

Leverage and transaction costs.exert an overwhelming influence on a trend system, and they define a basic difference between stock and futures trading. Futures markets require a margin deposit of only 5 per­ cent to trade most markets; it can be much lower for currency spreads and as high as 10 percent for a stock index. Using a slower trend for trading causes positions to be held longer and results in larger equity swings. Faster trends are often used because the risk per trade is reduced although the sequence of profits or losses that form the total equity variation may not change.

The best reason for using a faster trend-following approach is that it offers more distinct opportunities for entering and exiting the market. If you had the choice of two systems, a 25-day moving average and a 50- day moving average, each returning the same profit/risk ratio with transaction costs considered, the faster 25-day program would be the tempting choice. More trades allow the following:

•  Profit objectives to be set closer and reached more often

•  Smaller individual losses

•  The application of trend timing to other objectives, such as hedging

•  The variation of position size by trade

In general, more trades mean a better sample, hence a more realistic result. These advantages must be offset against the fact that longer trends are often successful because they parallel government policy and funda­ mental influences. A 200-day trend in U.S. Treasury bonds might have held a long position for three years, netting exceptionally large profits and offsetting losses in real estate or other weaker parts of a portfolio.

Transaction costs are negligible in the financial and futures markets. A contract with a $100,000 face value can be traded (round-turn) by an active investor for as little as $10, or 1/10,000 of its value, while a 1 per­ cent charge would not be surprising for an individual stock trader. At 1 percent, one stock trade every two weeks takes no less than 26 percent from your trading profits each year. Gross trading profits must exceed 40 percent per year just to be better than a passive stock portfolio.

Because of high commission costs and the slippage associated with frequent trading, many stocks show gross profits (without transaction costs) for tests of fast moving average systems. This profit window exists because small traders cannot benefit from a program where the profit from each trade is less than V 2 percent. Institutions cannot trade enough volume, nor would they want to appear that active, in order to take advantage of a small window. Therefore the opportunities remain, waiting for a change in the market or the players.

Figure 11-5 shows how faster trading, which must have smaller prof­ its, is greatly affected by transaction costs, while long-term positions are


 

 

Trend Speed

Figure 11-5. Effects of transaction costs on performance. Faster , trading must overcome large transaction costs to be profitable.

relatively unaffected. Highly leverage trading, such as futures and forex, exaggerates this pattern further. A cost of .0002 for each entry and exit for the Deutsche mark is only .025 of 1 percent based on full value; however, 5 percent margin makes that .5 C/ 2 percent), 20 times larger. A small trader can expect to pay more than twice that rate.

It may be difficult to see the advantages of slower trading over faster. The ability to leverage an investment allows smaller profits to be large percentages. Testing without the correct transaction costs, including commission, slippage, and unables, will often make the results appear to favor the faster trends, while the slower ones always hold the advan­ tage. Large profit objectives of 200 basis points will absorb many prob­ lems that will hurt fast traders looking for 20 basis points in the Deutsche mark. Results will be more realistic, price shocks will have a smaller effect, and fundamentals will enhance the positions. Being real­istic about leverage, profits, costs, and risk translates into staying power and success.

Appendix Notation and Terminology Index

Adaptive moving average:

calculation of, 138,140-141

codes:

Easy Language, 151-153 TeleTrac, 150

efficiency ratio and, 140-141

examples of: Castrol, 139 Deutsche mark, 139,142-143

programming, 147

testing, 146

Agricultural markets, 16 Annualized compounding, 43 Anticipation:

calculations for, 228-229

executions, 225

false, 225

large orders, 225

price calculation, 226

quote equipment, 227

significance of, 223

trend speed and, 223-225 Arbitrage:

computer technology and, 4,38

trade-offs, 32 ARIMA (Autoregressive Integrated

Moving Average) models, 10 Artificial intelligence:

application of (see Expert systems)

defined, 12

fuzzy logic, 171-173

neural networks, 164-171

pattern recognition, 12,160

types of, generally, 12,157 Artificial neural network (ANN) (see

Neural networks) Asset allocation:

efficient frontier curve, 51

fast-netting method, 60-61

return/risk ratio, 53

At the market orders, 22

Bank of England , 27

Bank trading, impact of, 4

BASIC, 186

Best Choice Index, testing process, 181,

204,207-208 Best Choice test, 47 Bolton-Tremblay Index, 9 Bond market, during recession, 19 Bond portfolios, currency vs., 46 Breakout system, 22 Brokerage fees, 22 Buy and sell signals:

alternate rules, 145-146

trading rules, 143

C, 186

Capitalization, trading safety, 49-50

Cash markets, testing, 193-194

Castrol, adaptive moving average exam­ ple, 139

Chicago Board of Trade, 236

Chi-square test, 221-223

Closing prices, 20-22

Commodity arbitrageurs, 32

Commodity price, determination of, 6

Commodity Trading Advisors, perfor­mance measurement, 55-56

Common sense, risk reduction strategies and, 61-65

Competition: arbitration and, 32 impact of, 4

Compounded annualized rate of return formula, 199

Compounded rate of return, 42-43

artificial intelligence, 157-160

expert systems, 160-164

neural networks, 164-171

price application, 156-157

teaching process: erector set illustration, 158-159 significance of, 156-157 Computer software, strategy-testing,

Computer technology, impact of, 3-4 CompuTrac, 186 Confidence level, 5-6 Consumer Price Index (CPI), 5,115 Contour map, 100-102, 204-205,210 Corporate earnings, 5 Correlations:

forecasting, 63

risk reduction and, 57-60

time periods and, 62-63 Countertrend systems:

expectations and, 31

stop-losses and, 103

trade-offs, 32

CQG, anticipated price calculation, 227 Crude oil:

trend-following test, 14-15

trend longs example, 230 Currency:

bond portfolios vs., 46

floating, 12

Daily compounding, 43 Data:

accuracy of, 192

amount of, 37-38,189-191,214

artificial series, 119-120

gap-adjusted series, 195-196

integrity of, 215-216

risk assessment, 119

selection of, 192-193

testing, 193-194 Deleveraging, 104-105 Deltas, 220 Derivatives:

leverage and, 46

risk reduction strategy, 55-56

structural changes and, 16 Detrended equity, 43

Deutsche mark:

adaptive moving average example, 138-139,142-143

closing prices, 21

price shocks and, 115-117

stop-loss tests, 100-102

trading activity, 13 Discretionary trading, 38 Dividends, 5 Dow, 15

Easy Language, adaptive moving average

programming, 147,151-153 Econometric analysis, 37 Economic evolution:

effect of, 12-13,17

maturing markets: new markets compared to, 13,15 price trends and, 12-13 Ef ratio, 11 Efficiency ratio:

adaptive moving average and, 140

defined, 134-135

mapping, 136 Efficient frontier curve, 51 Elliott waves, 10 Entry points, systematizing plan,

235-236

Equity markets, 5 Equity patterns, types of, 42 Errors of omission, 214 European Currency Unit (ECU), 16 European Monetary System (EMS), 3,12,

27-28,115,193 Execution:

anticipation and, 225

price strategies, 25

problems, types of, 22-23

stop-losses and, 93-94 Expectations, significance of, 40 Expert systems:

computer technology and, 38

conflict resolution, 163-164

defined,12

forward chaining, 161-163

knowledge base, 163

terminology, 160-161

validation, 164 Exponential moving average, 130,141

Exponential smoothing formula, 229

Fuzzy logic (Cont.): terminology, 171-172

False anticipation, 225 False signals, filter for:

impact of, 144-145

self-adjusting filter, 144 Fanning industry, storage facilities, 16 FastK, 9

Fast market, 22-23 Fast-moving averages, 134 Feedback, 189,221 Fibonacci spirals, 10 50-year rule, 49-50 Filtering:

expectations and, 234

false signals, 144-145

price levels, 227, 230-232

programming rules for, 234-235

utilizing, 234

volatility, 232-233 Forecasting:

computer technology and, 33-35

correlation coefficients and, 63

globalization and, 28-29

indicators and, 35-37

price, 5-7 Foreign exchange markets:

adaptive moving average example, 139, 142-143

automation and, 4

maturing of, 13

risk and return dilemma, 51 Forex trading, 13 FORTRAN, 186,196 Frequency distribution, 64 Fundamental analysis:

defined, 5-6

trend-following and, 130-131 Futures contracts, testing data, 194 Futures market:

foreign exchange, 16

locked-limit moves, 25 Fuzzy logic:

defined, 12,171

deoptimization, 173

fuzzy reasoning, 172

practical solutions, 172-173

state of the art, 173

suboptimization, 173

Gann lines and angles, 10 Gap-adjusted data series:

building, 195-196

testing, 195

Generalized fractal efficiency, 134 Globalization:

change and evolution, 28-29

effect of, 26-27

inflation and, 27

noise factors, 27

seasonally, 28

Goldman Sachs Commodity Index, 37 Government policy, impact of, 5 Graphics, split-screen, 11 Great Britain , 27 Gross National Product (GNP), 5

Hang Seng Index, 13,179

High-volume trading, execution problems,

23

Histogram, 64 Historic testing, 111, 126,178

IBM, 4,13,15

IMM (International Monetary Market), 21,

108,238

Index data series, 195 Indicators:

function of, 35-37

stock market advance/decline, 9-10

types of, 8-9 Inflation:

effect of, 4

globalization and, 27 Interest rates:

during recession, 19,57

economic trends and, 5 Intraday trading:

estimated fills, 25

execution problems, 23 Isolationism, 26

Japan, fuzzy expert systems, 173

Japanese Government Bond (JGB), 238

Lane, George, 9 Largest drawdown, 202 Learning by feedback, 5 Leverage:

performance monitoring and, 238-239

risk reduction and, 106

risk and return, 46 Limit orders, 20,22-23,221 Liquidity, 103,221

London International Financial Futures and Options Exchange (LIFFE), 238

Long-term trends, profit-taking and, 81 Long test period, 188 Lotus, 147,186

Neural networks:

artificial, 165-166

defined, 12

forever learning, 170-171

regression analysis and, 12,34

terminology, 164-165

tests, 169-170

three-layer system, 166-167

threshold analysis, 37

training: example of, 168 process, 167-168

trial and error, 168 Nikkei, 26 Noise:

globalization and, 27

stop-losses, interference with, 91-92

trend trading, 131 NYMEX crude oil, 15

anticipated price calculation,

Market volatility (see Volatility) Mathcad, 186

MATIF CAC-40 Index, 13,190-191 Mature markets:

new markets compared to, 13,15

price trends and, 12-13 Maximum drawdown, 48,202 Maximum volume, calculation of, 26 MetaStock, 10,107 Momemtum (price difference) formula,

229 Moving average:

adaptive (see Adaptive moving average)

calculation of, 8

declining stock and, 9-10

defined, 7

formula, anticipation signals and, 228

software programs, 10

trend identification, 129 Multiple decision-making programs, com­ puter technology and, 38 Multiple regression analysis:

answer to, 5-6

application of, 5-6

price forecasting, 6

standard econometric analysis and, 37

OPEC (Organization of Petroleum

Exporting Countries), 12,15 Optimization:

defined, 178,235

performance example, 179

reversal of, 235-236 Options:

on futures, 16

leverage and, 46

Orange juice industry, seasonality, 16-17 Overfitting, 177-178,213,216 Overnight risk:

opening gaps, 237

primary markets, 236,238 Overtesting, 216

Parameters (see Robustness testing, para­ meter selection) Parity, 16 Pattern recognition, 12,34-35,37-38,

Pension funds, 12-13 People's Republic of China (PRO:

emergence of, 3,28

world trade and, 17 Percentage of profitable trades, 202 Performance curve, test results, 208 Performance data, significance of, 37-38

rformance monitoring: chi-square test, 221-223 deltas, 220 feedback, 221 liquidity, 221 significance of, 219-220 Performance profile, 67,92,105 Perpetual contracts, 213 Portfolio diversification: benchmark, 54

correlation coefficients and, 58 globalization and, 27 return/risk ratio, 53-55 as risk reduction strategies, 53-60 Price(s): bundling, 16 changes, 5 quote screen, 19-20 Price levels, filtering: profits and risk, 232 trade patterns and, 227,230 trend longs, 231-232 trend shorts, 230-232 Price shock(s): assumptions and, 113 elimination of, 111,113 expectations and, 107-109,115 frequency of, 115-117 gaps, 115-117 handling strategies:

artificial data, creation of, 119-120

risk assessment, 119 high risk, 107-109 historic testing, 211-212 impact of, 110-111,115,117 key concepts, 118 management of:

large losses, 124,126

long-term systems, 126-127

obligations, 126

qualification of, 121

risk reduction, 124

short-term systems, 126-127

structural changes, 124 ranges, 115-117 recognition of, 103 short tests and, 115 types of, 61,109-110,112-115 unpredictability of, 39-40 Producer Price Index, 37

Professional traders: performance of, 105 price shocks and, 49 Profits per trade, 199 Profit-taking:

adaptive moving average and, 146 advantages, 73 disadvantages, 73 profit objective:

more than one objectives, 83-85

one objective, 81-82

risk and, 85-86

time vs., 81-82 reasons for, 80-81 stop-losses, 87-88 test for:

coding system, 77

profit-taking levels, 76

results, 77-79

trend formulas, 75-76

trend and profit-taking rules, 76 time interval and, 81-82 trading strategy, improved, 86-88

Quattro, 44,147,186

Quote screen: function of, 19-22 spread profits, 20

Recession, impact of, 19,57

Relative Strength Index (RSI), 8-9,

Resting orders, 20,225 Return/risk ratio: asset allocation, 53 best choice test, 47 defined, 68 formula, 199 Risk:

acceptable, 50,212 business risk, 61-62 control of (see Risk control) correlation coefficients: forecasting, 63 risk reduction and, 58-^60 time periods and, 62-63 diversification and, 53-65

Risk(Cont.):

evaluation of, 65

fair approximation evaluation formula, 67-68

graphing:

frequency distribution, 64 function of, 51 skewed distributions, 63-64

profit goals and, 66-67 ,

reduction strategies (see Risk reduction strategies, diversification and)

risk of ruin: defined, 65-66 profit goals and, 66-67

risk protection (see Risk protection)

semivariance, evaluation method, 65

stop-losses and, 89 Risk-adjusted returns, 202 Risk assessment:

50-year rule, 49-50

guidelines, 119

maximum drawdown, 48 Risk control:

need for, 90

protective stops, 227

worst-case scenarios and, 215 Risk protection strategies:

correlations, 58-60

portfolio diversification, 57

stop-losses, 90-91,117-118 Risk reduction strategies, diversification and:

adding assets, 54-55

asset allocation techniques, 53

asset selection correlations, 57

common sense, 61-65

correlation coefficients and, 58-60

derivatives and, 55-56

simple, 53

stock and bond portfolio, 53-54 Risk and return:

acceptable risk, 50

best choice, 47

calculating) 44-45

currency vs. bond portfolios, 46

foreign exchange dilemma, 51

leverage, 46

risk preference, 41-42,227

standardizing, 42-46

trend-following system test, 47

Risk and reward: "best" choice, 52 graphing risk, 51 Risk-to-time curve, 48 Robustness testing: overfitting, 177-178,213,216 overnight risk, 236-238 parameter:

optimized performance example, 179 principles, 179

robustness determination, 180-181 selection (see Robustness testing, test­ ing process) testing process: deciding how to test, 186-204 deciding what to test, 182-186 guidelines for, 213-217 parameter selection for trading,

209-213 performance, trading and monitoring,

212-213

results evaluation, 204-209 Russia :

economic growth in, 3,17 globalization of, 28 Moscow coup, impact of, 108,114

S&P:

monthly equity change example, 48

price shocks and, 115-117 Screen trading execution lag, 26 Seasonals, 4,15-17,28 SENSEX, 47

Shares, fundamental analysis and, 6-7 Shock-adjusted price series, creating,

122-123 Short-term trading:

execution problems, 23

losses from, 89 Short test period, 186-188 Significance, illustration of, 36-37 Slippage:

calculation guidelines, 26

defined, 22-24

execution problems and, 23

impact of, 24

normal, 25

reduction strategies, 24-25

stop-losses and, 94

SlowD, 9

SlowK, 9

Slow-moving averages, 134

Small lot stop orders, 26

Smoothing, two-dimensional, 204

Spectral analysis, 10

Spread price, 20

Spread profits, nonexistent, 20

Spreadsheets:

adaptive moving average programming, 147-149

strategy-testing software, 10-11 Standard deviation:

annualized, 43

equity and equity changes, 45

formula, 199

loss, determination of, 43-44

test performance and, 181

time intervals, 48 Statgraphics, 186 Step-forward test:

hidden problems, 189

long test vs., 188-189

parameters and, 192 Stochastics, 9,198

Stock and futures market, special situa­ tions, 193 Stock index:

fundamental analysis and, 6-7

futures, 16

Stock market crash (1987), 40,117,124 Stop-losses:

conflicts with strategy, 103-104

expectations, 93-94

market noise interference, 91-92

performance profile, 92

professional traders and, 105

profit-taking, 87-88

risk management, 104

risk reduction, 33, 89

setting stops, 90-91

system testing:

being out of the market, 98,100-102 intraday stops with daily system,

96-98 results, 95 short test period, 95-96

value of, 4

Stopped-out position, reentering, 104 Stop orders, 20, 22,225

Strips, computer technology and, 38 Structural changes:

price shocks and, 121

seasonality, 15-17 Supply and demand, 5 Survivor bias, 214-215 Sw'ss franc, 21

price shock, impact of, 107

risk and return calculation, 44

strategy testing, 186

technical analysis, 10-11

Technical analysis:

automating, 7

defined, 7

indicators: stock market advance/decline,

9-10 types of, 8-9

moving average, 7

new technology and, 11-12

purpose of, 39

status of, 10-11

trend trading and, 8 Technical trading, 39 Technological advances, impact of, 4-7,

33-34 TeleTrac:

adaptive moving average programming, 147,150

anticipated price calculation, 227

efficiency ratio calculation, 11

optimization, 111, 179

price changes, 107

profit-taking test, 75

risk and return calculation, 44

technical analysis and, 10 Test of reasonableness, 164 Tests/testing (see specific types of tests) Threshold analysis, 37 Time intervals, significance of, 48,81-82 Time periods, risk and, 48,62-63,68 Time to recovery, 203 Trade-offs:

neural networks, 170

risk and reward, 32-33

types of, 31

unreasonably good results, 33

Index

anticipated price calculation, 227 Trading floors, computerized trading and,

Trading safety, 49-50 Trading signals (see Anticipation;

Filtering) Transaction costs: brokerage fees, 22 losses and, 94 testing process, 197 trend systems and, 238-239 Trend-following: adaptive approach: market traits and, 133-134 specific to general solution,

134-135

traditional solution, 133 trend speed ranges, 136,138 adaptive moving average (see Adaptive

moving average) cost estimation, 25 execution problem, 23 fast, 22,238

fundamental analysis and, 130-131 profitability, 14-15 pure, 31

skewed distributions, 63-64 trade-offs, 32 trading rules, 143-146 trend identification, 129-130 Trend speed:

distribution, test selection, 200-202 efficiency ratio and, 141 performance monitoring, 238-240

Trend speed (Cont.):

ranges, 136,138

Trend systems, stop-losses and, 103 Trend trading:

lags, 131-132

noise, 131

slow trends, 131-132

technical analysis and, 8 Two-dimensional displays, 203-204

Unables: defined, 22

execution problems, 23 reduction strategies, 24-25 test results, impact on, 197 United Kingdom , 4 U.S. dollar, decline of, 16

Volatility:

economic changes and, 4-5 filtering, 232-233 globalization and, 28 measurement, 137 noise and, 140 price trends, 12,15

Weighted average, 130

Weighting factors, 5

Wilder, Welles, 8

Windfalls, profit/losses, 121,124,236

Worst-case scenarios, 25, 111, 119,215

WTI trend system:

price level filtering, 231

volatility filtering

 
 

 Back to contents page

 
©2007 Olesia HomeMy photosForexMy tradingBooksContacts