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]


144

FIGURE 20-8 A biological neural network. Information is received through dendrites and passed to a neuron for storage. Data are shared by other cells by moving through the output connector, called an axon. A sjnapse may be located on the path between some individual neurons or neural networks; it selects the relevant data by inhibiting or enhancing the flow

Neuron

(Informaiion

Storage Cell! To Other

Neurons

Synapse

n«nrtritP« *"P" (Optional

e Peirvrjufman,£-n,arterTra.lii,g.lJciaw-Hill,1995,p 165.

Artificial Neural Networks

Using essentially the same structure as a biological neural network, the computerized, or artificial neural network (ANN), can generate a decision on the direction of the stock market. It relies heavily on the sjiiapses, which are interpreted as weighting factors in this process. To adiieve its result, it will also combine inputs that interact with one another into a single, more complex piece of data using layers of neurons, as shown in Figure 20-9, a classic 3-layer neural network.

To be most efficient, the inputs to the ANN should be those factors considered most relevant to the direction of stock prices. The five items chosen here were the Gross Domestic Product, unemployment, inventories, interest rates and the value of the U.S. dollarall readily available data. Eadi of these items is input and stored in separate neurons. Changing values may have a positive or negative effect on the final output, which is the direction of stodcs. An improved GDP, lower unemployment, higher inventories, and a lower U.S. dollar are all good signs for the economy and result in the possibility of higher interest rates (defensive action by the Federal Reserve to prevent inflation) and a likely decline in stock prices. Interest rates themselves have a direct effect on stock prices, improving profits as rates decline.

Each neuron in layer 1, which receives the data from the dendrites, is connected to a second layer of neurons through a sjTiapse. Eadi sjiiapse can be used to filter or enhance information by assigning a weighting factor. For example, if changes in unemployment have a greater impact than changes in the GDP, then it may receive a weight of 1.5 compared with .9 for the GDP If very small changes in any of the data is considered unimportant to the result, then the sjTiapse can act as a threshold and only allows data to pass if it exceeds a minimum value.

The second layer of neurons is used to combine initial data into significant subgroups. In Figure 20-9, the GDP, unemployment, and inventories are combined into a single item

FIGURE 20-9 A 3-layer artificial neural network to determine the direction of stock prices.



siotedin

laval 1

combined selection combirefl

valvas by valves

slotedin weighting stored ir

level! *2 level 3

e PHrvEaufman.cniarterTra.iiiieilJciaw-Hill, 1995,p Wb)

called Domestic Economic Health. The sjnapses allow each element to be assigned a specific level of importance using a weighting factor. Also note that this neuron is altered by anticipated interest rates, wfiich is the result of data flowing to another neuron in layer 2. Finally, the three neurons in layer 2 are combined according to importance, giving the net stock maiket reaction to the input tbta.

The human brain works in a way very similar to the artificial neural network shown in Figure 20-9. It groups and weighs the data, combining them into subgroups and finally producing a decision. The human process of weighting the data is complex and not necessarily transparent; that is, we may never know the precise flow of data, how many layers exist and how weights are assigned and reassigned before the final decision.

A computerized neural network is not as complex. Because it cannot know whether its answer is correct, you must tell it. This is done by giving the computer the historic data and the corresponding answers. By giving the artificial neural network a long history of information, it can determine, using feedback, the weighting factors that would have given the correct results most often. The more history that is given to the computer, the more likely it will find a robust answer. Figure 20-10 shows the results of using five different inputs to predict the direction of the stock maiket. Two of the inputs, the Academy Award Winners and the Number of NASA Launches are not likely to be useful in the long term, but may appear to provide valuable information for short intervals. By using enough comparisons, the weighting factors are found to show that unemployment has a strong negative effect on prices, the GDP a strong positive effect, and inventories have a weak positive effect. The other items had no consistent predictive ability and received a weight of zero. This feedbad; process is called training.

Selecting and Preprocessing the Inputs

There is considerable debate over the inputs needed to find a successful solution using a neural netwoik: however, everyone agrees that the selection of inputs is critical. These inputs must be presented in the most direct form because, unlike an expert sjstem, the

FIGURE20-I0 Leaming by feedback.



Feedback

Loop

Weighting Factors Mutated

Combired Output

- ! )

e Peirvrjufman,£-n,arterTra.lii,g.lJfiaw-Hill,1995,p 16.

neural network will not be able to diange them. This step is called preprocessing. We must decide what factors affecl the direction of stocks and the ability to anticipate that direction, then prepare data that contains information with these qualities. For example, we may want to know the shortterm and long-term trends., the direction of interest rates and the Dow Utility Index; the ratio of interest rates to gold; economic data such as the GDP and balance of trade; technical indicators such as the RSI, stochastic, and ADX; and a 20-day moving correlation between the U.S. stock market and other major markets. There are counUess factors that might influence the direction of stocks; the more you choose, the slower the solution and the greater the chance of a less robust model. If you choose too few, they may not contain all of the information necessarj; therefore, the preprocessing problem requires practice. You may also construct a number of sjstems that produce profits and include their basic components as inputs to the neural network. You might create a performance series for a specific sjstem that has only values -1, 0, and 1, representing short, neutral, and long market positions. In that way the neural net may be used to enhance an existing trading strategj.

Selecting the Output

In a manner similar to evaluating optimization results, it is necessarj to selea the success criteria. This should be based on a combination of frequency of trading, the size of the profits per trade, a reward/risk criterion, and a frequency of profitability According to Ruggiero,r neural networks can be used to predict price direction, such as the percentage change 5 dajs into the future; however, they are much better at predicting forward-sbifted technical indicators, because these tend to have smoother results.

Most technical indicators, such as trend and momentum calculations, smooth the input data, which is mosl often the price. The longer the time period used in the calculation, the greater the smoothing. Ruggiero suggests an output function such as

@Average((close[-5] - @Lowest(Close[-5],5))/(@Highest(close[-5],5) @Lowest(close [-5],5)),5)

which is similar to a smoothed 5-period stochastic shifted forward by 5 periods In this notation, the bradeted value [-51 represents 5 periods into the future.

The Training Process

At the heart of the neural network approadi is the feedbad; process used for frainmg, shown in Figure 20-10, To observe sound statistical practice, it is advised that only about " of the data be used for training. As the neural net refines the weighting factors for eadi of the inputs and combinations of inputs (in the layers between the input and



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