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]
149 VISUALIZING AND INTERPRETING THE RESULTS Visualizing the test results properly can make interpretation far easier. Figure 21-2 has alreadj given a preview of how results might be presented in a way that shows continuity, rather than a simple list of one test result after the other. For example, if a I-parameter optimization is run in which all values are fixed except for the number of dajs in a moving average, then three possible results are shown in Figure 21-3. In all three cases, the resulting profit or loss is shown on the left, and the number of moving average dajs is shown along the bottom. Figure 2I-3a is a simple curve, indicating that both fast and slow parameters generate losses, although the midrange is profitable, it may be reasonable to select the number of moving average dajs that produced the highest profit due to the good continuity around that point. Figure 2I-3b shows two possible areas of success. Because both are about equal in size, there is no reason for choosing one over the other. One possibility is to trade one moving average from each peak. If you must choose only one, then it is most likely that the longer-term results are more stable, and considered a more conservative selection. A fast trading sjstem can result in errors, poor execution prices, and large transaction costs. Unless these factors have been carefiilly inco orated into the trading strategj, a highly profitable simulation will result in large, real losses. The preceding case is exaggerated in Figure 2I-3c, where the fast sjstem has much higher profits in a very narrow range, and the long-term frend has a wide range of success. The spike in the area of the 3-day moving average is surrounded by losses, indicating that the high profits may have been caused by a short-lived price shode or a pattem in the data that was perfect by chance. FIGURE 21-3 Possible resulting pattems from a test that varies only the moving average dajs. Moviraveragedays (b) Moving average days Two-Parameter Tests The most popular tests are those that have two parameters, either two trends of different periods or a frend and a stop-loss value. Considering a moving average and stop-loss, the best visualization is a grid (a 2-dimensional table), with the moving average days alcng the left (rows) and the stop-loss values at the bottom (columns). Figure 21-4 shows that the lowest number of dajs and the smallest stop-loss value will give the profit/loss value in the top left comer box.
By presenting the results as shown in Figure 21-4, there is a continuity of performance in all directions. The upper left comer represents the fastest sj-stem-the one with the most trades; the bottom right corner shows the results of the slowest strategj. The pattems of the upper right may be similar to those of the lower left if the sjstem displays some sj-mmetrj. A faster trend speed with a laige stop (top right) and a slow trend with a small stop (bottom left) are likely to have the same number of trades and similar profitability. Depending on the data used for testing as well as the trading rules, three pattems are most likely to appear in the results of a 2-dimensional display. Figure 21-5a shows the simplest case of a single area of successful performance gradually tapering off. This is analogous to the single-parameter test shown in Figure 21-3a. Selecting the parameters that FIGURE 21-4 Standard configuration for a 2-dimensional optimization. I .2 3 .4 5 .6 7 8 .9 1.0 gave the center of the best performance area is the most reasonable, because moderate shifts in price pattems are still likely to be profitable. The appearance of two areas of profitability are usually the results of a highly volatile maiket (Figure 21-5bj Prices that are moving quickly and sustain a major trend can be traded using a fast or slow model. The fast model is often more profitable because it captures more of the rising trend; it reacts faster and also profits fran the decline. The slower trend-following approach captures less of the price move but keeps clear of the sharp reactions that stop out the middle-speed trends. The selection of parameters to use in real trading follows the same reasoning applied to Figures 21-3b and c. The third case, shown in Figure 21-5c, is one of erratic profits and losses. The absence of a consisteni pattem in the performance indicates that the trading strategj does not apply to the data Altemate Wajs of Visualizing Results With software such as MathCad, you can see the 2-parameter test as a contour or topological relief map. For some users this form can make it much easier to see the peaks and vallejs of performance and is highly recommended Any spreadsheet program will allow a surface plot, which will give you a rough look at the continuity of a 2-parameter test, as shown in Figure 21-6. This 3-dimensional graph gives the net profits of a moving average crossover sjstem applied to the Swiss franc. The slower frend is shown along the frcnt scale and the faster one along the right. There is a ridge running fran the front to the back, indicating that a slow frend of about 50 to 60 dajs dominates the results. Other than the fastest frends of 3 dajs, it is easj to see that there are many combinations of fest and slow moving averages that are historically profitable. Visualizmg with Scatter Diagrams To see the performance of more than two vanables, you can plot the results of a (see Figure 21-7) using a scatter diagram (also called an XYPlot). each parameter FIGURE 21-5 Pattems resulting from a 2-dimensional optimization, (a) Single profitable area, (b) Two distinct
profitable areas, ( ) No obvious pattem. Stop-Ion IfKHnu ot percent) I 2 J3 ..... FIGURE21-5 (Continuedj
[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]
|