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]


142

Rule 4: IF the market is nontrendmg,

THEN MACD = probability of .55 AND SD = probability of .75 C750o).

Rule 5: IF stochastic AND SK[11 =: 30 AND SD[1] =: 30 AND SK[I] =: SD[ 11

AND SK =: SD, THEN sell with 80% confidence. Rule 6: IF stochastic AND SK[ 1] := 70 AND SD[ 11 := 70 AND SK[ 11 := SD[ 1]

AND SK := SD, THEN buy with 80% confidence.

Rule 7: IF MACD AND MACD value := signal line value,

THEN buy with 750o confidence.

Rule 8: IF MACD AND MACD value =: signal line value,

THEN sell with 750o confidence.

where the following periods are assumed:

ADX IS an 18-period ADX calculation ADX[2] is the ADX 2 periods ago

MACD is the Moving Average Conveigence/Divergence with smoothing constants

.15 and .075 SK is a 9-period, "oK fast stochastic SD is a 9-period, "oD slow stochastic

and undefined means that there is no information about the values. The facts are the actual values to be used in the evaluation.

FACTl: ADX=19

FACT 2: ADX[2] = 19

FACT 3: SK = 90

FACT 4: SD = 80

"Mark B. Fishman, Dean S. Barr; and Walter J. Loidc Artificial Intelligence And Market Analysis," Technical Analjsis ofStocks & Commodities (Bonus Issue 1993).

FACT5:SK[11-SK=68 FACT 6: SD[I]-SD = 92 FACT 7: signal line value = -70 FACT 8: MACD value = -68 FACT 9: the market is frending

The results, expressed as probabilities, offer greater insight into the likelihood of success using this method. Arriving at these probabilities, however, requires additional decisions. Without any further information, we can assume that there is only a 50 chance that the stodiastic is a correct frend indicator if we were to test the number of times the stochastic indicated an upward move with the number of dsjs that the subsequent price moved higher, we could get a much better indication of the chance of success.



FUZZY LOGIC

in the second example of expert sjstems, the results were expressed as probabilities. Because trend and indicator calculations are estimations of maifcet movement, very little is strictly true or false; therefore, probabilities are a more realistic way to view the results. The probability of being right can be represented by the reliability (percentage of profitable trades) of a sjstem using these calculations. When right, the average payout is the average profits per trade, and when wrong, the loss is the average loss per trade. When you can assign a probability to results, the variable has often been calledfiizzj. But this way of loofcing at values is really a twist on basic probability analysis.

The idea of ftizziness is intended to describe the lacfc of precision in normal human conversation and thought. In its pure form, the use of ftizziness allows human uncertainty to be introduced into methods of artificial intelligence. For , we often say,

-Therewere a lot of people in line at the show."

"I had to wait a long time "

"It was really cold while I was waiting."

"The stock marfcet was strong yesterday "

"Unemployment dropped sha ly."

in all these cases, we understand what is being said although there are no specific values associated with "a lot of people," "a long time," "cold," "sfrong," and "sha ly" In ftizzj logic, all is not true or false, 0 or I, there or not there. True ftizzj logic will answer the question "if a hatf-eaten spple is still an apple, how much do you have to eat before il stops being an apple?"

The concept of ftizziness includes ftizzj numbers, such as "small," "about 8," "close to 5," and "much laiger than 10," as well as ftizzj quantifiers, such as "almost" "several," and "most." Phrases such as "Unexpected results of Govemment reports cause big moves" is a common ftizzj expression.

FuzzjReasoning

Fuzzj events and ftizzj statistics are combined into fiizzj reasoning. It is a remarkable phenomenon that the answers to the following examples are clear to the human brain, but not to a machine (the answers can be found at the bottom of this page).

6 Parts of this section are drawn from PerrjKaufinan, Smarter Trading (McGraw-HW, NY, 1995).

fvq (-) p-iE- iZ) ll-,f-a iT. am saLbmnia .1: ol siam.Tu! ,)U

Example 1: X is a small price move. Y is much smaller than X. How small is Y?

Example 2: Most price moves are small. Most small price moves are up. How many price moves are up?

Example 3: It is not quite true that the quarterly eamings were very bad.

It is not true that the quarterly eamings were good. How bad were the quarterly eamings?

Common Approach to Fuzzy Solutions

In the terminologj of ftizzj logic, there are three aspects of problem solving: memberslup, to show how the data are related to each other; ftizzj rules, to draw conclusions; and defuzzifiers to turn the ftizzj answers bacfc into useable results.

For example, we would like to predict whether a price move will be big enough to capture a profit needed by our frading sjstem. To have a robust sjstem, we ahvajs use a 20day trend but would like to predict which price moves will be above our minimum needs before we enter the trade. In general, we have found that, given commissions and slippage, we need to net $500 per frade Because we are using a frend-following sjstem that gives up profits before



exiting, we would like to see an $800 profit to capture a net of $500. Based on our needs, we can define our limits as:

1. Average peak move between $300 and $800 is acceptable

2. Average peak move over $800 is desirable.

3. Average peak move under $300 is unacceptable.

To decide whether current price movement is likely to give us enough profit to enter a trade, we measure the average price move over every 20-day period for the past 1 year (longterm) and for the past 1 month (short-term). Based on this approadi, we create the rules:

1. if both the long-term and short-term profit potentials are 1 1 , then the current profit potential is unacceptable.

2. If both the long-term and short-term profit potentials are desirable, then the current profit potential is desirable.

3. If both the long-term and short-term profit potentials are acceptable, then the current profit potential is acceptable.

These three cases are very clear, but what if the long-term and short-term expectations are different? Foi example, if the long-term average peak profits are $250 and the short-term

are $600, what can be expected from the current move? In the current application of fiizzj logic, this converts to a problem in probability for which we need more information about the history of these price moves. Through testing, we find that the 1-year average price move has a standard deviation of $75 and the past 1 month has a standard deviation of $200. We could then construct a diagram that shows the expected results from combining the two measurements (see Figure 20-6). The average retums are shown with descending lines based on their standard deviations. These cross at about $350 per trade, giving a reasonable answer to how to combine the two values.

One additional measurement that cannot be overlooked is the potential error in each statistic. The longer-term measure used 250 trading dajs, while the short-term used only

IJiin-ayA Eujpero, Jr.iirtificial tra.to-jumps candlesticfc.-," Futures (Fetfu.irv 19951, andLightiue candlestick.-witiifurrvlogic," Futures ilJ.ncli 1991

FIGURE 20-6 Rxpectations of a price move using two time periods. %i9 -

about 20 dajs. The standard error for eadi calculation is 6.3>o and 22.3"o, respectively. In the final interpretation of results, we can say that the longer-term data are more important than the shorttermvaluesby about 3.5 : 1. Then we could write additional rules:

4. if the long-term potential is 1 1 and the short-term is acceptable, then the current potential is unacceptable.

5. If the long-term potential is 1 1 and the short-term is desirable, then the current potential is acceptable.



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