back start next


[start] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] [22] [23] [24] [25] [26] [27] [28] [ 29 ] [30] [31] [32] [33] [34] [35] [36] [37] [38] [39] [40] [41] [42] [43] [44] [45] [46] [47] [48] [49] [50] [51] [52] [53] [54] [55] [56] [57] [58] [59] [60] [61] [62] [63] [64] [65] [66] [67] [68] [69] [70] [71] [72] [73] [74] [75] [76] [77] [78] [79] [80] [81] [82] [83] [84] [85] [86] [87] [88] [89] [90] [91] [92] [93] [94] [95] [96] [97] [98] [99] [100] [101] [102] [103] [104] [105] [106] [107] [108] [109] [110] [111] [112] [113] [114] [115] [116] [117] [118] [119] [120] [121] [122] [123] [124] [125] [126] [127] [128] [129] [130] [131] [132] [133] [134] [135] [136] [137] [138] [139] [140] [141] [142] [143] [144] [145] [146] [147] [148] [149] [150] [151] [152] [153] [154] [155] [156] [157] [158] [159] [160] [161] [162] [163] [164] [165] [166] [167] [168] [169] [170] [171] [172] [173] [174] [175] [176] [177] [178] [179] [180] [181] [182] [183] [184] [185] [186] [187] [188] [189] [190] [191] [192] [193] [194] [195] [196] [197] [198] [199] [200] [201] [202] [203] [204] [205]


29

(This graph made up fran booic with Draw)

Least squares puts the greatest importance on those prices closest to the straight-line estimate. It is very sluggish to change direction when a larger number of dsj-s is used. Because of this pattem, it can have a mlxhire of large and small losses.

Frequency of Trades

You might notice that the number of trades varies considerably across sjstems. This reflects their ride. The longer you hold a trade, the greater the ride exposure. The two smoothing sjstems (moving average and exponential smoothing) cut losses short; therefore, they show the largest number of trades for a slow trend.

Breakout sjstems can trade very little if they enter on a new high after a volatile market period. A long position can be held for months waiting for the swing low to move up. An expanding range, one that makes a new high, followed by a new low and another new high, can be devastating.

Rxpectations

We form expectations so that we can recognize when test results are wrong. It is the same as an engineer estimating the length of a bridge before a computer program produces the final numbers. An accidental shift of a decimal point may give you plans for a 10-foot bridge over a 100-foot river.

Similar Sydems Give Similar Results

We expect the first two and lad two sjstems to be very similar. In each case the rules are nearly the same. We expect the N-dsy breakout to have the highest ride because volstility increases over time. The n-dsy high and low should create a much larger range than the most recent swing high and low. Of course, we expect slower sjstems to be more profitable than faster ones, because longer periods often reflect fundamental price movements.

Robust

To get the most value from these tests (an approach covered in detail in Chapter 21), there needs to be as much consistency as possible between tests. The following standards are set:

1. Test periods. All markets and all tests covered the same 10-year period, ending March 31, 1994 (except the OEX, which began in 1986 and totaled 9 years).

2 . trend speet Those systems tiiat used .Ls were tested fr.JU 4 to 2i ystenis 5 and 6, . l:.re.ik..ut and point-.md-f ire, used values tiiatrTluced asimilar number..ftr.vles

3. Adjusted rate of rdum. Retums were specified as the 10-year retum divided by the maximum intraday drawdown.

4. Test averages. Below each test group are the averages of all tests, the dandard devistion of the total retums, and the average minus one dandard devistion. The best result is the sjstem with the highest average retum and the smallest dandard devistion

Which Sjstem Is Best?



Table 5-4 gives-luythe average returns by system andma.ket it then averages tiiose rwults d . and to tiie right, giving tiie average f averages I ejults ."t-w that Eur. .doUa* were jj. fitable for all sems and that the N-¸ t«ak. .ut had tiie best returns for all markets trying to ui*eand the rilts, it is useful to remove tiiose tests that rted in very few trs or too many tr«ies to be tractical Table 5-5 sents the same rts for all results witii the number .f trades fr4ui4tlir*ugh260overtlie lOear period ifr»Qi 2 5 per yearto 1 every 2 week.-) The table sb-.n*tliat the simple m»b»; aveHgp was much better and tiie N-layt.reafc.ut much w*E Total rwilts were better, .-li..wing that the fa.-t tren.t were tig loser.- This is partinilarly true ..f tiie smo..fliing metlio.t

