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]
18 error analjsis, a copper sequence was selected for a period of 20 trading dajs that included a slight upward and a slight downward move, with some intermediate changes of direction. Table 41 shows the actual predictions using linear regressions for 2 through 7 prior prices and a prediction of one day forward. Table 42 shows the relative error in these predictions and an analjsis of the errors. The mean, shown at the bottom of Table 42, is a simple average of all the points and gives the net trend bias during the sample period; the small range from negative to positive shows very litUe bias. The standard deviation measures the accuracy of the forecast. When the standard deviation is small, the predicted values are closer to the actual values and the forecast error is smaller. The standard deviation and variance are both measurements of the distribution of points around the fitted line As discussed in Chapter 2, the standard deviation measures the occurrence of points near the predictions; the smaller the value, the closer the grouping and the better the estimation. The variance is another way of looking at the deviations; the smaller the variance, the better the forecast. The copper error analjsis shows the smallest values foe E(4) The 4day linear regression. This is an interesting result because we would expect the shortest forecasting interval to produce the smallest error simply because prices cannot move as far from the forecast in 2 dajs as they can in 7 dajs. Therefore, we should expect the absolute size of the error, as measured by the standard deviation or variance, to get larger as the forecasting period gets larger. The smaller error produced by the 4day regression shows that there was a pattem during this short test that could be fit better by the 4day model than by any of the others. Determination of the best predictive model using error analjsis can be applied to any forecasting technique. This wori particularly well when comparing the errors of two different forecasting methods evaluated over the same number of periods, eliminating the bias caused by longer and shorter intervals. It is also practical to carrj the error analjsis one step further and include the results of the prediction error on day t+l,t+2, and so on. This gives a measure of outofsample forecast accuracy and lends confidence to the predictive qualities of the technique Having selected the most accurate forecast model, the size of the prior day predictive error can be used to resolve frading decisions. Consider the following situations: 1. The prediction and the actual price are very close (high confidence level). For example, the longterm copper error may have 1 standard deviation =.25. 2. Todays forecast error is within 1 standard deviation of expectations: therefore, we continue to follow the frend strategj. 3. Todays forecast error is between I and 3 standard deviations of expeaations; therefore, we are cautious, yet understand that this is normal but less frequent. 4. Todays forecast error is greater than 3 standard deviations. This is unusual, indicates high ride and may identifj a price . Alternately, it could indicate a frend turning point. TABLE 41 Analjsis of Predictive Error for Copper THE MOVING AAERAGE The simplest and most wellknown of all smoothing techniques is called the movmg average (MA). Using this method.
the number of elements to he averaged remains the same, but the time interval advances. Using a generalized time series as an example. Po. Fi,.... Pi are a sequence of prices. A moving average measured over of these pnces, or data pointa, at time would be n<t In other words, the most recent movmg average calculation is the average arithmeii* mean) oF the prior n data points For example, using three points tn > lo generate moving average; = (P, +J2 + fj)/3 MA,= (P, 2 tP.V3 TABLE 42 Anahsis of Predictive Error for Copper If Pt represtented a price at a specific time, the moving average would smooth the price movement. When more prices are used, the new price will be a smaller part of the average and have less effect on the final value. Five successive prices form a five day moving average. When the next sequential price is added and the oldest is dropped off, the prior aveage is changed by 1 /3 of the difference between the old and the new values. If MA, = (P, + + + P. + PiV MA* = < + P, + P, + P, + ) then = Pj + is + P* + P5 can be substituted for Ihe common pan of Ihe moving average, solved for c, and substituted to get MAe = MA, + (P, P,.„>/5 This also gives a faster way to calculate a moving average. It can be seen lhat the more terms in the movmg average, the less efifect the addition of a new term is likely to have: MA,= MA,, + (P,P,„)/K
The selection of the proper number of terms is based on both the technical consideration of the predictive quality of the choice (measured by the error) and the need to determine price trends over specific time periods for commercial use. The more dsjs or data points used in the moving average, the more smoothing will occur; variation lasting only a short while will have less effect. There is also a danger of losing cyclic or seasonal price patterns by selecting the wrong value of n. For example, a repeating cycle of four data points 5, 8, 3, 6, 97 4, 7,  .  , which advances by the value 1 eadi complete cycle, will sppear as a straight line if a moving average of 4 dsjs is used. If there is a possibility of a cyclic or seasonal pattern within the data, care should be taken to select a moving average thai is out of phase with the possible pattern (that is, not equal to the cycle period). The length of die moving average must also relate to its use. A jeweler may purchase silver eadi week to produce bracelets. Frequent purchases of small amounts keep the companys cadi ouUay small. The purchaser can wail as long as possible while prices continue to trend downward during any one week but will buy immediately when prices turn upward. A 6month trend cannot help his problem, because it gives a longterm answer to a shortterm issue; however, a 5dsy moving average may give the trend direction within the jewelers time fiame. UserFriendly Software Fortunately, we have readied a time when it is not necessarj to perform these calculations the long way. Spreadsheet programs and specialized testing software provide simple tools for performing trend calculations as well as many other more complex ftmctions discussed in this book. The notation for many of the different spreaddieets and software is very similar and selfexplanatory: FuiKtfon Spreadsheet Omega Sum ©sumdist, period) @suniniation(value, period) Moving average @avg(list, period) @averflge(value, period) Standard deviation @std(list, period) @stddev(value, period) What Do You Average? The closing or daily setUement is the most common price spplied to a moving average. It is generally accepted as the true price of the dsy and is used by many analjsts for calculation of trends. But other alternatives exist. The average of the high and low prices of the dsy will smooth the results by preventing the maximum difference from occurring when the close is also the high or low. Similarly, the closing price may be added to the high and low. and an average of the three used as the basis for the moving average. .A.nother valid component of a moving average can be other averages. For example, if il through f„ are prices, and MA„ is a 3day moving average, then MA* = (fa + J*, + J.*)/3 ma; = (MA + ma + ma,)/3 MA is a titntblesmootbeet moving average, which gives added weight to tbe center points More on double smoothing can be fourtd later in this chapter. Smoothing the hiis and loMvs independently is another techniqtie that creates a representation of the daily trading range, or volatility. This has been used to identifj normal and exfreme moves, and will also be discussed in Chafer 5 ("Trend Systems"). Tjpes of Moving Averages Besides varjing the length of the moving average and the elements that are to be averaged, there are a great number of variations on the moving average.
[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]
