fractal wave algorithm for trading stocks market

Upload: taiyawut

Post on 10-Feb-2018

215 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/22/2019 Fractal Wave Algorithm for trading stocks market

    1/17

    1

    FI 498SGolden Gate UniversityW.H.C. BassettiAdj Prof Finance & EconomicsJuly 2007

    FRACTAL WAVES in STOCK MARKET PRICES

    A New Tool for Technical Analysis

    Arthur von Waldburg,A&M Trading Company, Inc.

  • 7/22/2019 Fractal Wave Algorithm for trading stocks market

    2/17

    2

    FRACTAL WAVES in STOCK MARKET PRICES

    A New Tool for Technical A naly sis

    Arthur v on Wa ldburg, A&M Trading Company , Inc.

    Abstract

    An argument is made that the stock market bears similarities to non-lineardy namic processes wh ich giv e rise to fractal structures. Stock price sequences arethought to be fractal in natu re. A Fractal Wav e Algorithm (FWA) for identify ingthe fractal stru cture of a serial stream of price data is presented in the context of a"classic" Elliott Wav e form ation. The FWA is used to determine the w av e structureof recent Dow Jones Industr ial Av erage (DJIA) prices based on hour ly data from

    January 2, 1 99 0. The FWA is shown to hav e v alue as a technical tr ading tool onhourly DJIA data from March, 1 987 and on daily DJIA data from 1885.

    Non-Linea r Dy na mic Processes and the Stock Mar ket

    It is common for securities and commodities analysts to assume that much ofth e observ ed price fluctuations in these mar kets are due to random processesacting on the price in the presence of longer term trends and changes in priceequilibriu m due to changes in fun damenta l supply and demand factors. This is a

    normal assumption to make because, after subtractin g out underly ing trends, theprice mov ements do indeed appear random.

    It is also worth considering th at these price movements ma y be the r esult ofnonlinear processes in the mar ket place. There ar e a great many m ar ketparticipants, with complex sets of human relationships, motivations, andreactions. It would be astounding if all these hu man factors av eraged out t o alinear price mechanism.

    If price movements near equilibrium w ere ru led by linear feedbackmechanisms, price adjustm ents would be simply proport ional to th e amount the

    price were above or below equilibrium. The response of a linear sy stem to smallcha nges is usua lly smooth. The response to an external shock is generally a seriesof oscillat ions which decay in amplitude unt il equilibrium is again reached.

    Nonlinear systems, however , often show tra nsitions from smooth motion tocha otic, erratic, or apparently ra ndom behavior. The response of a nonlineardy namic system to an ext ernal shock can take the form of persistent stru ctures.

  • 7/22/2019 Fractal Wave Algorithm for trading stocks market

    3/17

    3

    The possible behav iors of nonlinear sy stems may be extremely rich and complex.In particular, a series of numbers generated by a completely deterministic, butnonlinear , sy stem could appear to be completely ra ndom wh en th ere is no noise inthe sy stem.

  • 7/22/2019 Fractal Wave Algorithm for trading stocks market

    4/17

    4

    Professor Robert Sav it of th e Univ ersity of Michigan pointed out in a recentarticle in The Journal of Futures Markets (Vol. 8, No. 3, 271-289) that a simplenon-linear model of price movement ca n generate a price sequence that lookssuperficially ra ndom but is in fact chaotic, containing a good deal of hidden order.The information in the cha otic sequence m ay not be accessible to the r esearch er

    who uses traditional statistical m ethods which attempt to "smooth" noise out of t hedata . Other meth ods appropriate to nonlinear, chaotic sy stems, m ethods wh ichtake adv antage of the "jumpiness" and "apparent disorder," may be more useful.

    The adv ent of relativ ely cheap and powerful computers in th e la st ten t o fifteeny ears has facilitated the study of prev iously intractable nonlinear sy stems. Infact the term, "experim enta l m athematics" has been coined to describe computer-based inv estigations of problem s inaccessible to analy tic methods. Manyresearchers making use of experimental mathematical techniques havediscov ered a relationship between nonlinear dy namic systems and the form ationof "fracta l" patterns. These pattern s, w hich exhibit self-similarit y at many scales,

    show up in the study of turbulent flow, th e geology of oil recovery , dendriticgr owth in a solidification process, th e dev elopment of m esoscale str uctu res inmetallur gy , th e spread of disease, and th e dynamic "rh y thms" of t he huma nheart.

    The Fractal Wav e Algorithm

    One of th e m ost widely followed methods of technical a nalysis of stock prices inthe last decade, Elliott Wav e Theory , m akes reference to a "wa v es within w av eswithin wav es" structure of price movement. Th is concept of self-sim ilarity atmany scales in price str uctur e is the same concept biologists and phy sicists are

    finding in the research m entioned abov e.

    While I make no claim to being an expert at doing Elliott Wav e analy sis, m ylimited reading about the theory sug gests that it is a "finite" theory , defining alimited number of price form ations, wh ich can be cata logued. This catalogu e canbe u sed to identify price patterns as they occur in the marketplace. Based on thecur rent pattern being traced out at each scale, or "degree," fut ure price mov ementcan to some extent be predicted assumin g the patt ern cur rently being form edcontinues to completion.

    My own a ttempts to anticipate the Elliott Wav e analy sis of one of the leading

    proponents of the th eory hav e been un successful, no doubt due in lar ge part to myown lack of technical knowledge in the Elliott Wav e science. Many followers of theElliott Wav e theory feel their own analysis is meaningful. There is oftendisagreement am ong the Elliott Wav e analy sts, h owever, leading me to believ e itmay require some ar t as well as science.

  • 7/22/2019 Fractal Wave Algorithm for trading stocks market

    5/17

    5

    My experience is that the price patterns produced by the stock mar ket (th eresearch discussed here wil l be lim ited to the Dow Jones Industr ial Av erage, DJIA)hav e an element of perpetua l nov elty wh ich is inconsistent with a finite th eory . Ido believ e, however, that the concept of self-similarity at many scales is

    extr emely important and appropriate to the study of mar ket price mov ements. Ibeliev e that price movemen ts may be usefully stu died as fractal str ucturesar ising in the context of nonlinear dy namics.

    I ha v e developed a m ethod of identify ing a fra ctal structure in stock pricemov ement which borr ows the concept of self-similar wa v es at m any scales fromElliott Wav e theory . This method, which I call the Fractal Wav e Algorithm(FWA), starts wit h the lowest scale data av ailable and "mar ks" the extreme h ighand low prices as wav e points of h igh er scales on the basis of the number of lay ersof self-similarit y betw een th e wav e points. An example of a well-known "regular"fractal curv e will help describe the concept of the FWA.

    The solid lines in Figure 1 comprise an equilateral triangle, the first step indevelopment of a Koch Tria dic Snowflake cu rv e. The dashed lines illustrate theconstruction of the second step, wherein each side of the triangle is replaced byfour line segm ents. Each of the new line segm ents is one-thir d th e length of theside of the tr iangle and the four segments ar e ar ranged so that a new equilatera ltr iangle projects from th e middle of each of the old sides.

    Figu re 1 . First Step in Koch Snowflake Dev elopment

  • 7/22/2019 Fractal Wave Algorithm for trading stocks market

    6/17

    6

    If the process of replacing each side is repeated m any times, the Koch snowflakecur v e is form ed. Figure 2 shows the development car ried a few more steps.

    Figure 2. Koch Snowflake After Three Steps

    The FWA is based on ma rking price curv es such that a consecutiv e high andlow pair marked as belonging at the sam e scale will hav e the sam e number oflay ers of self-similar ity between th em as any other consecut iv e pair mar ked atth at scale. In Figure 2, the points labeled "A" and "B" could be said to ha v e tw olay ers of self-similar pat terns between them . The pair of points labeled "B" and "C"also ha v e tw o lay ers of self-similarit y between them. The points labeled "1 " and"2", howev er ha v e th ree lay ers of self-similarity between t hem , the points "A", "B",

    and "C" make up th at additional lay er of self-similar pattern .

    The FWA is a set of a few simple rules wh ich allows any person mar king a pricecurv e to identify high and low wav e points at many scales such that consecutiv epoints identified at the same scale contain th e same number of lay ers of self-similarity between th em as any other consecut iv e points at the sam e scale.

  • 7/22/2019 Fractal Wave Algorithm for trading stocks market

    7/17

    7

    We present her e th e ru les of the FWA in th e context of a "classic" Elliott Wav ecurv e, to show tha t the FWA is a based on a general fractal wav e approach with inwhich the pattern analy sis of Ell iott Wav e th eory might be considered a moretightly specified ar ea.

  • 7/22/2019 Fractal Wave Algorithm for trading stocks market

    8/17

    8

    Figu re 3 shows an idealization of an Elliott Wav e cur v e constru cted in a processlike the one used to construct th e Koch Snowflake. The solid lines represent a priceadv ance followed by a price decline. The dashed lines show tha t the adv ance wasmade up of a "classic" fiv e wa v es up and th e decline was ma de up of t hr ee wav es

    down. The wav es ar e nu mbered "1 -2-3-4-5-A-B-C." All of these wa v e points maybe considered to be at the same scale. Points "0", "5", and "C" are significant at thenext h igh est scale.

    Figu re 3 . Classic Elliott Wav e Development

    If we continue the dev elopment of the Elliott Wav e cur v e as we did th esnowflake, we div ide wav es 1 , 3 , 5, A , and C into five wav es each because t hey arein the direction of the wave at the next higher scale; and, we divide waves 2, 4,and B into thr ee wav es each because th ey a re corrections to the w av e at the nexthigher scale. The result is shown in Figu re 4.

    In dev eloping th e FWA, I focused on th e fact tha t in th e "classic" Elliott Wav e,each adv ance was composed of a series of wav es alternately making new highsand declining but not ma king new lows. Similar ly , the correctiv e wav es aremade up of a series of wa v es alternately ma king new lows and ra llying back, butnot to new high s. Ignoring the num ber of wa v es required, y ou can see in Figu re 3th at the wav e up to point "5" is composed of "zig-zag s" in th e "up" direction and thewav e from "5" down to "C" is composed of "zig-zags" in the "down" dir ection.

  • 7/22/2019 Fractal Wave Algorithm for trading stocks market

    9/17

    9

    The FWA recognizes a "higher" scale wa v e by the fact tha t it is composed of "zig-zags" in one direction. When the first zig-zag in the opposite dir ection is completed,a new "higher" scale wa v e in the opposite direction has begu n. The number of zig-zags at the lower scale in either direction is not r elevan t in the FWA.

    In fact, ignoring the nu mber of wav es "required" in each direction is asimplification of Elliott Wav e theory wh ich allows the Fra ctal Wav e concept toform the basis of a generalized wa v e theory; a t the sam e time strictly determinedso tha t any two analysts will mar k a price curv e the sam e, and less constrained sotha t any nov el price form ation t hat occurs is cov ered by the t heory .

    The second key element of the FWA is the recursiv e ma nner in wh ich it isapplied to a price series so tha t wav e points at all degr ees are identified as soon aslower scale lay ers of self-similarit y become apparent. We can use Figure 4, below,to illustrate.

    Figu re 4. Classic Elliott Wav e, A Few More Steps

    Imagine the price cur v e in Figu re 4 being traced out in real tim e. Let us callthe data shown in the figu re, "lev el-0" data . We will label successiv e highs andlows in th e level-0 data as level-0 wa v e points. We will use the lev el-0 wa v e pointsto identify self-similar wav es at "lev el-1 ". Lev el-1 wa v e points which complete zig-zags in one direction or the other will identify lev el-2 wa v e points. Etc., etc.

  • 7/22/2019 Fractal Wave Algorithm for trading stocks market

    10/17

    10

    Starting from T0 in Figure 4, th e price adv ances upwards in zig-zag wa v es to P1.The fir st zig-zag in the up direction is completed about half way to T1. At the time

    when the first zig-zag of lev el-0 wav e points is completed, we know t he point at P0is a wav e point at t he next high est lev el, lev el-1 .

    At P1 the price falls, then for the first time rises and falls again without makinga new high. By time T2, the price has completed a lev el-0 zig-zag in the downdirection at price, P2 . When the zig-zag of lev el-0 w av e points is completed in t hedown direction, w e can m ark the price, P1, as a level-1 w av e point. Now we hav etwo lev el-1 wav e points, P0 and P1.

    A v ery important pattern occurs about half way between T2 and T3: As theprice in Figure 4 completes a zig-zag up from point, P2 we can ma rk P2 as a lev el-1wav e point. At the sam e tim e, we hav e three lev el-1 wav e points, P0, P1, and P2,and a current price higher than P1. A level-1 w av e point at the cu rrent price or

    higher would complete a level-1 zig-zag in the up direction. We can anticipatewith cer tainty that th ere will be a lev el-1 point at the current price or higher, sowe ca n im mediat ely mark the point at P0 as a lev el-2 wav e point.

    Re-read the prev ious para graph to make sur e y ou u nderstand how completionof a pattern at the lowest lev el stimulates the mar king of wa v e points at higherlev els. The completion of th e lev el-0 zig-zag between T2 and T3 identifies the pointat P2 as a lev el-1 wa v epoint, w hich contributes to the identification of P0 as a level-2 wavepoint.

    Obviously , th e greater the significan ce (lev el) of a price high or low, the m ore

    subsequent price pattern is required for th e significance to be recognized. Theimportant thing about the FWA is that the lag required to recognize theimportance of a high or low is dependent on lay ers of self-similarit y in pricepattern, not t ime. The FWA does not depend on scaler par ameters such as 12 weekcy cles, fiv e percent filters, 200 day mov ing av erages or the like. It depends onpure pattern.

    To continue with the exa mple in Figure 4, note that the point at P5 is recognizedas a wav epoint a t lev el-2 w hen the first zig-zag in the down direction is completedafter the point at P7. If the price were to adv ance in a similar fashion after P8, andrise above the price at P5, then P8 would become a lev el-2 wa v epoint and the

    required pat tern elements to recognize P0 as a lev el-3 wa v epoint w ould be in place.

    To summarize the FWA rules: Accept an a v ailable stream of price data as lev el-0 data . Mark alternating high s and lows in the price stream as lev el-0wav epoints. When a lev el-0 zig-zag is completed in th e up dir ection, mark theappropriate lev el-0 low as a lev el-1 wa v epoint. Similar ly , when level-0 zig-zagsar e completed in the down direction, ma rk the appropriat e lev el-0 high as a lev el-

  • 7/22/2019 Fractal Wave Algorithm for trading stocks market

    11/17

    11

    1 wa v epoint. In the sam e wa y , use lev el-"k" zig-zags to identify lev el-"k+1 "wav epoints.

  • 7/22/2019 Fractal Wave Algorithm for trading stocks market

    12/17

    12

    Fractal Wav es in the Dow J ones Industr ial A v erage

    The prev ious section presented the FWA in th e context of a "classic" Elliott Wav e

    price curv e. Every technical ana lyst, Elliott Wav e follower or not, is awar e thatthe m arkets rar ely tra ce out price patterns in tha t classic form .

    Figure 5 is a char t of the Dow Jones Industr ial Av erage (DJIA) based on astream of prices recorded each hour from January 2, 1990 through January 26,1 99 0. Opening prices were not recorded; the first price recorded after theprev ious close wa s the 1 0:00 am (New York) price.

    Figure 5. DJIA Lev el-1 Fra ctal Wav es

    Based on hourly data, there are 23 7 lev el-0 wav es in the DJIA from January 2,1 99 0 till February 1 6, 1 99 0. In Figure 5 only the lev el-1 wav e points hav e beenplotted. There are only 1 9 wa v es at lev el-1 . As y ou look at Figure 5, r emember

    that on the average, each wave shown is made up of twelve zig-zags running inth e direction of the wav e an d no zig-zags in the opposite direction.

    Since there is a series of level-1 zig-zags in the down direction from th e January3rd high at 2820.61, that point is a level-2 wavepoint, denoted by a squaresymbol at the point. There ar e two more lev el-2 w av epoints mar ked in Figu re 5,the most recent on February 8 at 2 655.63 . Note that a penetration of lev el-2 low

  • 7/22/2019 Fractal Wave Algorithm for trading stocks market

    13/17

    13

    at 2 533 .1 1 on Janu ary 26 would raise the significance of the January 3r d h igh tolev el-3.

  • 7/22/2019 Fractal Wave Algorithm for trading stocks market

    14/17

    14

    Value of Fractal Wav e Structure as a Predictiv e Tool

    The Stock Market m ay be driv en by non-linear dy namic processes wh ich g iv erise to fractal price structures. The FWA is a generalized technique for labeling

    price highs and lows as to their significance with in a fra ctal price structure. Thepractical question is, "Does th is discov ered fractal structu re prov ide informat ionin real time which can be used to make money in t he stock market?"

    In an attempt to shed some ligh t on that question, I hav e conducted a series ofresearch studies using hourly DJIA data from April, 1 987 to February , 1 99 0, anddaily DJIA data from 1 885 to February , 1 99 0.

    My conjecture is that a wav epoint identified by the FWA as a lev el "K" high is asignificant indication that prices wil l mov e lower; that a wav epoint identified bythe FWA as a lev el "K" low is a significant indication that pr ices will mov e high er.

    Of cour se, by the design of the algorithm , th e high s are high er th an the lows; aswith all trading tools, the success hinges on whether these highs and lows areidentified in tim e to prov ide successful tra ding opportunit ies.

    To test this conjectur e, the DJIA data was run thr ough the FWA. Each wav elev el wa s tested in the same fashion, simultaneously , according to the followin grules:

    At lev el "K":Take the most recent w av epoint at lev el "K+1 " to indicate the price

    trend.

    Take th e most recent wa v epoint at lev el "K" to indicate a "buy " or "sell"signal.

    Be "long" if the "K+1 " tr end is up and the "K" signal is "buy ."Be "short" if the "K+1 " tr end is down and the "K" sign al is "sell."

    Hour ly DJIA Data

    The results for hourly data from March, 1 987 are giv en in Table 1 . You shouldnote tha t there wa s a + 352 point bias in the hour ly data. That is, the first pricewas 352 points

    Wav e Lev el Nu mber of "Tr ades" Score (DJIAPoints)

    0 1 402 1 6591 266 1 0402 62 3

  • 7/22/2019 Fractal Wave Algorithm for trading stocks market

    15/17

    15

    3 1 1 5614 1 593

    Table 1 . FWA Predictiv e Score: DJIA Hour ly from March, 1 987

    lower than the final price. The lowest price wa s 1 7 47 ; the highest price was 2 81 4.There were no

  • 7/22/2019 Fractal Wave Algorithm for trading stocks market

    16/17

    16

    identified wa v epoints at lev el 5 or high er. Only one wa v epoint w as identified aslev el 4, the low at 1 7 47 .

    There were 1 1 trades identified at lev el 3 . The total score for being long or shortwith the lev el 3 dir ection, when it was in the direction of the lev el 4 wav e was 56 1

    Dow points. The av erage trade at lev el 3 resulted in a 51 point profit. Fiv e of thelev el 3 tr ades were profitable. The a v erage gain was 23 3 points; the av erage losswas 1 01 points. Th is would appear to be potentia lly useful information, ev en afterallowing for "tr ading costs" such as execution slippage and comm issions. Theaddition of stan dar d stop loss tech niques could possibly y ield an at tr activ e tr adingmethod.

    The results for lev els lower than lev el 3 ar e similar at each lev el. In each casethere ar e too many "trades" identified with, on av erage, too litt le price mov ementto provide attractiv e opportun ities. The a v erage ga in or loss per tr ade is one totw o Dow points. I would conclude on the basis of th is small am ount of data th at

    there is insufficient informat ion produced by the FWA at lev els 0, 1 , an d 2 onhourly data to provide profitable trading opportun ities.

    Daily Data

    The results for daily data from 1 885 are giv en in Table 2. We see a similarpattern to that obtained from the hourly data: The number of trades decreases aswould be expected with incr easing wav e lev el, and the "score" decr eases to aminimum , then increases with increasing wav e lev el. For the results shown heresignificant t rading opportunities from daily data em erge at lev el 4, wh ere the

    av erage score per tra de is alm ost 2 00 Dow points.

    Wav e Lev el Nu mber of Tr ades Score (DJIA Points)

    0 7 7 34 51 611 1 27 7 6242 232 1 053 44 1 0594 1 0 1 9865 1 2526

    Table 1 . FWA Predictiv e Valu e: DJIA Daily from 1 885

  • 7/22/2019 Fractal Wave Algorithm for trading stocks market

    17/17

    17

    Summary

    In summary , I would conclude that it is possible to recognize profita ble tr adingopportunities by identify ing a fractal wav e stru cture in stock mar ket price data.

    The FWA is a u seful addition to the ar senal of tools used by technical analy sts.

    There are many areas in which my research is continuing, including analysisof "tick" data for a wide range of comm odity mar kets, dev elopment of m oresophisticated trading "systems", and real-tim e trading of some preliminarysystems.