A Different View of Results

The average results give a reasonable picture of performance, but it is clear that each tjpe of sjstem has different disU-ibution of trades. For example, doubling the swing percent

age does not reduce trades as quickly as doubling the dajs in the N-day breakout. This causes the average results of the two sjstems to be biased differently toward faster or slower trends. This is corrected by comparing the sjstems when they have the same number of trades.

Aligning Test Results Graphically

Figure 5-6 shows the Eurodollar results when we attempt to align eadi of the six sjstems by their test periods The pattems are similar, but somewhat out of phase This is especially true for the breakout sjstems. By displajing performance of all sjstems by total trades, shown in Figure 5-7. we see a steadj decline from left to fight. As the number of trades increases, profits disappear

We can conclude that trending sjstems, in general, are a robust trading vehicle for Eurodollars, but only if we apply a longer time horizon. The pattems clearly show that increasing trades result in overall losses. This should be a very comforting conclusion for sjstems traders.

Programming the Six Sjstems

Omega EasjLanguage Code

A general sjstems approadi to programming TradeStations Easj Language has been taken in this example. The sU-ategies are written as User Functions rather than sjstems. This adds fiexibility and allows us to use the same programs at another time. A User Function is a small program or subprogram that can be referenced (called) from other programs. This shared program saves you fran repeating the rules and calculations for each new program.

FIGURE 5-6 Eurodollar results by test period. The rising pattem of profits from left to right is not clear because of the difficulty in aligning the test period, in dajs, with the swing size, in percent.

Eurodollar: ride-acjusted retums All sjstems by test period



FIGURE 5-7 Eurodollar results by total trades. Plotting all sjstems by total trades (the bottom scale) shows a clear drop inperformance as trading becomes more frequent.

Eurodollar: ridc-acjusted retums All sjstems by total trades

The following User Functions perform the unique calculations for each of the six strategies, and retum the

value

signal = 0, no position

= 1, buy or hold long position = -1, sell or hold short position

Note that the final statement of the User Function sets the User Function name equal to the value of the signal. Each program also references a variable tjpe, which indicates that the market being processed is, or is not, an interest rate, tjpe = 0, default

= 1, 3-month interest rate (e.g.. Eurodollars, Matif Pibor, Short sterling)

= 2, long-term interest rate (e.g., U.S. T-bonds, Trrotes, U.K. Gilt, German bund)

Sjstem

A sjstem has buy and sell orders, equity calculations, and other statiatics. Parameter values can be set fran the appropriate menu. Our sjstems will reference a User Function to find the signal for each strategj. Because each of the sjstems would be identical, except for the one line that calls the user function, only one sjstem is shown.

An indicator is a program that displajs the value of key points or calculations on a chart. An indicator can position the high and low points of a swing (Kswing) or show a separate graph on a split page (KLRS)



[start] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] [22] [23] [24] [25] [26] [27] [28] [ 29 ] [30] [31] [32] [33] [34] [35] [36] [37] [38] [39] [40] [41] [42] [43] [44] [45] [46] [47] [48] [49] [50] [51] [52] [53] [54] [55] [56] [57] [58] [59] [60] [61] [62] [63] [64] [65] [66] [67] [68] [69] [70] [71] [72] [73] [74] [75] [76] [77] [78] [79] [80] [81] [82] [83] [84] [85] [86] [87] [88] [89] [90] [91] [92] [93] [94] [95] [96] [97] [98] [99] [100] [101] [102] [103] [104] [105] [106] [107] [108] [109] [110] [111] [112] [113] [114] [115] [116] [117] [118] [119] [120] [121] [122] [123] [124] [125] [126] [127] [128] [129] [130] [131] [132] [133] [134] [135] [136] [137] [138] [139] [140] [141] [142] [143] [144] [145] [146] [147] [148] [149] [150] [151] [152] [153] [154] [155] [156] [157] [158] [159] [160] [161] [162] [163] [164] [165] [166] [167] [168] [169] [170] [171] [172] [173] [174] [175] [176] [177] [178] [179] [180] [181] [182] [183] [184] [185] [186] [187] [188] [189] [190] [191] [192] [193] [194] [195] [196] [197] [198] [199] [200] [201] [202] [203] [204] [205]