Expert Systems wth Applcatons Expert Systems wth Applcatons 34 (2008) 620 627 www.elsever.com/locate/eswa Intellgent stock tradng system by turnng pont confrmng and probablstc reasonng Depe Bao *, Zehong Yang State Key Lab of Intellgent Technology and Systems, Computer Scence Department, Tsnghua Unversty, Bejng, Chna Abstract Fnancal engneerng such as tradng decson s an emergng research area and also has great commercal potentals. A successful stock buyng/sellng generally occurs near prce trend turnng pont. Tradtonal techncal analyss reles on some statstcs (.e. techncal ndcators) to predct turnng pont of the trend. However, these ndcators can not guarantee the accuracy of predcton n chaotc doman. In ths paper, we propose an ntellgent fnancal tradng system through a new approach: learn tradng strategy by probablstc model from hgh-level representaton of tme seres turnng ponts and techncal ndcators. The man contrbutons of ths paper are two-fold. Frst, we utlze hgh-level representaton (turnng pont and techncal ndcators). Hgh-level representaton has several advantages such as nsenstve to nose and ntutve to human beng. However, t s rarely used n past research. Techncal ndcator s the knowledge from professonal nvestors, whch can generally characterze the market. Second, by combnng hgh-level representaton wth probablstc model, the randomness and uncertanty of chaotc system s further reduced. In ths way, we acheve great results (comprehensve experments on S&P500 components) n a chaotc doman n whch the predcton s thought mpossble n the past. Ó 2006 Elsever Ltd. All rghts reserved. Keywords: Intellgent stock tradng system; Turnng pont; Techncal ndcators; Markov network 1. Introducton The stock market s a complex and dynamc system wth nosy, non-statonary and chaotc data seres (Peters, 1994). Stock movement s affected by the mxture of two types of factors: determnant (e.g. gradual strength change between buyng sde and sellng sde) and random (e.g. emergent affars or daly operaton varatons). Generally, the random factors are regarded as nose n stock data. Due to complcaton and uncertanty of stock market, stock predcton s one of the most challengng problems. Along wth the development of artfcal ntellgence, especally machne learnng and data mnng, more and more researchers try to buld automatc decson-makng systems to predct stock market (Kovalerchuk & Vtyaev, 2000). Among these approaches, soft computng technques such * Correspondng author. Tel.: +86 010 62777087. E-mal address: baodepe@gmal.com (D. Bao). as fuzzy logc, neural networks, and probablstc reasonng draw most attenton because of ther abltes to handle uncertanty and nose n stock market (Vanstone & Tan, 2003, 2005). However, most of them just utlze low-level prce data as ther tranng set n classfcaton or rule nducton (Vanstone & Tan, 2003). Though soft computng can somewhat reduce the mpact of random factors, low-level data are so uncertan that they even behave purely randomly at some tme (Peters, 1994). Hgh-level representaton ntegrates human understandng of stock market nto representatve model, whch can largely reduce the randomness embedded n the low-level data. A fnancal tme seres moves generally n fluctuant way because of contnuous changes of strength between buyng sde and sellng sde. Therefore, data seres s comprsed of a seres of turnng ponts. Good nvestors wll sell stocks at the top of the range and buy stocks at the bottom of the range wthn the stock trends. Obvously, the top and the bottom are near the turnng ponts. We make use of 0957-4174/$ - see front matter Ó 2006 Elsever Ltd. All rghts reserved. do:10.1016/j.eswa.2006.09.043
D. Bao, Z. Yang / Expert Systems wth Applcatons 34 (2008) 620 627 621 ths hgh-level representaton by predctng or confrmng turnng ponts at the tme close to ts occurrence nstead of predctng the precse prce n the future. Another knd of hgh-level representaton s techncal ndcators, whch are some statstcs derved from recent prce data. In techncal analyss (Prng, 2002), the central dea s to look for peaks, bottoms, trends, and ndcators to estmate the possblty of current trend reversal and then makng buy/sell decsons based on those factors. In fact, techncal ndcators and turnng pont representaton are consstent. In ths paper, we combne these two hgh-level representatons together to make buy/sell decson. However, there stll exsts uncertanty n hgh-level representatons. For example, sngle ndcator generally cannot predct trend reversal wth hgh accuracy. More effectvely they should be vewed n probablstc manner,.e. more ndcators ndcate the same reversal, and more probable t wll occur. Thus, the probablty model s used to further ntegrate two representatons, and parameters of the model are learned from hstorcal data. In Secton 2, the archtecture of our system s presented. Then, we descrbe the detals of tranng and testng of probablstc model n Secton 3. The experments n Secton 4 show the promsng of our system. Fnally, we conclude. 2. Archtecture of our system Due to fluctuaton, there are many local maxmal/mnmal ponts n stock data seres (we wll call them crtcal ponts for smplcty). Some of them are real trend reversal ponts and others are just nose. The hgh-level representaton s to represent the tme seres as well as tranng examples by these real turnng ponts. Moreover n techncal analyss, all ndcators can produce sgnals at certan tme to ndcate the reversal of current trend. The sgnals of most techncal ndcators occur after turnng pont (of course, they are close to the turnng pont and stll n the top or bottom range of the trend). Therefore, n our model, we use techncal ndcators to confrm whether a crtcal pont s real turnng pont of current trend along wth the movement of prce. The archtecture of our system s shown n Fg. 1. Lke most machne learnng algorthms, there are tranng and testng phase. The purpose of tranng s parameter selecton for our probablstc model from hstorcal data. Then, Fg. 2. Probablstc structure. n testng phase, we use our model to make buy/sell decson. The probablstc model s a smplfed Markov Network (Pearl, 1988) wth one node as predctor varable and other nodes as evdence varables shown n Fg. 2. Parameter vector - ={x 1,...x n }s assgned to every lnk between predcator and evdence. Every evdence node represents a techncal ndcator and the predcator represents whether current canddate turnng pont s the real trend reversal pont (true/false). When an ndcator produce sgnal, ts correspondng node wll take true, or else take false. The result of the model s probabltes of predcator takng true and false. In Markov Network, parameters on the lnk between evdence and predcator are learned from database wth dscrete postve and negatve nstances. We take a real turnng pont and sgnals of ndcators near t as a postve nstance (vector) n the tranng set. Real turnng pont s selected dependng on nvestors tradng cycle and strategy (long term or short term nvestment, etc). In our tranng process, we measure the cycle by the duraton and Fg. 1. Archtecture of the tradng system. Fg. 3. Stock tme seres wth thn lnes as orgnal data and bold lnes as trend.
622 D. Bao, Z. Yang / Expert Systems wth Applcatons 34 (2008) 620 627 oscllaton between a local maxmal pont and a local mnmal pont. Then, f these two parameters exceed some thresholds determned by tradng cycle between two consecutve crtcal ponts, these two ponts wll be the turnng ponts of the current trend and prevous trend, as shown n Fg. 3. 3. Tranng and testng of the model 3.1. Measure crtera of turnng ponts As shown n Fg. 4, the crteron s defned as follows (Perng, Wang, Zhang, & Parker, 2000): Gven a sequence of crtcal ponts (x 1,y 1 ),...(x n,y n ), (x and y are the tme pont and prce data of the th crtcal pont, respectvely), a mnmal tme nterval T and a mnmal vbraton percentage P, (we call them together as dstance), remove (x, y ) and (x +1, y +1 )f x þ1 x < T and jy þ1 y j ðy þ y þ1 Þ=2 < P: The thresholds of P and T have ntutve meanng. For example, f a stock trader trades once a week (5 busness days) and regards a 5% gan or loss as sgnfcant, then he/she smply uses P = 0.05 and T = 5 to recognze turnng pont. In our experment, we assgn dfferent thresholds for dfferent stocks n terms of the volatlty of hstorcal data. 3.2. Postve and negatve nstances selecton As stated n prevous secton, we defne postve nstance (.e. turnng pont) as crtcal pont that exceeds specfed threshold and negatve nstance as crtcal ponts, whch fal to exceed the gven threshold. However, drectly followng ths defnton wll make the number of negatve nstances Fg. 4. Crteron of the model. Fg. 5. (a) Postve nstance (b) negatve nstance (c) modfed negatve nstance.
D. Bao, Z. Yang / Expert Systems wth Applcatons 34 (2008) 620 627 623 far more than that of postve ones and make the parameter learnng algorthm nvald. To address such problem, suppose we move along all crtcal ponts n tranng set to select crtcal pont one after another lke realstc tradng process (testng). In Fg. 5a, the current canddate crtcal pont s a real turnng pont and prevous trend s downtrend. We cannot confrm ths reversal untl we reach the crtcal pont wth the oscllaton and tme nterval between t and canddate turnng pont exceedng threshold. Note that a local maxmal pont and a mnmal pont act as turnng pont alternately. Hence, any local maxmal/mnmal pont between these two ponts cannot be regarded as canddate reversal ponts (.e. nether as postve or negatve nstances) wthout prevous canddate pont confrmaton. In other words, no crtcal pont wll be regarded as canddate turnng pont (postve or negatve nstance) untl dstance between current crtcal pont and canddate turnng pont exceeds threshold (f t s the real turnng pont). On the other hand, n Fg. 5b f current canddate turnng pont A (current s downtrend) s a false turnng pont (we have not known that at current pont), then never can we fnd another crtcal pont satsfyng above condtons n the future. In such case, t wll be regarded as false turnng pont,.e. negatve nstance, when we get to the crtcal pont hgher (for uptrend reversal) or lower (for downtrend reversal) than t (new canddate s more hgher or lower n the neghborhood. Before new canddate, current trend s not reversed). However, even by such dsposal, negatve nstances outnumber postve ones a lot. In practce, we generally do not concern whether a crtcal pont s a turnng pont, when t does not behave lke a turnng pont,.e. has oscllaton and tme nterval to next crtcal pont to some extent. Ths means there s another threshold (thres ) between a certan future opposte crtcal pont before next canddate turnng pont and the current pont, whch should be exceeded (Fg. 5c). Then only crtcal pont meetng ths extra condton wll be regarded as negatve nstance. 3.3. Sgnal recognton In our system, we adopt 4 common techncal ndcator systems ncludng 30 ndcators (we can enhance our system by more ndcator systems n the future), they are: Movng average system. RSI oscllator system. Stochastc slowk slowd crossover/oscllator system. Trendlne system. The sgnals of the ndcator system are recognzed and then assgned to ther closest postve or negatve nstances accordng to the propertes of ndcators,.e. leadng or laggng. A leadng sgnal wll be assgned to next nstance whle a laggng sgnal wll be assgned to prevous nstance. Then, every nstance can be represented as a Boolean vector. A comprehensve dscusson of techncal analyss and ndcator computaton can be found n the book by Prng (2002). 3.4. Probablstc model In Markov Network, for each clque C (namely the maxmal subgraphs, whose nodes are all adjacent to each other) assgn a nonnegatve and real-valued potental functon (also called compatblty functon) g (c ), where c s an assgnment to the varables n C. Then the jont dstrbuton of the Markov Network s gven by PðX ¼ xþ ¼ 1 Y g Z ðc Þ; ð1þ where partton functon s Z ¼ P Q x2v g ðc Þ. P(X = x) s normalzed product P over all possble value combnatons of the varables n the system. Rchardson and Domngos (2004) represent the jont dstrbuton n log-lnear form, wth each clque potental functon replaced by an exponentated weghted sum of features of the state, leadng to! PðX ¼ xþ ¼ 1 Z exp x f ðxþ : ð2þ X Comparng Eq. (1) wth Eq. (2), we get logg (c )=x f (x). A feature f (x) may be any real-valued functon of the state. In fact, our model defnes f (x) n logc (hence f (x) 2 {0,1}),.e. we regard connectons between nodes as propostonal rules L 1! L 2 (L 1 _ L 2 ) and each rule corresponds to one clque. If x 2 {TRUE,FALSE} 2 n each clque makes the correspondng rule take TRUE value, then f (x) = 1, or else f (x) =0. 3.4.1. Inference Inference n Markov networks equals to answer arbtrary queres of the form: What s the probablty that set of varables V 1 holds gven that another set of varables V 2 does? That s PðV 1 jv 2 Þ¼ PðV 1 ^ V 2 Þ PðV 2 Þ ¼ P x2v V \v 1 V PðX ¼ xþ P 2 ; ð3þ x2v V PðX ¼ xþ 2 where v V s the set of truth values, wherev holds, and P(X = x) s gven by Eq. (2). In our problem, the condtonal probabltes requred to calculate take only one form, accordng to Eq. (3): PðY ¼ yjx 0 ¼ TRUEÞ P PðY ¼ y; X ¼ xþ x;y2v X 0 ¼TRUE\V Y ¼y ¼ P P PðY ¼ TRUE; X ¼ xþþ x;y2v X 0 ¼TRUE\V Y ¼TRUE where X 0 X. x;y2v X 0 ¼TRUE \V Y ¼FALSE PðY ¼ FALSE; X ¼ xþ ; ð4þ
624 D. Bao, Z. Yang / Expert Systems wth Applcatons 34 (2008) 620 627 However, computng Eq. (4) drectly s ntractable. Some approxmaton algorthms should be taken. Gbbs samplng, a specal Monte Carlo Markov Chan (MCMC) algorthm s adopted. A more detaled ntroducton to Gbbs samplng and MCMC can be found n lecture note by Walsh (2002). 3.4.2. Parameter learnng The dependency parameter learnng s carred out on all nstances. By closed world assumpton, we assume that any varable wthout explct assgnment wll be consdered as FALSE. In probablstc model parameter estmaton, the usual method s maxmum lkelhood estmaton. For our model, the log-lkelhood functon can be wrtten as LðW Þ¼log Yn P x ðx ¼ x j Þ ¼ Xn X x f ðx j Þ n log Z; where W s weght vector W =(x 1,x 2,...x jnj ), n s the number of all nstances. The dervatve of the log-lkelhood wth respect to ts weght s o o x LðW Þ¼ Xn f ðx j Þ n Xn P x ðx ¼ x j Þf ðx j Þ; where the sum s over all possble nstances, and P x (X = x j ) s P(X = x j ) computed usng the current weght vector. Unfortunately, due to Rchardson and Domngos (2004), calculatng the second tem n Eq. (6), whch requres nference over the model s ntractable. An alternatve s proposed by Sngla et al. (2005) called dscrmnatve tranng. The parameter estmaton through optmzng condtonal lkelhood functon s more convenent than optmzng lkelhood functon accordng to the structure of our model. The condtonal lkelhood functon of Y gven X s Y n PðY ¼ y j jx ¼ x j Þ ¼ Yn 1 Z x exp ð5þ ð6þ X! x f ðx j ; y j Þ ; ð7þ 2V y where V Y s the set of clques that contans at least one varable n Y. The gradent of the condtonal log-lkelhood (CLL) s o o x log Yn ¼ Xn P x ðy ¼ y j jx ¼ x j Þ " f ðx j ; y j Þ n X # P x ðy ¼ y 0 jx ¼ x j Þf ðx j ; y 0 Þ ; y 0 2V Y where V Y s the set of all possble values of Y. ð8þ Despte of ts reducton of dmenson, the CLL cannot be calculated precsely n general case. However, the CLL and ts gradent can be transformed nto tractable form because there s only one query varable and two possble values n our model. Then the gradent of CLL becomes o o x log Yn ¼ Xn P x ðy ¼ y j jx ¼ x j Þ f ðx j ; y j Þ Xn ½P x ðy ¼ TRUEjX ¼ x j Þ f ðx j ; y j ¼ TRUEÞþP x ðy ¼ FALSEjX ¼ x j Þ f ðx j ; y j ¼ FALSEÞŠ; where P x ðy ¼ TRUEjX ¼ x j Þ ð9þ expð P x f ðx j; y j ¼ TRUEÞÞ ¼ expð P x f ðx j; y j ¼ TRUEÞÞ þ expð P x f ðx j; y j ¼ FALSEÞÞ ; P x ðy ¼ FALSEjX ¼ x j Þ expð P x f ðx j; y j ¼ FALSEÞÞ ¼ expð P x f ðx j; y j ¼ TRUEÞÞ þ expð P x f ðx j; y j ¼ FALSEÞÞ : (derved under close world assumpton). The gradent of CLL can be obtaned wth ease and no approxmatng algorthm s requred. Then, wth condtonal lkelhood functon and ts gradent we can use any unconstraned optmzaton algorthm (e.g. Quas-Newton method) to acheve optmzed x. 4. Experment We test our system on two man aspects: probablstc model computng cost and tradng result. 4.1. Computng cost of probablstc model The cost for learnng and nference s low. Parameter learnng (wth 1000 teratons n local searchng) wth tran set of 30 years (7800 daly ponts, around 500 nstances) takes only about 75 s. Inference on a canddate turnng ponts takes average 73.188 s on a P4 2.4G computer. Though there s no benchmark for ths problem, the tme cost s much lower than other approaches. The reason for ths effcency s that we take hgh-level representaton for the learnng and nference. 4.2. Test on automatc stock tradng A smple tradng rule s adopted: when we confrm current reversal wth certan probablty, we sell/buy,.e. when current turnng s from uptrend to downtrend, sell and vce
versa. Suppose $1000 ntal fund and trade all funds/stocks at each operaton. D. Bao, Z. Yang / Expert Systems wth Applcatons 34 (2008) 620 627 625 4.2.1. Typcal stock movements and ther trades In ths experment, each stock wll be traned and tested ndvdually. We employ all hstorcal prce of one stock, and all data are parttoned nto tran set and test set (only dealng wth stock wth over 3000 ponts). Fg. 6 shows a movement n a fluctuant and overall loss market and long perod trade (4 years). In such market, our tradng system s stll able to proft up to 71.2% whle the stock loss s about 31.6%. Movement n Fg. 7 s an overall bull market and short perod trade (2 years). In such market, our tradng system s able to proft up to 79% whle the market gans about 61.3%. In other word, our system can outperform buyand-hold strategy n bull market. Fg. 8. Trade log of AES CP INC for 2 years, wth probablty set to 0.8 and proft 104%. Fg. 6. Tradng log (black: sell, grey: buy) of ALCOA INC for 4 years, wth probablty set to 0.8 and proft 71.2%. Fg. 9. S & P500c from May 3, 2002 to November 25, 2005 (900 ponts). Fg. 7. Trade log of AMERISOURCEBERGEN CP for 2 years, wth probablty set to 0.8 and proft 79%. Fg. 10. Average proft rate of S & P500 components on dfferent probabltes.
626 D. Bao, Z. Yang / Expert Systems wth Applcatons 34 (2008) 620 627 Table 1 Three perods proft of 10 arbtrary selected stock n S & P500 Symbol 2000 2002 (%) 2002 2004 (%) 2004 2006 (%) ASN 15.2 64.9 14.5 BHI 71.6 45.4 5.4 CMVT 34.3 35.7 229.5 CVS 9.2 58.4 70.3 HAS 20.8 5.7 201.3 LEN 48.3 37.2 20.7 LPX 7.0 55.6 12.9 MUR 20.7 32.1 64.4 PGL 5.9 13.3 33.3 PHM 26.8 77.8 24.8 Movement n Fg. 8 s an overall bull market and short perod trade (2 years). In such market, our tradng system acheves excellent result up to 104%. 4.2.2. Overall market performance Most tradng systems evaluate ther performance on selected stock. However, such test s unrelable to prove effectveness due to lack of generalzaton. To valdate our system extensvely, we test gan or loss of 500 stocks (S & P500 components) and check whether ther average proft outperform S & P500c ndex. Fg. 9 shows S & P500c ndex over three years (900 ponts), t gans about 18.15%. The system performs smulated tradng on 454 stocks (wth over 3000 daly data for tranng and testng) and gets profts on 416 stocks. The average proft rates wth dfferent probabltes n tradng rule are exhbted n Fg. 10. The maxmal proft rate s up to 43.6%. On average, the proft s mproved wth more certanty on trend reversal. Table 2 Mssed opportuntes and false operaton of IBM Probabltes 0.5 0.55 0.6 0.65 0.7 0.75 0.8 0.85 0.9 0.95 Actual opportunty 36 36 36 36 36 36 36 36 36 36 Mssed opportunty 4 4 4 4 4 4 4 10 14 18 Mssed % 11.1 11.1 11.1 11.1 11.1 11.1 11.1 27.8 38.9 50 Total operaton 16 16 16 16 16 16 16 13 11 9 False operaton 7 7 5 5 5 3 3 4 3 3 F.O % 43.8 43.8 31.3 31.3 31.3 18.8 18.8 30.8 27.3 33.3 Proft % 24.4 23.3 93.7 92.8 98.9 145.1 160.3 63.0 34.9 53.1 Table 3 Mssed opportuntes and false operaton of mcrosoft Probabltes 0.5 0.55 0.6 0.65 0.7 0.75 0.8 0.85 0.9 0.95 Actual opportunty 48 48 48 48 48 48 48 48 48 48 Mssed opportunty 4 4 6 8 8 8 14 24 34 42 Mssed % 8.3 8.3 12.5 16.7 16.7 16.7 29.2 50 70.8 87.5 Total operatons 22 22 21 20 20 20 17 12 7 3 False operaton 9 9 7 5 5 5 5 3 2 1 F.O % 40.9 40.9 33.3 25 25 25 29.4 25 28.6 33 Proft % 27.1 23.6 69.5 87.5 75.9 74.3 36.0 21.1 9.2 26.9 Fg. 11. Tradng log (buy: grey sell: black) of IBM and Mcrosoft.
D. Bao, Z. Yang / Expert Systems wth Applcatons 34 (2008) 620 627 627 Second, we pck 10 stocks n random and examne ther proft on three perods of tme (two years (252 * 2 ponts) each) wth probablty 0.8. The results are lsted n Table 1. Accordng to Table 1, most stocks can proft wth only few loss (due to the overall downtrend durng that perod). 4.2.3. Experments on ndvdual stock We test the system on three specfed crtera: mssed opportunty, false operaton and proft. The experment s carred out on the common selected IBM and Mcrosoft of many papers. Mssed opportunty s defned as the number of real tunng pont wthout tradng operaton. False operaton s the number of loss operatons (buy hgh and sell low) n total operatons (one operaton contans a buy and a sell). Tables 2 and 3 lst the results of IBM and Mcrosoft stock tested from January 3, 2000 to December 30, 2005 wth dfferent probabltes. Tradng logs of IBM and Mcrosoft are shown n Fg. 11. Though there are some losses of Mcrosoft at some probabltes, the overall prce of Mcrosoft drops about 77.5% durng the perod. In addton, our raw tradng rule s not so elaborate as to adapt to dfferent probabltes. We can see IBM also experenced drastc decrease ( 29.1%), but we can stll proft a lot even by our smple tradng rule. Moreover, two crtera: mssed opportuntyand false operaton are satsfactory. 5. Concluson In ths paper, we present a novel mplementaton of stock tradng system, whch combnes hgh-level representatons wth probablstc model. We regard the fnancal market as a dynamc system wth uncertanty. Therefore a hgh-level representaton and probablstc model are more robust to such problem. Some smulated experments are carred out to test the effcency of our system, showng the unversally proftablty for most stocks n the market. Further work ncludes augmentng the system wth other soft computng technques and developng more reasonable tradng rules. The applcablty of our system s to facltate people n tradng decson by provdng them wth hghlevel decson. References Kovalerchuk, Bors & Vtyaev, Evgen. (2000). Data mnng n fnance: advances n relatonal and hybrd methods. Kluwer Academc. Pearl, J. (1988). Probablstc reasonng n ntellgent systems: networks of plausble nference. San Francsco, CA: Morgan Kaufmann. Perng, C.S., Wang, H., Zhang, S.R., & Parker, D.S. (2000). Landmarks: a new model for smlarty based pattern queryng n tme seres databases, In Proceedngs of the sxteenth nternatonal conference on data engneerng. San Dego, USA. Peters, Edgar E. (1994). Fractal market analyss: applyng chaos theory to nvestment and economcs. New York: Wlley & Sons, Inc. Prng, Martn. (2002). Techncal analyss explaned, (4th ed.). Paperback McGraw-Hll Company, ISBN0071226699. Rchardson, M., & Domngos, P. (2004). Markov logc networks, Techncal report, Department of Computer Scence and Engneerng, Unversty of Washngton, Seattle, WA. Sngla, Parag and Domngos, Pedro. (2005). Dscrmnatve tranng of Markov logc networks. In. Proceedngs of the twenteth natonal conference on artfcal ntellgence (pp. 868 873). Pttsburgh, PA: AAAI Press. Vanstone, B., & Tan, C. (2003). A survey of the applcaton of soft computng to nvestment and fnancal tradng, In Proceedngs of the eghth Australan & New Zealand ntellgent nformaton systems conference (ANZIIS 2003). Sydney, Australa, December 10 12. Vanstone, B., & Tan, C.N.W. (2005). Artfcal neural networks n fnancal tradng, In M. Khosrow-Pour (Ed.), Encyclopeda of nformaton scence and technology. Idea Group. Walsh, B. (2002). Markov chan Monte Carlo and Gbbs samplng, lecture. Notes for EEB, 596z.