scieee Open visual document viewer

STOCK PRICE PREDICTION USING MARKOV CHAINS ANALYSIS WITH VARYING STATE SPACE ON DATA FROM THE CZECH REPUBLIC

Svoboda, Milan

Abstract

The article describes empirical research that deals with short-term stock price prediction. The aim of this study is to use this prediction to create successful business models. A business model that outperforms the stock market, represented by the Buy and Hold strategy, is considered to be successful. A stochastic model based on Markov chains analysis with varying state space is used for short-term stock price prediction. The varying state spate is defined based on multiples of the moving standard deviation. A total of 80 state space models were calculated for the moving standard deviation with 5-step lengths from 10 to 30 in combination with the standard deviation multiples from 0.5 to 2.0 with the step of 0.1. The efficiency of the business models was verified for 3 long-term, liquid stocks of the Czech stock market, namely the stocks of KB, CEZ, and O2 within a 14-year period – from the beginning of 2006 to the end of 2019. Business models perform best when they use a state space defined on the length of a moving standard deviation between 15 and 30 in combination with multiples of the standard deviation between 1.1 and 1.2. Business models based on these parameters outperform the passive Buy and Hold strategy. In fact, they outperform the Buy and Hold strategy for both the entire period under review and the yielded five-year periods (including transaction fees). The only exception is the five-year periods covering 2015 for O2 stocks. After the end of the uncertainty period caused by unclear intentions of the new majority stockholder, the stock price rose sharply. These results are in conflict with the efficient markets theory and suggest that in the period under review, the Czech stock market was not effective in any form.

Full text

