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]
140 (System rules based on mcving average trend I mavq = ©averagetclcse.lengtli); [f mavg>mavQLlJ and posntior = -J ther position - [). If riav4<niavfj[l] and positiori - 1 . petition = D, (Enter on new trend signals below high wolatilitv. FfilTPr or new trend signals above low volatility. ELfiHerl •f option-1 or optior-5 then begin (High volatility dplay) { if mavg>mavgLl] and position ) and chenge<Eiipl im t then begin! (Low volatility filter) [ if mavg>mavg[ll and ma vo[ l]<avg[2] and change<E up I i mi t and charige>F L up! i mi t then beg; i if iiidvg>indvg[l ] and position 1 and cha nge<Eup1 I mi t and cha nge>E Lup 11 mi t then begi" position = end; IHigh volatility delay) I if iiidwg<inawg:l ] and position <> -1 and cna rge<.Eupl i mi t then begin iLow volatility filter] I if niavg<fnavg[lj and mavg[l ]>avgE?l and change<Eupl imi t and charge>ELLpi Imi t then begii d position <> -1 and change<Eup1 inii t end chenge>ELup1imit then begir position = -L; end; end; Normal entry only once in the same direction) If optionOl and option<>5 then begin if niavg>niavg:i] and position <> 1 then begin position - 1; end; if niavg>niavgi:i] and position -1 then begin end; IDon-t reenter after high volatility exit) if Dptior>l then begin if mavg>niawg[l] and change<Xup I imi t and posil buy on close; end; if mavg<mavg[lD and change<XupIiniit and posii sell on close; position - -1; end; end; (Exit without volatility) if option=0 or option-1 then begin if nievg<mavgrn then exitlong on close; If mavg>inavg[I] then exitshort on close; end, [Exit cn high volatility and profitable dlrectic if option=2 or option-3 then begir
if mavg<mevg[l] or (cl ose>cl oseL 1 ] ard c>i3rge>X jpl inn 11 ther -- rcse. if mavg>iiiavgLl 1 or close<c)oseLl and cinergr Xjpliin ther -- -:;-t end; IExit or high v:latilty ar<j a profiteble -rpz- if optior=2 option=4 or oDtiGn-5 ther betii- if mavqtmavgri] or cl osec i oseLl ] era cnoige/...!:im t --e- e"--og : -"ce; mflvg>nia\rqri] or -5ose>=close[i j ard tar,ceX.ipim her * end; IReplece high volatility jay: because hey tot nrdc--i dc-i = * • I if charge > vavg+Z*fatlorvsd then = vSv;: Note that parts of the program have comment braces around one or more iines. These represent other options that may be tested, it wiii be necessary to remove the comment braces from one section and add them to another. TRADE SELECTION Once you have a basic sjstem, the next step is to decide whether you can eliminate some of the iosing nades without eliminating the profitable ones. In the extreme, we want to eliminate ali of the iosing trades, even if we reduce some of the profits of course, that is impossibie. Every sjstem has a ride even so-calied -riskiess- trades. Arbifrage when done property, has virtually no ride however, it may be so competitive that the opportunities are rare and the maigin of profit smali. You migiit find, after months of frading a guaranteed arbifrage, that your retums are disappointing compared with the cost of doing business. Putting your money into U.S. bonds wouid have been nearly as good with a lot less work. Nothing is free. Good trading is not amatter of hittmg it rich on a single short position: it is grinding out a profit day by day and week by week. Occasionally, if you follow new markets, you might find an opportunity that others have not yet seen. If you act fast, you can capitalize on this for a short time, until others see ttie same situation. Then bigger players come in and push you out. In turn, they are followed by other investors who combine to remove ali the profit opportunity, even for themselves. When selecting frades to eliminate, the easiest place to begin is by associating performance with volatility or price ievei. While some sjstems perform better in an environment of higher volatility, it may be that the best retum relative to rid; occurs when there is less volatility In general, markets with extremely low volatility do not perform well because they have less direction. Under moderate-volatility conditions, sjstems wiii retum both low er profits and smaller losses; with high volatility we can expect large profits and high risk. Predicting Volatility with Trading Ranges William Brower performed a thorough stud\ of trading ranges, looking to find a higher range for tomorrow This would be importani for dav traders and for an\ s\-stem wfiich higher vuUi[ilit> is an advantage Specifically high volatility is desirable for breakout s}-tems. A summan, of his result;. shown in Table for ihc S&P from 12 218~ through 12/l5/9> Thomas Bierovic, On-Balance True Range To visualize the change in volatility, Thomas Bierovic has created On-Balance True Range by following the same rules as On-Balance Volume, but using the True Range calculation instead of Volume. He then calculates a 9-day exponential smoothing of the On-Balance True Range and uses the crossovers of the Oscillator and smoothed oscillator to confirm signals. Although the highs and lows may come at nearly the same time as other oscillators. WilLamBr..n-er InEi.eE.feeiIi.EideEleecvEter„E lOFres. UEEoad.- ..tr-rt 0 cl, Afiil 961 TABLE 20-3 Predicting ttie Trading Range of ttie S&P 500*
ftute | ConcStKinsTestecf | Conduaon | | 0<L[l]-x | Very good predictor,but few cases (161 nx = - 10) | | 0>H[l] + x | Modest predictor, but few cases (10! at x = .60) | | qi]+x>o>qi] | Range got smaller when x = .35 | | qil-x<o<qi] | Range got smaller when x .30 | | o<qi] X | Range tended to increase as x mcreased | | HI2]<=H[llandt[21>=t[ll | No significance | | HI21>H[l]andL[2]<t[ll | Modest of lower volatility | | of week | Mond had lowest volatili.Tuesday and Fnday the highest | | Averaee(Trueltar,3)[l] >x | Higher avg (rue for 3 ds was a very | | | good predictor of higher volatlli | | RSI(close,3)[l]<x | When RSI < 40 good predKtor of higher volatility |
the positioning of the relative peaks and valiej-s may offer new pattems. For many traders, this simpie interpretation can heip separate higii- and iow-voiatiiity conditions. PRICE-VOLUME DISTRIBUTION Many sjstems that have excelient historic simulations faii when they are actually traded. These include models based on botti intraday and daily data. One reason for this disappointing performance is the lack of understanding of market liquidity. Consider two sjstems A trend-following method, which signals a buy or sell order when prices rise or fall relative to a specific price during the day A countertrend sjstem, which sells and bujs at relative intraday highs or lows Although each sjstem intends to profit with their opposing philosophies, both act when prices make a relatively unusual move. Figure 20-4 shows the normal dishibution of intraday volume and the profitability associated with this dishibution. 4 Marj Ginter and Joseph J. Ritchie, "Data Errors and Profit Distortions," in Perrj J. Kaufinan (Ed.). Technical Analjsis in Commodities (John Wiley & Sons, New York, 1980). FIGURE 20-4 Daily priceivolume distribution. The solid line W is the actual volume on a theoretically normal day in which prices remained in a trading range. Volume is greatest at the median M and declines sha ly to the high and low endpoints H and L, where only one trade may have occurred. The dotted line cc represents the apparent profit for a countertrend sjstem that makes the assumption of a straight-line volume dishibution, ad. The endpoints are shown to contribute the largest part of the profits when, in reality, no executions may have been possible near those levels. Assuming the ability to execute at all points on the dishibution bb, the approximate profit contribution is shown as dd. Trades are most likely to be filled al points that limit immediate profits. For trend-following sjstems, no profits should be expected when buy or sell orders are placed at the exfremes
[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]
|