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]


10

inventories and speculators inventories. Each reacts differently to expected price change.

1 F H Wevmar, The D-niamics .f tile World Cocoa Market. 1 Iress, ranitfl .fee. IJA. 196B)



Regression Analysis

Regression analj-sis is a way of measuring the relatlonsh between two or more sets of data. An economist might want to ioiow how the supply of wheat affects wheat prices, or the relationship among gold, inflation, and the value of the U.S. dollar. A hedger or arbitrageur could use the relationship between two related products, such as palm oil and soybean oil, to select the cheaper product or to profit from the difference, or you can find the pattem that binds the Producer Price Index to interest rates. Regression analj-sis involves statistical measurements that determine the tjpe of relationship that exists between the data shidied. Many of the conc ts are important in technical analj-sis and should be understood by all technicians, even if they are not used frequently. The techniques may also be directly used to trade, as will be shown later in this chapter

Regression analj-sis is often applied separately to the basic components of a time series, that is, the frend seasonal (or secular frend), and cyclic elements- These three factors are present in all price data. The part of the data that caimot be explained by these three elements is considered random, or unaccountable.

Trends are the basis of many trading sj-stems. Long-term frends can be related to economic factors, such as inflation or shifts in the value of the U.S. dollar due to the balance of trade or changing interest rates. The reasons for the existence of short-term frends are not ahvaj-s clear. A sha decline in oil supply would quickly send prices soaring, and a Soviet wheat embaio would force grain prices into a decline; however, frends that exist over periods of a few daj-s cannot ahvaj-s be related to economic factors but may be strictly behavioral.

Major fluctuations about the long-term frend are athibuted to cycles. Both business and industrial cycles respond slowly to changes in supply and demand. The decision to close a factory or shift to a new crop cannot be made immediately, nor can the decision be easily changed once it is made. Stimulating economic growth by lowering interesl rates is not a cure that works ovemight. Opening a new mine, finding crude oil deposits, or building an additional soybean processing plant makes the response to increased demand slower than the act of cutting back on production. Moreover, once the inveshnent has been made, business is not inclined to stop production, even at retums below production costs.

The random element of price movement is a composite of everjlliing unexplainable. In later sections ARIMA, or Box-Jenkins methods, will be used to find shorter frends and cycles that may exist in these leftover data. This chapter will concentrate on frend identification, using the methods of regression analj-sis. Seasonality and cycles m-ill be discussed in Chapters 7 and 8. Because the basis of a strong trading strategj- is its foundation in real plienomena, serious students of price movement and traders should understand the tools of regression analj-sis to avoid inco orating erroneous relationships into their strategies.

CHARACTERISTICS OF THE PRICE DATA

A time series is not just a series of numbers, but ordered pairs of price and time. There is a special relationship in the way price moves over various time intervals, the was price reacts to periodic reports, and the way prices fluctuate due to the time of year. Most trading strategies use one price per day, usually the closing price, although some methods will average the high, low, and closing prices. Economic analj-sis operates on weekly or monthly average

FIGURE 3-1 A basic regression anal-sis results in a sh-aiejit line throueji the center of prices.

data, but might use a single price (e.g., -week on Friday") for convenience. Two reasons for the infrequent data are the availability of most major statistics on supply and demand, and the infrinsic long-term perspective of the analj-sis. The use of less frequent data will cause a smoothing effect. The highest and lowest prices will no longer appear, and the data will seem more stable. Even when using daily data, the infraday highs and lows have been dim. inated, and the closing prices show less erratic movement.



regression analj-sis, which identifies the trend over a specific time period, will not be influenced by cyclic pattems or short-term trends that are the same length as the time interval used in the analj-sis. For example, if wide seasonal swings occurred during the year but prices ended at about the same level (shifted only by inflation), a I-year regression line would be a straight line that split the fluctuations in half (see Figure 3-1).

The time interval used in regression analysis is selected to be long (or multiples of other cycles) if the impact of short-term pattems is to be reduced. To emphasize the movement caused by other phenomena, the time interval should be less than one-half of that period (e.g., a 3- or 6-month trend will exaggerate the seasonal factors). In this way. a trend technique may be used to identifj- a seasonal or cyclic element.

LINEAR REGRESSION

When most people talk about regression, they think about a straight line, which is the most popular plication. A linear regression is the straight-line relationship of two sets of data.

t-iirce 1 e-ieeS IllinoiEbtiEticBl Semce IE 2 Cjumodity Research Bureau Cjunioditr Year

it is most often found using a technique called a bestfit, which seleas the straight line that comes closest to most of the data points. Using the prices of com and soybeans as an example, their linear relationship is the straight-line (or first-order) equation (see Table 3-11.

METHOD OF LEAST SQUARES

The most popular technique in statistics for finding the best fit is the method of least squares. This approach produces the straight line from which the actual data points varj- the least. To do this, calculate the sum of the squares of all the deviations from the line value and choose the line that has the smallest total deviation. The mathematical expression for this is

S - all uses of X imply f

.alue ofjy, ai X, and tbc i>i *--<.li<.-<.-<.l line value: jv,. drajihically.

--------------------------rors, for four ioincs look like those ici Flsure 3-2. Eacli

actual data x>lnt in (Xi,jyo, ir.JVj!), <x,,jy,) and (x,,jy,), and ilif ap>n.ixiniat(rd position on the line is C,jVt>. - ,>0, ii.si) and C... jvJ Tbe sum of the squares of the errors Is

s=1.iy.-yd - (J. ->.) * - id + (J-, - idt -

FIGURE 3-2 Error deviation for method of least squares.



[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]