142 2021, XXIV, 4 Finance 10.15240/ ul/001/2021-4-009 STOCK PRICE PREDICTION USING MARKOV CHAINS ANALYSIS WITH VARYING STATE SPACE ON DATA FROM THE CZECH REPUBLIC Milan S oboda1, Pa la Řího á2 1 Uni e si y o Wes Bohemia in Pilsen, Facul y o Economics, Depa men o Economics and Quan i a i e Me hods, Czech Republic, [email p o ec ed]; 2 Uni e si y o Wes Bohemia in Pilsen, Facul y o Economics, Depa men o Economics and Quan i a i e Me hods, Czech Republic, ORCID: 0000-0002-6632-445X, [email p o ec ed]. Abs ac : The a icle desc ibes empi ical esea ch ha deals wi h sho - e m s ock p ice p edic ion. The aim o his s udy is o use his p edic ion o c ea e success ul business models. A business model ha ou pe o ms he s ock ma ke , ep esen ed by he Buy and Hold s a egy, is conside ed o be success ul. A s ochas ic model based on Ma ko chains analysis wi h a ying s a e space is used o sho - e m s ock p ice p edic ion. The a ying s a e spa e is de ined based on mul iples o he mo ing s anda d de ia ion. A o al o 80 s a e space models we e calcula ed o he mo ing s anda d de ia ion wi h 5-s ep leng hs om 10 o 30 in combina ion wi h he s anda d de ia ion mul iples om 0.5 o 2.0 wi h he s ep o 0.1. The e iciency o he business models was e i ied o 3 long- e m, liquid s ocks o he Czech s ock ma ke , namely he s ocks o KB, CEZ, and O2 wi hin a 14-yea pe iod – om he beginning o 2006 o he end o 2019. Business models pe o m bes when hey use a s a e space de ined on he leng h o a mo ing s anda d de ia ion be ween 15 and 30 in combina ion wi h mul iples o he s anda d de ia ion be ween 1.1 and 1.2. Business models based on hese pa ame e s ou pe o m he passi e Buy and Hold s a egy. In ac , hey ou pe o m he Buy and Hold s a egy o bo h he en i e pe iod unde e iew and he yielded i e-yea pe iods (including ansac ion ees). The only excep ion is he i e-yea pe iods co e ing 2015 o O2 s ocks. A e he end o he unce ain y pe iod caused by unclea in en ions o he new majo i y s ockholde , he s ock p ice ose sha ply. These esul s a e in con lic wi h he e icien ma ke s heo y and sugges ha in he pe iod unde e iew, he Czech s ock ma ke was no e ec i e in any o m. Keywo ds: S ock ma ke p edic ion, echnical analysis, Ma ko chains, e icien ma ke heo y. JEL Classi ica ion: C02, C13, G14, G17. APA S yle Ci a ion: S oboda, M., & Řího á, P. (2021). S ock P ice P edic ion Using Ma ko Chains Analysis wi h Va ying S a e Space on Da a om he Czech Republic. E&M Economics and Managemen , 24(4), 142–155. h ps://doi.o g/10.15240/ ul/001/2021-4-009 In oduc ion This empi ical s udy deals wi h he sho - e m p edic ion o s ock p ices on he Czech s ock ma ke . S ock mo emen s ha e been o in e es o ade s o a long ime. Using a wide ange o analy ical me hods, i ies o sa is ac o ily cla i y pas and p esen changes in s ock p ices. Based on hese indings, i a emp s o p edic he u u e de elopmen o s ock p ices. Ea ly o ecas ing allows ade s o make capi al gains. I is necessa y o men ion ha acco ding o E icien Ma ke Hypo hesis (EMH), s ock p ices a e unp edic able and ma ke s a e e icien . This means ha he ma ke esponds immedia ely o any new in o ma ion. This in o ma ion canno be p edic ed, i is andomly sen o he ma ke and he e o e he change in he exchange a e EM_4_2021.indd 142 3.12.2021 11:21:51 143 4, XXIV, 2021 Finance is andom and he exchange a es pe o m a so-called ʻ andom walk’. In e icien ma ke s he abo e-a e age p o i s canno be achie ed and acco ding o his heo y, o he app oaches a e dys unc ional. The idea o a andom walk was p obably i s published in he doc o al disse a ion o he F ench ma hema ician L. Bachelie in 1900. Acco ding o Coo ne (1964), a e mo e han 60 yea s his Bachelie s udy was i s published in English and had eco e ed ‘ he igh ul place’ in inancial econome ics. La e ano he scien is , Fama (1965, 1970, 1991), e u ned o his idea and de eloped i subs an ially. He examined he co ela ion be ween daily e u ns and p io ’s pe iod daily e u ns o s ocks composing he DJI index. The co ela ion coe icien s we e a ound ze o. He hus concluded ha he e u n on he s ock had no ela ion o he e u n o he p io pe iod. Fama’s conclusions we e con i med by Solnik (1973) who wo ked wi h he da a om Eu opean s ock ma ke s. The e icien ma ke hypo hesis (EMH) was also con i med by o he s udies and esea ches by in es men economis s. Robe s (1967) was he i s o iden i y he pa icula o ms o e iciency as a weak, semi- s ong and a s ong o m o e iciency. The weak o m o e iciency means ha he exchange a e includes all in o ma ion om his o ical da a and he e o e, me hods o echnical analysis a e no able o p edic he ma ke . The semi- s ong o m o e iciency is a si ua ion whe e he p ice includes bo h his o ical da a and all public in o ma ion and me hods o undamen al analysis also ail he e. The s ong o m EMH demons a es he ac ha e en inside in o ma ion is inco po a ed in o he s ock p ice. In a highly e icien ma ke , he e o e, he inside in o ma ion is wo hless and does no help in es o s o cap u e abo e-a e age e u ns. In he beginning, EMH was widely accep ed by he academic communi y. La e , howe e , s udies ques ioning he heo y s a ed o eme ge. Fo example, Shille (1981) d aws a en ion o he highe ola ili y o s ock p ices han can be explained by he ola ili y o di idends. Haugen (1999) belie es ha ma ke s o e eac o new unexpec ed in o ma ion and e e s o a ious s udies ha con i m he occu ence o anomalies in an e icien ma ke . The Czech s ock ma ke was also examined. In mos cases, a weak o m o e iciency is examined in he Czech s ock ma ke . The wo ks o Filáček e al. (1998) o Hanousek and Němeček (2001) inclined o he opinion ha he Czech s ock ma ke is beha ing ine icien ly. On he con a y, mo e ecen wo ks by File and Hanousek (1996) o Di iš and Teplý (2005), end o demons a e ha he s ock ma ke beha es e icien ly in a weak o m. The e o e, he me hods o echnical analysis do no b ing abo e-a e age e u ns. The e is no consensus in academia assessing he ques ion o whe he o no ma ke s a e e icien . Fo example, esea ch by Hájek (2007) poin ed ou ha be ween 2000 and 2005, he Czech s ock ma ke was app oaching a weak o m o e iciency. Simul aneously, he claimed ha he i e-yea pe iod was oo sho . And ha s a egies ha exploi ed o sho - e m dependences can be abno mally p o i able. Resea ch and discussions ela ed o he e iciency o s ock ma ke s a e likely o con inue in he yea s o come. Cu en empi ical esea ch con ibu es o his discussion. This pape deals wi h a p oblem o p edic ing he di ec ion o s ock p ices on he Czech s ock ma ke and builds on he wo k o S oboda (2016). This wo k desc ibes a s ochas ic model based on Ma ko chains analysis. The model is used o p edic sho - e m u u e s ock p ice mo emen . The main aim o his empi ical esea ch is o modi y he s ochas ic model men ioned abo e and apply his model success ully o he Czech s ock ma ke . I is possible o expec he ollowing bene i s o he esea ch:  Con ibu ion o he discussion o whe he he Czech s ock ma ke can be conside ed o ha e a weak o m e iciency.  Ve i ica ion o he conclusions o he wo k by S oboda (2016) in he longe e m. The pape is o ganized in he ollowing way. The i s pa desc ibes he heo e ical backg ound and he impo an heo y on Ma ko chains. The second pa o he wo k cha ac e izes he da a used o conduc esea ch and desc ibes he esea ch me hodology. The hi d mos comp ehensi e pa includes he ob ained empi ical esul s and hei b ie discussion. The inal pa con ains he e alua ion o he wo k pe o med and ou line he di ec ion o u he esea ch. 1. Theo e ical Backg ound The esea ch is based on he assump ion ha he s ock p ice is con inuously c ea ed on he s ock exchange by he mu ual in e ac ion EM_4_2021.indd 143 3.12.2021 11:21:51 144 2021, XXIV, 4 Finance be ween supply and demand. This supply and demand is gene a ed by di e en ypes o ade s (long- e m in es o s, specula o s). These ade s ha e di e en ime ho izons, hey use di e en me hods o es ima e he u u e income hey will ob ain by owning s ocks, and hey ha e di e en isk a e sion, di e en amoun s o capi al. E e y in es o ollows his in en ions and has di e en easons o buying o selling a gi en s ock. Supply o demand o a gi en s ock may no only be c ea ed due o he ade ’s subjec i e pe cep ion o he unde alua ion o o e alua ion o he s ock, bu also o many o he easons, such as he need o aise money, modi ica ion o in es men s a egy, aising new capi al by seconda y o e ing, o ced pu chases o sales in bo owed asse s, epu chases o s ocks by he join s ock company i sel , e c. The simul aneous ac ion o hese ac o s esul s in he cons an luc ua ion o he s ock p ice and can be seen as a andom a iable. The nex assump ion o echnical analysis is ha s ock p ices luc ua e in ends. When he end is iden i ied in a imely manne , ade s hope o abo e-a e age p o i s. The subjec o his esea ch is he o ecas ing o sho - e m p ice mo emen s ( e ia y end), while i is no he p ice le el ha is impo an , bu he es ima ion o he magni ude o p ice changes. The s ock p ice luc ua es in sho - e m ends and du ing he du a ion o his end he s ock p ice accumula es a ce ain gain o loss agains he p ice a he beginning o he end. The g ea e his change, he g ea e he likelihood o a change in his end. The key ques ion o us is how la ge he accumula ed loss o p o i mus be in o de o he end o change wi h a su icien ly high p obabili y. Acco ding o he na u e o he da a (daily opening and closing p ices), i is p ope o use he heo y o Ma ko chains o model he p obabili y o a end change. Ma ko chains (MC) heo y is desc ibed, o example, in Hillie and Liebe man (2010). MC a e used o modelling p ocesses which can be ound in one o ini e (coun able) numbe o s a es in disc e e ime momen s. MC is a sequence o disc e e andom a iables x1, x2, x3, ... wi h he Ma ko p ope y (a he ime momen n+1 he p ocess will be in s a e i. I is s ochas ically dependen only on he s a e ha was ac i e a he p e ious ime momen , i.e. a he ime n). Fo mally i can be desc ibed as ollows (1): P(Xn+1 = xn+1 | X1 = x1, X2 = x2, … , Xn = xn) = = P(Xn+1 = xn+1 | Xn = xn) (1) Pa icula ealiza ions xi a e elemen s o a coun able se S = {si}, i = 1, 2, ..., N which is called a s a e space. Beha iou o he desc ibed p ocess is de e mined by:  Vec o o uncondi ional p obabili ies p(n)T = [p1(n), p2(n), ..., pN(n)], whe e T means ansposi ion and pi(n) deno es p obabili y ha he p ocess is in he momen n in he s a e i.  T ansi ion p obabili y ma ix P whose elemen s pij gi e condi ional p obabili y o p ocess ansi ion om he s a e i o he s a e j. Tha could be o mally desc ibed as pij = P(Xn = sj |Xn-1 = si), whe e i = 1, 2, ... N and j = 1, 2, ... N. I we know he p obabili y o pa icula s a es appea ance a he ime momen when he p ocess s a s, we can desc ibe he p ocess beha iou using he ela ions (2): pT(n) = pT(n – 1)P hus pT(n) = pT(0) P n (2) I can be de i ed om he ela ions (2) ha he long- e m beha iou o his s ochas ic p ocess is de e mined by he ma ix P. In o de o he model o be success ul, i is necessa y o de ine he s a e space p ope ly. The e mus be such s a es in he s a e space om which he p ocess ans o ms in o s a es wi h he opposi e end wi h a su icien ly high p obabili y. In o he wo ds, we need o ind s a es in which he end is likely o change wi h a su icien ly high p obabili y. Such s a es could be used o gene a e buying o selling o de s. The use o MC o modelling s ock ma ke beha iou is no a new issue. O e he las decade, a numbe o pape s ha e been published using MC heo y o model s ock ma ke de elopmen . In some o hem he s a e space is de ined e y simply. Fo example, Doubleday and Esunge (2011) applied he Ma ko chains o he DJA index and o a po olio o selec ed s ocks om his index. They de ined a s a e space on daily p ice changes. They had es ed wo ypes o s a e space, wi h wo s a es and wi h six s a es. Vasan hi e al. (2011) deal wi h p edic ing he daily de elopmen o he alue o s ock indices. They p edic ed only he di ec ion o p ice luc ua ion, i.e. inc ease o dec ease. In o de o make he p edic ion hey had used ansi ion p obabili ies which hey had EM_4_2021.indd 144 3.12.2021 11:21:51 145 4, XXIV, 2021 Finance calcula ed successi ely om he las 5 yea s, 3 yea s and 1 yea . Pe ko ić e al. (2018) used a h ee-s a e model o e u ns analysis on he Belg ade S ock Exchange. Simila me hods ha e been applied o o he exchanges, such as Lakshmi and Manoj (2020) used MC analysis o he Indian s ock ma ke o Ya uz (2019) o he Tu kish s ock ma ke . The conclusions o hese wo ks show ha such a simple de ini ion o s a e space canno be used o ca y ou success ul business s a egies and a e now es ed mo e o en on eme ging ma ke s. The mos p omising me hods o success ul ading seems o be he applica ion o ad anced echniques o MC analysis o a di e en ly de ined s a e space. Nguyen (2018) used he hidden Ma ko chains o mon hly s ock p ice p edic ion. He had es ed models wi h wo o six s a es. These models had been es ed on S&P index. The esul s showed ha he hidden Ma ko model ha e ou pe o med he B&H s a egy and ha e yielded highe pe cen age e u ns. In he s udy by Huang e al. (2017) a model in eg a ing wo ypes o MCs was used o s ock p ice p edic ion: egula and abso bing MC. The abso bing MC p o ides in o ma ion on accumula ed p ice changes du ing he leng h o e ia y end. Riedlinge and Nicolau (2020) p edic ed he de elopmen o he FTSE 100 index one pe iod ahead using mul i a ia e MCs. The mul i a ia e model enables o include mo e a iables in he p obabili y model. The au ho s assumed ha s ock p ices could be a ec ed by a numbe o a iables and delays by mo e han one pe iod. The wo k by S oboda (2016) deal wi h he ac ha s ock p ices may be e en i e mo e han one pe iod in such a way ha he s a e space was de ined on he basis o he size o daily cumula i e changes in he s ock p ice. The wo k shows ha in such a de ined s a e space he e a e s a es in which he e is a su icien ly high p obabili y o he e ia y end e e sal. The s a e space in he abo e- men ioned wo k is de ined on he basis o mul iples o he s anda d de ia ion om daily p ice changes. The s anda d de ia ion is calcula ed o he en i e moni o ed pe iod. Howe e , he s anda d de ia ion calcula ed o he whole pe iod does no espec one o he basic cha ac e is ics o s ock ma ke s ha is changing ola ili y. The e o e, in his esea ch, he s a e space de ini ion is based on a mo ing s anda d de ia ion. I is expec ed ha he s a e space de e mined in his way will be able o espond o changing ola ili y and he model will demons a e be e esul s. 2. Da a We conduc esea ch on s ocks om he Czech s ock ma ke , which a e aded on he P ague S ock Exchange (PSE). The c i e ia o including s ock ypes in he esea ch we e as ollows:  PSE mus be he main ma ke o his s ock ype.  The s ocks mus be aded on PSE long enough.  Daily olumes mus be high enough, i.e., ul illing he assump ion ha he s ock is aded by all ypes o in es o s and has su icien liquidi y. These equi emen s a e me only by he ollowing ew companies: he elecommunica ions company O2 CR (O2), he KB bank (KB) and he ene gy company CEZ (CEZ). We ha e daily opening and closing p ices o each s ock ype o a ou een-yea pe iod, om 2 Janua y 2006 un il 2 Janua y 2020, i.e. app ox. 3,500 business days. The da a sou ce is Pa ia Di ec . The companies egula ly paid di idends in he gi en pe iod. In his esea ch, he a e - ax di idend is ein es ed. In he pe iod unde esea ch, on 2016-05- 12, KB spli i s s ocks 5- o -1. All da a (di idends, opening and closing p ices) ela ing o KB we e ecalcula ed in o de o main ain he da a con inui y. On 2015-06-01, O2 was di ided in o wo companies: O2 and CETIN. The inal p ice o he O2 s ock he day be o e he di ision o he company was CZK 177.6. Fo one o iginal O2 s ock, he s ockholde acqui ed one new O2 s ock and one CETIN s ock. On he i s day a e he spli , he p ice o he CETIN s ock was CZK 133.5 and he p ice o he O2 s ock was CZK 69.2. A he ime o he di ision o he company he ma ke was in o med ha a majo i y s ockholde o CETIN s ocks plans o ge id o mino i y s ockholde s and he s ocks will la e be wi hd awn om he ma ke . Main aining da a con inui y is add essed as ollows. CETIN s ocks a e sold a he p ice o CZK 133.5 on he i s day a e he di ision, and his income is u he coun ed in he same way as he di idend. This means ha O2 s ocks a e pu chased o hem acco ding o business s a egy. The p ocess o he s ock app ecia ion o he moni o ed s ocks wi h he ein es men o di idends is shown in Fig. 1. EM_4_2021.indd 145 3.12.2021 11:21:51 146 2021, XXIV, 4 Finance Special a en ion in Fig. 1 is d awn o a sha p inc ease in he app ecia ion o O2 s ocks in he second hal o 2015. Tha inc ease was caused by he end o he unce ain y ha had been e iden as soon as he elease o he in o ma ion on he majo i y s ockholde ’s ac ions en e ed he ma ke . In au umn 2013, PPF pu chased a majo i y s ake om Tele ónica. 3. Resea ch Me hodology S ock p ices mus i s be ans o med in o a sui able Ma ko chain. The ans o ma ion is pe o med in e ms o an app op ia ely de ined s a e space. A e ob aining he MC, sui able s a es o gene a ing ading signals a e selec ed based on he ansi ion p obabili y ma ix. These gene a ed ading signals help o c ea e ading s a egies ha se e as he oo ing o he ading model. 3.1 S a e Space The de ini ion o he s a e space is suppo ed by he wo k S oboda (2016). The s ock space is de ined on he cumula i e changes in he s ock p ice o e he du a ion o he e ia y end. The cumula i e change in he s ock p ice is deno ed by Y , which is in e p e ed as sho basic indices o daily closing p ices. The base pe iod is he day o he end change, i.e., he ansi ion poin om decline o g ow h o ice e sa. The du a ion o he end is de e mined by he numbe o consecu i e ising o alling closing p ices. Fo mally, he calcula ion o he cumula i e p ice change Y is desc ibed by (3): (3) whe e P is he inal daily p ice a ime , P –1 is he inal daily p ice a ime – 1 and P –2 is he inal daily p ice a ime – 2. Based on he alues o y (y is a pe cen age o Y ) a s a e space is de ined. A se wi h eigh s a es a e used o so he da a. As he s ock p ice alls, he co esponding condi ions a e ma ked Di. S a e D1 is he s a e wi h he smalles p ice d op and s a e D4 is he s a e wi h he highes p ice d op. Condi ions when he s ock p ice ises a e ma ked Gi. The G1 s a e is he s a e wi h he lowes p ice g ow h and, con e sely, he G4 s a e is he s a e wi h he highes p ice g ow h. The gene al s a e space model is de ined by he ollowing p inciple: D4: y < −3Δ G1: 0 ≤ y < 1Δ D3: −3Δ ≤ y < −2Δ G2: 1Δ ≤ y < 2Δ D2: −2Δ ≤ y < −1Δ G3: 2Δ ≤ y < 3Δ D1: −1Δ ≤ y < 0 G4: 3Δ ≤ y whe e Δ = kσ ,l ep esen s he wid h o he in e al, σ ,l is he s anda d de ia ion o daily changes in he s ock p ice, k is he mul iple o he s anda d de ia ion. The s anda d de ia ion is calcula ed as he mo ing s anda d de ia ion o leng h l, acco ding o he o mula (4): (4) Fig. 1: De elopmen o capi al alue Sou ce: Pa ia, own esea ch EM_4_2021.indd 146 3.12.2021 11:21:52 147 4, XXIV, 2021 Finance whe e x – i is he daily change o he s ock p ice a day – i, l s he leng h o he mo ing s anda d de ia ion (wid h o he sliding window) and x  ,l is he mo ing a e age leng hs o l a day . The so- de ined s a e space model ( a ying model) can espond o changing ola ili y in s ock ma ke s. S oboda (2016) in his wo k s a es, ha space model (un a ying model) was de ined on an unchanging s anda d de ia ion calcula ed om all neighbou ing alues. Fo indi idual s ocks, he ixed s anda d de ia ion is as ollows: σO2 = 1.548, σCEZ = 1.663, σKB = 1.899. The de elopmen o a mo ing s anda d de ia ion o pa ame e l = 20 is shown in Fig. 2. The s a e assignmen p ocedu e o bo h models o he s a e space desc ibed abo e is illus a ed on CEZ s ocks wi h model pa ame e s k = 1 and l = 20 in Tab. 1. Fig. 2: Mo ing s anda d de ia ion o l = 20 Sou ce: own Da e P x [%] y [%] Un a ying model Va ying model σS a e σ20 S a e 2019-12-12 505.5 0.999 0.999 1.66 G10.71 G2 2019-12-11 500.5 −1.476 −1.476 1.66 D10.66 D3 2019-12-10 508.0 0.594 1.195 1.66 G10.59 G3 2019-12-09 505.0 0.198 0.598 1.66 G10.58 G2 2019-12-06 504.0 0.099 0.398 1.66 G10.57 G1 2019-12-05 503.5 0.299 0.299 1.66 G10.59 G1 2019-12-04 502.0 −0.100 −2.240 1.66 D20.60 D4 2019-12-03 502.5 −1.374 −2.142 1.66 D20.68 D4 2019-12-02 509.5 −0.779 −0.779 1.66 D10.63 D2 2019-11-29 513.5 0.588 0.588 1.66 G10.62 G1 2019-11-28 510.5 −0.293 −0.293 1.66 D10.61 D1 2019-11-27 512.0 0.999 0.999 1.66 G10.71 G2 . . . . . . Sou ce: own Tab. 1: P ocedu e o assigning s a es (CEZ, k = 1, l = 20) EM_4_2021.indd 147 3.12.2021 11:21:52 148 2021, XXIV, 4 Finance 3.2 T ansi ion P obabili y Ma ix Now ha he MC is a ailable i is p oposed o ind he p obabili ies o he ansi ion be ween indi idual s a es. Be o e he calcula ion was pe o med MC il a ion was ca ied ou . This il e ing p ocedu e is mean o e eal he consecu i e iden ical s a es. By il a ion, we a e able o skip he s a es in which he s ock p ice s agna es ( espec i ely, hey change li le in he same end). These s a es a e no conside ed o be o in e es in e ms o ading. Fo illus a ion we show a pa o he s ing be o e il e ing: ... D4, G1, G1, G1, G2, D1, D1, D2, G2, D2, D2, … and a e il a ion ... D4, G1, G2, D1, D2, G2, D2, ... The ma ix o ansi ion p obabili ies P is de e mined o he il e ed MC. The pa ame e s k = 1.0 and l = 20 o he p esen ed ansi ion p obabili ies o bo h a ying model and un a ying model a e demons a ed in Tab. 2. These a e a e age condi ional ansi ion p obabili ies calcula ed acco ding o he o mula (5): (5) whe e ep esen s condi ional p obabili y o ansi ion be ween indi idual s a es. The ΣDi and ΣGi columns indica e he likelihood o s aying in he end o changing he end. The ni deno es he a e age numbe o occu ences o indi idual s a es is indica ed. F om he alues calcula ed in Tab. 2 we can obse e:  Fo bo h models, he p obabili y o end change in indi idual s a es is high enough, he un a ying model has a sligh ly highe p obabili y.  The alues calcula ed by us o he un a ying model a e almos iden ical o he alues in S oboda (2016), he inc ease in he ime window did no b ing abou changes in he beha iou o s ock p ices.  The anomaly can be no iced a he ansi ion om G4 o G3 in he a ying model, whe e ze o would be expec ed. The e has been a a e case whe e a mo ing s anda d de ia ion has isen su icien ly o be a ibu ed o a lowe Gi s a e despi e he ise in he s ock p ice. + 1 D4D3D2D1G1G2G3G4ΣDiΣGin D4 Un a ying 0 0 0 0 0.450 0.334 0.123 0.093 0 1 74.0 Va ying 0 0 0 0 0.538 0.312 0.138 0.012 0 1 112.7 D3 Un a ying 0.333 0 0 0 0.463 0.163 0.033 0.008 0.333 0.667 132.0 Va ying 0.356 0 0 0 0.431 0.180 0.030 0.004 0.356 0.644 185.0 D2 Un a ying 0.063 0.266 0 0 0.524 0.114 0.024 0.009 0.329 0.671 308.0 Va ying 0.093 0.269 0 0 0.430 0.178 0.026 0.004 0.362 0.638 381.7 D1 Un a ying 0.006 0.042 0.260 0 0.598 0.079 0.010 0.005 0.308 0.692 689.0 Va ying 0.013 0.074 0.297 0 0.452 0.137 0.022 0.005 0.384 0.616 602.0 G1 Un a ying 0.005 0.013 0.076 0.594 0 0.265 0.039 0.009 0.687 0.313 668.7 Va ying 0.005 0.029 0.122 0.451 0 0.303 0.077 0.012 0.608 0.392 576.7 G2 Un a ying 0.002 0.014 0.107 0.520 0 0 0.273 0.084 0.643 0.357 312.0 Va ying 0.001 0.023 0.151 0.435 0 0 0.282 0.109 0.610 0.390 392.3 G3 Un a ying 0.004 0.012 0.137 0.496 0 0 0 0.351 0.649 0.351 138.7 Va ying 0.002 0.025 0.168 0.402 0 0 0 0.404 0.596 0.404 200.3 G4 Un a ying 0.014 0.070 0.281 0.635 0 0 0 0 1.000 0.000 95.0 Va ying 0.000 0.046 0.293 0.658 0 0 0.002 0 0.998 0.002 136.7 Sou ce: own Tab. 2: T ansi ion p obabili ies o he model o k = 1.0, l = 20 s ock pij EM_4_2021.indd 148 3.12.2021 11:21:53 149 4, XXIV, 2021 Finance 3.3 T ading S a egies and Models In he ollowing pa , he e m ading s a egy iden i ies a se o ules ha de e mine he pu chase and sale o s ocks. The ading model includes se e al ading s a egies applied o selec ed s ocks. T ading s a egies a e based on he ollowing p inciple. Pu chasing signals a e g adually gene a ed by s a es D3, D4 and sales signals a e gene a ed by s a es G3, G4. By combining buying and selling s ock s a es, 4 ading s a egies a e ob ained: D3–G3, D3–G4, D4–G3, D4–G4. S a egies D3–G3 imply ha s a e D3 gene a es pu chase o de s (i we no longe hold s ocks) and s a e G3 gene a es a sales o de (i we hold s ocks). This is in line wi h he conclusions o he wo k S oboda (2016), whe e hese 4 ading s a egies gene a ed he highes e enues. T ading is always ca ied ou acco ding o he ollowing ules:  One ade ( ansac ion) ep esen s he pu chase and subsequen sale o a s ock.  I is no possible o make wo pu chases in a ow.  I a buying o a selling signal is gene a ed on a gi en day, he ade is execu ed wi h he opening p ice om he ollowing day.  The capi al is always ully in es ed, so i is heo e ically possible o buy pa s o he s ocks.  T ansac ion ees a e no aken in o conside a ion.  Di idends and o he income (he eina e e e ed o as di idends), i we a e en i led o hem, a e ein es ed a e ax.  A sho selling (specula ion on p ice dec ease) is no aken in o accoun . The alue o he in es ed capi al is calcula ed acco ding o he ollowing o mula (6): (6) whe e C0 = 1.00 s he ini ial alue o capi al (a uni o capi al is in es ed), Cn s he alue o capi al a e he n- h ansac ion, Si is he selling p ice in i- h ansac ion, di ep esen s he ne di idends (and o he income) in case ex di idend day occu ed du ing he i- h ansac ion, Bi is he pu chase p ice in he i- h ansac ion. I he ansac ion ees we e o be calcula ed i is su icien o modi y o mula (6) in o he ollowing o mula (7): (7) whe e p s ands o he size o he ee (in pe cen ). I would be e y isky o a ade o in es e e y hing in one selec ed s ock and use one ading s a egy. To minimize he isk, i is app op ia e o dis ibu e capi al e enly be ween he analysed s ocks and be ween indi idual ading s a egies. The e o e, indi idual ading s a egies will no be e alua ed as i is mo e signi ican o e alua e he en i e po olio o ading s a egies, which is called he ading model. The ading model includes ou ading s a egies, de ined on he same s a e space, which a e applied o h ee s ocks, i.e., he in es ed capi al is di ided in o 12 equal pa s. The e alua ion o he ading model is ep esen ed by CM and is o mally de e mined by o mula (8): whe e (8) Acco ding o EMH, ading in s ocks ollowing h ough wi h he abo e p inciples should no be success ul and he alue should no ou pe o m he ma ke . In o he wo ds, a passi e s ockholding should yield he same o a highe e u n. Passi e s ockholding can be e e ed o as a Buy and Hold (B&H) s a egy. We will conside a ading model success ul i i ou pe o ms he B&H s a egy. In his pape , he B&H s a egy en isages he ein es men o di idends. I is assumed ha in he beginning o 2006 s ocks we e pu chased and hen held un il he end o 2019. Fo he di idends paid, he s ocks a e pu chased a cu en p ices. By implemen ing he B&H s a egy, he esul ing alue o capi al o indi idual s ocks would be CCEZ = 1.35; CKB = 2.28; CO2 = 3.79 so ha he a e age alue o capi al is CB&H = 2.47. 4. Resea ch Resul s and Discussion In he i s place, he summa y esul s o indi idual models will be p esen ed and hen one o he models will be analysed in de ail. The summa y esul s a e lis ed in Tab. 3. Fo each model, he alue o CM capi al and he a e age numbe o ealized ades n a e gi en. A o al o 80 a ying s a e space models we e analysed. EM_4_2021.indd 149 3.12.2021 11:21:53 150 2021, XXIV, 4 Finance The pa ame e k g adually ook alues om 0.5 o 2.0 wi h he s ep o 0.1. The pa ame e l o he leng h o he sliding s anda d de ia ion ook alues om 10 o 30 wi h he s ep o 5. An un a ying model was also calcula ed o each alue o he pa ame e s. Resul s in Tab. 3 show ha on a e age o all pa ame e s k he e is no signi ican di e ence be ween he un a ying and a ying model. The a e age alue o capi al a ies in a na ow ange be ween 2.19 and 2.26. The bes esul s a e ob ained when he pa ame e o he model k is be ween 1.1 and 1.4. While he un a ying model has a maximum capi al alue o 2.67 (k = 1.4), he a ying models (excep l = 10) achie e highe alues: 3.04 (k = 1.1, l = 15), 2.93 (k = 1.2, l = 15), 2.83 (k = 1.2, l = 25), 3.37 (k = 1.1, l = 30). Va ying models combining he pa ame e s l = 15, l = 20, l = 25 and l = 30 wi h he pa ame e s k = 1.1 and k = 1.2 sligh ly ou pe o m he un a ying model and ou pe o med he passi e B&H s a egy (2.47). As expec ed, i is also e iden ha he numbe o execu ed ades dec eases wi h inc easing k pa ame e . This is impo an when calcula ing ading ees. The Tab. 3 shows he summa y esul s o he en i e 14-yea pe iod. Resul s may be skewed in one success ul pe iod, while in o he pe iods, ading models may no be success ul. In o de o be conside ed eliable, ading models should pe o m well o any gi en pe iod. The i e-yea sliding yields in Tab. 4 and i e-yea sliding annual yields in Tab. 5 a e calcula ed o he model wi h he pa ame e s k = 1.2 and l = 25. This model belongs o he g oup o models ha demons a ed he bes esul s. I has a e age esul s in his g oup. The leng h o i e yea s was chosen because he minimum ecommended in es men ho izon o in es ing in s ocks is i e yea s. In addi ion o he o al e u ns o he ading model, he e u ns o indi idual s ocks a e also moni o ed and compa ed wi h he e u ns o he B&H s a egy. kl = 10 l = 15 l = 20 l = 25 l = 30 Un a ying CMn CMn CMn CMn CMn CMn 0.50 1.46 200.0 1.50 187.5 1.34 185.5 1.54 180.4 1.70 180.5 1.72 141.8 0.60 1.66 179.4 1.83 168.0 1.85 166.0 1.99 164.7 2.01 162.8 2.24 122.3 0.70 2.05 155.4 2.19 152.1 1.98 145.5 1.96 143.3 2.21 142.5 2.30 105.5 0.80 2.02 134.3 2.32 129.4 2.28 128.0 2.18 123.5 1.84 119.8 2.11 86.3 0.90 2.10 115.1 2.50 111.1 2.27 108.7 2.32 106.9 2.09 104.7 2.38 74.3 1.00 2.31 98.5 2.32 93.4 2.73 92.7 2.18 91.4 2.04 88.3 2.56 63.0 1.10 2.54 83.8 3.04 81.0 2.80 78.3 2.51 75.8 3.37 75.6 2.63 51.9 1.20 2.63 69.7 2.71 68.3 2.93 65.5 2.83 63.9 2.91 63.9 2.56 43.8 1.30 2.67 61.1 2.37 56.7 2.54 54.7 2.42 54.2 2.22 53.1 2.40 36.6 1.40 2.47 52.0 2.23 47.6 2.51 47.4 2.27 46.1 2.29 44.9 2.67 31.5 1.50 2.51 43.3 1.95 37.8 2.18 39.5 2.19 38.8 2.05 38.4 2.36 26.0 1.60 2.31 36.8 2.09 33.8 2.22 34.1 2.04 33.0 2.00 32.7 2.22 22.8 1.70 2.16 31.3 2.31 30.1 2.39 29.5 2.47 28.7 1.88 28.2 1.81 19.8 1.80 2.20 26.4 2.17 25.2 2.29 25.1 2.30 23.8 2.35 25.1 1.83 17.6 1.90 2.15 23.3 1.79 20.2 2.00 20.1 2.10 21.2 2.12 21.1 1.96 16.0 2.00 1.99 19.7 1.70 16.8 1.82 16.6 2.01 18.0 2.64 18.0 1.98 14.8 Mean 2.20 83.1 2.19 78.7 2.26 77.3 2.21 75.8 2.23 75.0 2.23 54.6 S . de . 0.323 0.375 0.392 0.281 0.411 0.295 Sou ce: own Tab. 3: Final alue o capi al EM_4_2021.indd 150 3.12.2021 11:21:53