# Application of Markov Chain Techniques for Selecting Efficient Financial Stocks for Investment Portfolio Construction

Authors: Gabriel Kallah-Dagadu; Victor Apatu; Felix Okoe Mettle; Dennis Arku; Godwin Debrah
Journal: Journal of Applied Mathematics
 (2022)

---

## Abstract

In this paper, we apply Markov chain techniques to select the best financial stocks listed on the Ghana Stock Exchange based on the mean recurrent times and steady-state distribution for investment and portfolio construction. Weekly stock prices from Ghana Stock Exchange spanning January 2017 to December 2020 was used for the study. A three-state Markov chain was used to estimate the transition matrix, long-run probabilities, and mean recurrent times for stock price movements from one state to another. Generally, the results revealed that the long-run distribution of the stock prices showed that the constant state recorded the highest probabilities as compared to the point loss and point gain states. However, the results showed that the mean recurrent time to the point gain state ranges from three weeks to thirty-five weeks approximately. Finally, Standard Chartered Bank, GCB, Ecobank, and Cal Bank emerged as the top best performing stocks with respect to the mean recurrent times and steady-state distribution, and therefore, these equities should be considered when constructing asset portfolios for higher returns.


---

## Body

## 1. Introduction

Investing in the stock market is not gambling but requires an investor to determine whether stock prices will rise or fall over the investment horizon. Stock price forecasting has always been a challenging task in corporate finance research and academia. In most cases, investors sought to gain a deeper understanding and the historical performance of equities to make better investment decisions [1]. Many fund managers and investors are faced with the challenge of selecting efficient stocks for constructing investment portfolios. For instance, in portfolio construction and management, the initial step involves stock or fund selection based on their performance and grouping them into a stock fund known as a portfolio [2].Kaya and Karsligil’s study asserted that determining the stock price of any business goes beyond the financial position of the company and requires the flow of information about the company and the economic performance of the sector, as well as the country in which the company is located. As a result, stock price forecasting has become more challenging than it was before [3]. There is no straightforward equation that can locate the correct resource allocation for each person. In any case, the agreement among most financial managers is that the allocation of resources is efficient and yields good returns. Therefore, predicting stock prices or stock market returns remains a critical and complex issue in financial and investment analysis. In addition, the agreement among most financial managers is that the allocation of resources is efficient and yields a good return [4].Usually, the portfolio manager typically uses two types of strategies to pick securities or funds. These are quantitative and qualitative appraisals of an asset before its selection. The quantitative method of stock or asset picking for portfolio construction uses quantitative metrics to assess the performance of an asset before its approval into the portfolio. However, the qualitative approach on the one hand requires investigation of the management of the company/funds, which is important to understand a significant part of the results. Unfortunately, this technique takes time to investigate all the mechanisms of asset management, and they often remain elusive.Several researchers over the years [1, 5–7] have developed various methodologies for predicting future share market prices using either deterministic statistical approach or stochastic approach. However, there are little studies on the use of stochastic approach in stock selection under the Ghana stock market/exchange. The inherent goal of this paper is to apply Markov chain techniques to select stocks based on their mean recurrent times and steady states for investment consideration.To analyse and predict the stock market behaviour, the Markov chain model has been employed by several researchers in different times. The following studies indicate the pertinence of the Markov chain model in predicting the movement stocks. Choji et al. [8] applied the Markov chain model to predict the possible states in demonstrating the performance of the two best banks, namely, Guarantee Trust Bank of Nigeria and First bank of Nigeria. Their study employed six-year data spanning 2005 to 2010. They used transition probability matrix and probability vector to obtain the long-run prediction of the share price of these banks whether appreciate, depreciate, or remain unchanged irrespective of current share price of the banks. D. Zhang and X. Zhang [9] applied a Markov chain model to forecast the stock market trend in China. Their study discovered that the Markov chain has no after-effect, and the model is more suitable to analyse and predict the stock market index, and closing stock prices are more effective under the market mechanism. The study recommended that the result obtain from the Markov chain model for prediction should be combined with other factors having significant influence in stock market variations and the method should be used as a basis for decision making.Otieno et al. [10] used the Markov chain model to forecast stock market trends of Safaricom share in Nairobi Securities Exchange in Kenya. Their study estimated the probability transition matrix and initial state vector to predict the Safaricom share prices using the dataset spanning April 1, 2008, to April 30, 2012. Their study revealed that the memory less property and random walk capability of the Markov chain model facilitated the best fit to the data and predicted good trends of the share prices. Mettle et al. [1] used the Markov chain model with finite states to analyse the share price changes for five different randomly selected equities on the Ghana Stock Exchange. Their study concluded that the application of the Markov chain model as a stochastic analysis method in equity price studies improves the portfolio decisions. They have suggested that the Markov chain model can be applied as a tool for improving the stock trading decisions. Application of this method in stock analysis improves both the investor knowledge and chances of higher returns.Bhusal [11] applied a Markov chain model to forecast the behaviour of Nepal Stock Exchange (NEPSE) index. The study explored the long-run behaviour of the NEPSE index and the expected number of visits to a particular state and determined the expected first return time of various states. The NEPSE index of 2741 trading days ranging from August 15, 2007, to June 18, 2017, was used. The study showed that regardless of the present status of the NEPSE index, in the long run, the index will increase with a probability of 0.3855, remain in the same state with probability 0.1707, and decrease with a probability of 0.4436. It revealed that the index will remain in increasing state after three days when it starts to move from the increasing state. The study concluded that the movement of stock index to the various states in a particular trading day is independent with the index of initial trading days but depends only on the index of the most recent day.


## 2. Materials and Methods

The data used for this paper consists of time series data of weekly price changes of the equities listed on the Ghana Stock Exchange (GSE). The daily price changes of these equities are transformed into weekly price changes. The data spanned January 2017 to December 2020. It is assumed that the number of working days in a week was used to compute the average price change. The remaining part of the section discusses the Markov Chain techniques for modelling the dynamics of stock prices.Stochastic processes can be characterized into several types depending upon the state space, index parameter, and the dependence relations among the random variables through the specification of the joint distribution function. Among these processes, Markov chain is a special type of random process that has the property that the occurrence of any event in the future depends only in the present state. The set of values taken by the Markov process is known as state space. A Markov process having discrete state space is termed as Markov chain. The fundamental difference between the Markov chain model and other statistical methods of projection such as regression model and time series analysis is that the Markov model does not need any mutual laws among the factors from complex predictor; it only requires the characteristic of the development on the history of event (i.e., initial probability) to estimate the transition probability for different possible states at various times to come.Using the Markov chain model makes it is easier to predict the possibility of state value in a certain period after knowing the initial probability distribution and transition probability matrix. The Markov chain model has been extensively applied in predicting stock prices or index for a group of stock as well as for a single stock [9, 11].


### 2.1. The Markov Chain Model

Markov chains represent the probabilistic movements of certain variables over time. They are widely applicable across a wide range of disciplines. A Markov chain is a stochastic process that satisfies the Markov property or has the memoryless rule that argues that once the present is known, the past and future are unrelated. This means that if one knows the process’s current state, no additional information about its previous states is required to make the best possible prediction for its future. This simplicity allows for a significant reduction in the number of parameters to be estimated in such a process. Mathematically, a Markov Chain model can be expressed as follows.Let “S” be a discrete set; a Markov Chain is a sequence of random variables: X0,X1,X2,⋯,Xn taking values in the set S with the property (Markov property) such that
(1)PXn+1=j∣X0=x0,X1=x1,⋯,Xn−1=xn−1,Xn=i=PXn+1=j∣Xn=i,where x0,x1,⋯,xn−1,i,j∈S and ∀n≥0. The set S represents the Markov Chain’s state space.There are two representations of Markov chains: discrete-time Markov chain and continuous-time Markov chain, and this paper employed discrete-time Markov chains. The price change of an asset, where the change is registered as the difference between the previous end of week price and the current end of week price, is a good example of a discrete-time Markov chain. In discrete time, the value of the Markov chain is known as the state, and in this case, the state corresponds to the price change. A continuous-time Markov chain can change at any point in time. This can be explained using events occurring with continuous time lag “steps” in their appearance. Markov chains are techniques used to compute the probabilities of events occurring in states transitioning into other states or back into the same state. Individual probabilities, known as transition probabilities, can be organized into states and studied using transition matrices. These special matrices with their transition diagrams are used to demonstrate the movement between or among states.


### 2.2. Transition Matrices

A transition matrix or stochastic matrix is a square matrixP with probabilities given by
(2)P=p11p12p21p22⋯p1np2n⋮⋱⋮pn1pn2⋯pnn,which satisfies the following axioms:
(I)
pij≥0,∀i,j(II)
For each row,∑j=1npij=1,where0≤pij≤1Based on the transition matrix in Equation (2), a three-state transition matrix diagram can be represented as follows in Figure 1.Figure 1
Illustration of a three-state transition matrix diagram or graph.


#### 2.2.1. Long-Run Distribution for a Markov Chain

IfP is the stochastic matrix which is aperiodic, irreducible, and finite state Markov chain (ergodic Markov chain), then
(3)limn⟶∞Pn=π=a,a,a,⋯,aT,where a=a1,a2,⋯,an, with 0≤ai≤1 and ∑i=1nai=1.


#### 2.2.2. Recurrent Property

Consider a state that is arbitrary but fixed,i, and define an integer n≥1; then,
(4)fiin=Xn=i,Xj≠i,j=1,2,⋯,n−1X0=i.It implies thatfiin is the likelihood that the first return to state i, from state i, happens at the nth transition. However, given that fii1=pii, then the mean recurrent time Piin may be computed as
(5)Piin=∑k=0nfiikPiin−k,n≥1.


### 2.3. Model Specification

LetYt represent the equity price at time t, where t=0,1,2,⋯,n (where t is measured in weekly time intervals). Furthermore, we define Rt=Yt1−t0, as the change in equity price at time t. Taking each closing week’s price as a discrete time unit and letting the random variable Xt represent the state of equity closing price at time t, a vector spanned by 0, 1, and 2, where
(6)Xt=0,ifdt<0,decreaseinequitypricefromtimet−1tot,1,ifdt=0,nochangeinequitypricefromtimet−1tot,2,ifdt>0,increaseinequitypricefromtimet−1tot.Here, the values 0, 1, and 2 denote the states of the transition matrix.Now, let us define an indicator random variableIi,t as
(7)Ii,t=1,ifXt=i0,ifXt≠ifori=0,1,2,andt=1,2,⋯,n.Then, the result ofXt will be given as
(8)ni=∑t=0nIi,t,∀i,where n=∑i=02ni and ni is the number of equity prices for state i.The estimates of the initial probabilities for that the equity prices for decrease, unchanged/constant, and increase states are obtained as follows:(9)p^0=n0n,p^1=n1n,p^2=n2n,where n0 is the number of times the equity remains decreased over the period, n1 is the number of times the equity remains unchanged, and n2 is the number of times the equity increased over the study period. Now, for the stochastic process Xt obtained in Equation (6) for t=1,2,⋯,n, the estimated probabilities can be obtained as follows: p^ij=PXt=j∣Xt−1=i, for i,j=0,1,2 (in this paper) and defining the indicator function, δti,j, as
(10)δti,j=1,ifXt=iandXt+1=j,0,otherwise,where t=1,2,⋯,n−1 and i,j=0,1,2 are the number of states in the Markov chain, and the number of times nij, whenXt=i and Xt+1=j, is given as
(11)nij=∑t=1n−1δti,j,fori,j=0,1,2andni=∑j=02nij.The estimated transition matrixP^ of Equation (2), with respect to this paper is of the form
(12)P^=p^00p^01p^02p^10p^11p^12p^20p^21p^22,where p^ij=nij/ni, for i,j=0,1,2, is the probability of an equity price at state i at time, t, will move to state j at time t+1.This paper employed a Markov chain technique to analyse the average price fluctuation behaviour of the stocks which are grouped into the three states:S=pointloss,constant,pointgain. The selecting of stocks of the financial sector on the GSE would be based on the limiting distribution or the long-run transitional probabilities and the recurrent times from point loss to point gain state.


## 2.1. The Markov Chain Model

Markov chains represent the probabilistic movements of certain variables over time. They are widely applicable across a wide range of disciplines. A Markov chain is a stochastic process that satisfies the Markov property or has the memoryless rule that argues that once the present is known, the past and future are unrelated. This means that if one knows the process’s current state, no additional information about its previous states is required to make the best possible prediction for its future. This simplicity allows for a significant reduction in the number of parameters to be estimated in such a process. Mathematically, a Markov Chain model can be expressed as follows.Let “S” be a discrete set; a Markov Chain is a sequence of random variables: X0,X1,X2,⋯,Xn taking values in the set S with the property (Markov property) such that
(1)PXn+1=j∣X0=x0,X1=x1,⋯,Xn−1=xn−1,Xn=i=PXn+1=j∣Xn=i,where x0,x1,⋯,xn−1,i,j∈S and ∀n≥0. The set S represents the Markov Chain’s state space.There are two representations of Markov chains: discrete-time Markov chain and continuous-time Markov chain, and this paper employed discrete-time Markov chains. The price change of an asset, where the change is registered as the difference between the previous end of week price and the current end of week price, is a good example of a discrete-time Markov chain. In discrete time, the value of the Markov chain is known as the state, and in this case, the state corresponds to the price change. A continuous-time Markov chain can change at any point in time. This can be explained using events occurring with continuous time lag “steps” in their appearance. Markov chains are techniques used to compute the probabilities of events occurring in states transitioning into other states or back into the same state. Individual probabilities, known as transition probabilities, can be organized into states and studied using transition matrices. These special matrices with their transition diagrams are used to demonstrate the movement between or among states.


## 2.2. Transition Matrices

A transition matrix or stochastic matrix is a square matrixP with probabilities given by
(2)P=p11p12p21p22⋯p1np2n⋮⋱⋮pn1pn2⋯pnn,which satisfies the following axioms:
(I)
pij≥0,∀i,j(II)
For each row,∑j=1npij=1,where0≤pij≤1Based on the transition matrix in Equation (2), a three-state transition matrix diagram can be represented as follows in Figure 1.Figure 1
Illustration of a three-state transition matrix diagram or graph.


### 2.2.1. Long-Run Distribution for a Markov Chain

IfP is the stochastic matrix which is aperiodic, irreducible, and finite state Markov chain (ergodic Markov chain), then
(3)limn⟶∞Pn=π=a,a,a,⋯,aT,where a=a1,a2,⋯,an, with 0≤ai≤1 and ∑i=1nai=1.


### 2.2.2. Recurrent Property

Consider a state that is arbitrary but fixed,i, and define an integer n≥1; then,
(4)fiin=Xn=i,Xj≠i,j=1,2,⋯,n−1X0=i.It implies thatfiin is the likelihood that the first return to state i, from state i, happens at the nth transition. However, given that fii1=pii, then the mean recurrent time Piin may be computed as
(5)Piin=∑k=0nfiikPiin−k,n≥1.


## 2.2.1. Long-Run Distribution for a Markov Chain

IfP is the stochastic matrix which is aperiodic, irreducible, and finite state Markov chain (ergodic Markov chain), then
(3)limn⟶∞Pn=π=a,a,a,⋯,aT,where a=a1,a2,⋯,an, with 0≤ai≤1 and ∑i=1nai=1.


## 2.2.2. Recurrent Property

Consider a state that is arbitrary but fixed,i, and define an integer n≥1; then,
(4)fiin=Xn=i,Xj≠i,j=1,2,⋯,n−1X0=i.It implies thatfiin is the likelihood that the first return to state i, from state i, happens at the nth transition. However, given that fii1=pii, then the mean recurrent time Piin may be computed as
(5)Piin=∑k=0nfiikPiin−k,n≥1.


## 2.3. Model Specification

LetYt represent the equity price at time t, where t=0,1,2,⋯,n (where t is measured in weekly time intervals). Furthermore, we define Rt=Yt1−t0, as the change in equity price at time t. Taking each closing week’s price as a discrete time unit and letting the random variable Xt represent the state of equity closing price at time t, a vector spanned by 0, 1, and 2, where
(6)Xt=0,ifdt<0,decreaseinequitypricefromtimet−1tot,1,ifdt=0,nochangeinequitypricefromtimet−1tot,2,ifdt>0,increaseinequitypricefromtimet−1tot.Here, the values 0, 1, and 2 denote the states of the transition matrix.Now, let us define an indicator random variableIi,t as
(7)Ii,t=1,ifXt=i0,ifXt≠ifori=0,1,2,andt=1,2,⋯,n.Then, the result ofXt will be given as
(8)ni=∑t=0nIi,t,∀i,where n=∑i=02ni and ni is the number of equity prices for state i.The estimates of the initial probabilities for that the equity prices for decrease, unchanged/constant, and increase states are obtained as follows:(9)p^0=n0n,p^1=n1n,p^2=n2n,where n0 is the number of times the equity remains decreased over the period, n1 is the number of times the equity remains unchanged, and n2 is the number of times the equity increased over the study period. Now, for the stochastic process Xt obtained in Equation (6) for t=1,2,⋯,n, the estimated probabilities can be obtained as follows: p^ij=PXt=j∣Xt−1=i, for i,j=0,1,2 (in this paper) and defining the indicator function, δti,j, as
(10)δti,j=1,ifXt=iandXt+1=j,0,otherwise,where t=1,2,⋯,n−1 and i,j=0,1,2 are the number of states in the Markov chain, and the number of times nij, whenXt=i and Xt+1=j, is given as
(11)nij=∑t=1n−1δti,j,fori,j=0,1,2andni=∑j=02nij.The estimated transition matrixP^ of Equation (2), with respect to this paper is of the form
(12)P^=p^00p^01p^02p^10p^11p^12p^20p^21p^22,where p^ij=nij/ni, for i,j=0,1,2, is the probability of an equity price at state i at time, t, will move to state j at time t+1.This paper employed a Markov chain technique to analyse the average price fluctuation behaviour of the stocks which are grouped into the three states:S=pointloss,constant,pointgain. The selecting of stocks of the financial sector on the GSE would be based on the limiting distribution or the long-run transitional probabilities and the recurrent times from point loss to point gain state.


## 3. Results and Discussions

The results and discussions of using the Markov chain techniques to select stocks based on their mean recurrent times and steady-state distribution for investment considerations are presented. The transition probabilities from one state to the other were obtained using 209 transitions of the dataset. The paper considered twelve stocks from the financial sector of the Ghana Stock Exchange (GSE). These stocks are Access Bank Ghana Plc (Access), Agric Development Bank (ADB), Cal Bank (Cal), Ecobank Ghana (EGH), Ecobank Transnational Inc. (ETI), Enterprise Group Ltd. (EGL), GCB Bank Ltd. Plc (GCB), Republic Bank Ghana Ltd. (RBG), SIC Insurance Company Ltd. (SIC), Societe Generale GH (SG-GH), Standard Chartered Bank (SCB), and Trust Bank Gambia Ltd. (TGB). The descriptive statistics involving the mean, standard deviation, minimum, and maximum for these stocks are presented in Table1.Table 1
Summary statistics for the number of weekly price averages and stock transition change.
EquitiesPoint lossConstantPoint gainMeanStdMaxMinAccess33143330.0010.0470.374-0.12ADB220160.0010.0220.194-0.178Cal7769630.0000.0120.053-0.048EGH7266710.0020.0770.35-0.27ETI57107450.0000.0020.008-0.008EGL778844-0.0010.0310.218-0.125GCB6766760.0000.0480.193-0.325RBG36144290.0000.0140.16-0.036SIC45133310.0000.0030.034-0.01SG-GH55100540.0000.0120.063-0.058SCB7161770.0100.2121.1-0.72TBG13180160.0000.0040.028-0.02It is observed that Standard Chartered Bank (SCB) stock recorded the maximum weekly return over the period, and it was followed by Access, EGH, EGL ADB, GCB, RBG, SG-GH, CAL Bank, TBG, and ETI in a descending order of magnitude of returns. In terms of the minimum values, SCB has the least minimum value followed by GCB, EGH, ADB, EGL, Access, SG-GH, Cal, RBG, TBG, SIC, and ETI. In terms of the variability (i.e., standard deviation), SCB recorded the greatest variability as compared to the other equities, making it a riskier stock. Table2 presents the statistics for the initial market condition, steady-state distribution, and the mean recurrent times of the twelve equities considered. The three states employed in this study are loss, constant, and gain. The initial market condition represents the probabilities of equities in each state at the beginning, and for each equity, the three-state probabilities sum up to one. However, the steady-state distribution of the states described the long-run probabilities for the equities at the three states. It is generally observed that both the probabilities of the initial market condition and the steady-state distribution presented the same pattern with the constant state recording the highest probabilities for almost all the stocks. The mean recurrent times present the movement of the weekly equity prices from one state to another. It is observed that moving from state 0 to state 1 records the highest mean recurrent times and was followed by state 1 back to state 1.Table 2
Summary statistics for initial market condition, steady-state distributions, and mean recurrent times.
Initial market conditionSteady state distributionMean recurrent timesEquitiesLossConstantGainLossConstantGainU00U01U10U11Access0.1580.6840.1580.1530.6910.1561.1926.8801.3206.212ADB0.0100.9620.0290.0050.9660.0291.03067.6672.00034.833Cal0.3680.3300.3010.3620.3430.2951.4343.7181.6153.302EGH0.3440.3160.3400.3390.3220.3391.5073.7301.8922.971ETI0.2730.5120.2150.2580.5160.2261.2934.9091.4384.415EGL0.3680.4210.2110.3620.4280.2101.2468.3502.0505.073GCB0.3210.3160.3640.3130.3150.3721.5764.5522.6212.737RBG0.1720.6890.1390.1660.6800.1541.17510.4121.8246.710SIC0.2150.6360.1480.2090.6430.1481.1758.0451.8246.710SG-GH0.2630.4780.2580.2510.4830.2661.3546.3332.2403.827SCB0.3400.2920.3680.3330.2900.3771.5984.8892.9232.673TBG0.0620.8610.0770.0570.8670.0761.07814.9231.16713.791


### 3.1. The Behaviour of Equities

This subsection presents three-state Markov chain transition matrices illustrating the behaviours of the equities listed on the Ghana Stock Exchange. The states are loss (represents number of times a decrease is observed from the current price), constant (represents number of times no change is observed from the current price), and gain (represents number of times an increase is observed from the current price). The transition matrices were estimated based on 209 transitions obtained from weekly price averages spanning four years (January 2017 to December 2020).Figure2 depicts the transition matrix and diagram for Access Bank Plc equity. The transition matrix showed that the Access stock has an average of 18.2% chance of staying in a point loss state, 45.5% chance of switching from point loss state to a constant state, and 36.4% chance of switching from point loss state to point gain state.Figure 2
Access Bank Plc transition matrix and diagram.However, market trends at a constant state showed no change in prices. The Access stock recorded an average of 14% chance of moving from a constant state to point loss state, 76.9% likelihood of remaining at the constant, and 9.1% chance of switching from constant state to point gain state. It is observed that the movement from the point gain state to the other states is not different. Furthermore, there is 18.2% chance of switching from point gain state to point loss state, 57.6% chance of switching to constant state, and 24.2% chance of maintaining the point gain state in the preceding cycle are recorded. It is observed that Access stock showed a high probability of remaining at a constant state or switch to a constant state from loss and gain states with a greater probability as confirmed by the steady-state distribution (Table2).The mean recurrent times of Access stock displayed in Table2 showed that on average, the weekly time for the share price to revisit point gain state while in point gain (U11) is 6.212 and average weekly time for the stock price to revisit point gain state while in point loss or constant state (U01) is 6.88. This means that the prices of Access stock have an average of six weeks approximately to revisit point gain state while in point gain, whereas it would take approximately seven weeks to revisit point gain state while in point loss or constant state.Figure3 presents the behaviour of ADB stock prices using the transition matrix and diagram. It is observed from the ADB transition matrix that there is zero probability of staying in the point loss state or losing further points but had almost sure chance of switching from point loss state to a constant state. Furthermore, the ADB stock recorded 0.98 probability of returning to a constant state in the next cycle and 0.015 probability of switching from a constant state to point gain state in the next cycle. However, weekly prices of ADB stock at point gain state have 50 percent chance of returning to the point gain state and 50 percent chance of switching to the constant state. This implies that stock prices on the increase have 50 percent chances of increasing in the following cycle or week and 50 percent chance of being constant in the next cycle but zero probability of decreasing to a lower price than the current stock in the next cycle.Figure 3
ADB equity transition matrix and diagram.The steady-state distribution for the ADB stock displayed in Table2 shows that in the long run, ADB share prices have 0.5% of decreasing in price, 96.6% of the price remaining constant, and 2.9% of the price increasing. In addition, the mean recurrent times of ADB (Table 2) showed that the stock prices have an average of 35 weeks to revisit point gain state while in point gain, whereas it takes the price of the equity approximately 68 weeks to revisit point gain state while in point loss or constant state. The movements of the weekly prices of the Cal Bank stock on the GSE are not different from those of the Access bank stock presented in Figure 2. The transition matrix and diagram for the Cal Bank equity are presented in Figure 4. It is observed that on average, Cal stock price has 46.8 percent chance of returning to point loss state or continual decreasing in stock price. However, Cal stock price has 24.7 percent chance of switching from point loss state to a constant state and 28.6 percent chance of switching from point loss state to point gain state.Figure 4
Cal Bank equity transition matrix and diagram.Furthermore, there was 0.507 probability of returning to the constant state and 0.261 and 0.232 probabilities for Cal Bank stock price switching from constant state to loss state or gain state, respectively. It is interesting to note that the Cal Bank stock has 0.381 likelihood of returning to the point gain state and lesser chances of switching from point gain state to constant state or point loss state.The long-run distribution of Cal Bank stock prices affirmed that weekly prices of equity are more likely to decrease than been constant or increasing (Table2). Furthermore, the mean recurrent times of Cal Bank stock weekly prices have an average of approximately three weeks to revisit point gain state while on the increase, whereas it would take approximately four weeks to revisit point gain state when in loss or constant states (Table 2). Furthermore, the behaviour and movements of the remaining nine stocks (EGH, ETI, EGL, GCB, RBG, SIC, SG-GH, SCB, and TGB) are not completely different from the movements of Access bank and Cal Bank stocks. However, the differences observed are the magnitude of the transition probabilities for their movements from one state to another (Figures 5–13). Furthermore, there are similar long-run distribution of their stock prices and similar mean recurrent times as displayed in Table 2 for the remaining nine stocks. For instance, Ecobank weekly stock prices have an average of three weeks to revisit point gain state while increasing and approximately 4 weeks to revisit point gain state while been on the decreasing or constant prices.Figure 5
Ecobank equity transition matrix and diagram.Figure 6
Ecobank Transnational Inc. equity transition matrix and diagram.Figure 7
Enterprise Group Ltd. equity transition matrix and diagram.Figure 8
GCB Bank Plc equity transition matrix and diagram.Figure 9
Republic Bank Plc equity transition matrix and diagram.Figure 10
SIC Insurance Company equity transition matrix and diagram.Figure 11
Societe Generale Ghana Ltd. equity transition matrix and diagram.Figure 12
Standard Chartered Bank equity transition matrix and diagram.Figure 13
Trust Bank Gambia Ltd. equity transition matrix and diagram.The statistical analysis of the Markov chain model for fitting equities is displayed in Table3. The chi-square test for goodness of fit was used to test the null hypothesis that the steady-state probabilities are stable and consistent. It is observed from Table 3 that all the 12 equities’ chi-square tests recorded p values greater than 5 percent level of significance. This implies that the steady-state probabilities of the three states for all the equities are stable and consistent. It can therefore be concluded that the Markov chain model employed produces a good fit to the data.Table 3
Chi-square test for goodness of fit for the Markov chain model.
EquityTest statisticsdfp valueAccess0.05120.975ADB0.87720.645CAL0.15420.926EGH0.04420.978ETI0.28820.866EGL0.04820.976GCB0.07820.962RBG0.38920.823SIC0.05420.973SG-GH0.17820.915SCB0.07220.965TBG0.10820.947Table4 depicts the overall average rating of assets under the financial sector based on the following metrics on mean recurrent times. It is observed that Standard Chartered Bank (SCB) emerged as the best stock or equity in terms of U11 since SCB stock has the lowest mean recurrent time to state of point gain while in point gain state. This means it takes SCB the shortest number of weeks among its peers for its share prices to increase. In addition, the next stocks with the minimum number of weeks in ascending order are as follows: GCB, Ecobank Ghana (EGH), Cal Bank, Societe Generale GH (SG-GH), Ecobank Transnational Inc. (ETI), Enterprise Group Ltd. (EGL), Access Bank Ghana Plc, Republic Bank Ghana Ltd. (RBG), SIC Insurance Company Ltd., Trust Bank Gambia Ltd. (TGB), and ADB (Table 3).Table 4
The rankings of the equities based on their mean recurrent times and steady state.
EquitiesU00U01U10U11Steady stateAverage rankingOverall rankingAccess1.1926.8801.3206.2120.1568.48thADB1.03067.6672.00034.8330.02910.612thCal1.4343.7181.6153.3020.2954.24thEGH1.5073.7301.8922.9710.3393.43rdETI1.2934.9091.4384.4150.2266.46thEGL1.2468.3502.0505.0730.2106.87thGCB1.5764.5522.6212.7370.3722.22ndRBG1.17510.4121.8246.7100.1548.99thSIC1.1758.0451.8246.7100.1489.310thSG-GH1.3546.3332.2403.8270.2664.85thSCB1.5984.8892.9232.6730.3771.61stTBG1.07814.9231.16713.7910.07611.211thAdditionally, considering the steady-state time with respect to the point gain state, it was observed that SCB stock recorded the highest chance of gaining points or increasing in stock price weekly and adjudging it as the best performing stock. It was followed by GCB, Ecobank GH, Cal Bank, SG-GH, ETI, EGL, Access Bank Plc, RBG, SIC, Trust Bank Gambia Ltd., and ADB. Finally, the overall rating and ranking of these stocks with regard to the metrics (U00, U01, U10, U11, and steady-state point gain) show that the SCB stock emerged as the best performing stock and followed by GCB, Ecobank, Cal Bank, SG-GH, ETI, and Trust Bank Gambia Ltd. being 11th position and ADB being observed as the worse performing stock (12th position).


## 3.1. The Behaviour of Equities

This subsection presents three-state Markov chain transition matrices illustrating the behaviours of the equities listed on the Ghana Stock Exchange. The states are loss (represents number of times a decrease is observed from the current price), constant (represents number of times no change is observed from the current price), and gain (represents number of times an increase is observed from the current price). The transition matrices were estimated based on 209 transitions obtained from weekly price averages spanning four years (January 2017 to December 2020).Figure2 depicts the transition matrix and diagram for Access Bank Plc equity. The transition matrix showed that the Access stock has an average of 18.2% chance of staying in a point loss state, 45.5% chance of switching from point loss state to a constant state, and 36.4% chance of switching from point loss state to point gain state.Figure 2
Access Bank Plc transition matrix and diagram.However, market trends at a constant state showed no change in prices. The Access stock recorded an average of 14% chance of moving from a constant state to point loss state, 76.9% likelihood of remaining at the constant, and 9.1% chance of switching from constant state to point gain state. It is observed that the movement from the point gain state to the other states is not different. Furthermore, there is 18.2% chance of switching from point gain state to point loss state, 57.6% chance of switching to constant state, and 24.2% chance of maintaining the point gain state in the preceding cycle are recorded. It is observed that Access stock showed a high probability of remaining at a constant state or switch to a constant state from loss and gain states with a greater probability as confirmed by the steady-state distribution (Table2).The mean recurrent times of Access stock displayed in Table2 showed that on average, the weekly time for the share price to revisit point gain state while in point gain (U11) is 6.212 and average weekly time for the stock price to revisit point gain state while in point loss or constant state (U01) is 6.88. This means that the prices of Access stock have an average of six weeks approximately to revisit point gain state while in point gain, whereas it would take approximately seven weeks to revisit point gain state while in point loss or constant state.Figure3 presents the behaviour of ADB stock prices using the transition matrix and diagram. It is observed from the ADB transition matrix that there is zero probability of staying in the point loss state or losing further points but had almost sure chance of switching from point loss state to a constant state. Furthermore, the ADB stock recorded 0.98 probability of returning to a constant state in the next cycle and 0.015 probability of switching from a constant state to point gain state in the next cycle. However, weekly prices of ADB stock at point gain state have 50 percent chance of returning to the point gain state and 50 percent chance of switching to the constant state. This implies that stock prices on the increase have 50 percent chances of increasing in the following cycle or week and 50 percent chance of being constant in the next cycle but zero probability of decreasing to a lower price than the current stock in the next cycle.Figure 3
ADB equity transition matrix and diagram.The steady-state distribution for the ADB stock displayed in Table2 shows that in the long run, ADB share prices have 0.5% of decreasing in price, 96.6% of the price remaining constant, and 2.9% of the price increasing. In addition, the mean recurrent times of ADB (Table 2) showed that the stock prices have an average of 35 weeks to revisit point gain state while in point gain, whereas it takes the price of the equity approximately 68 weeks to revisit point gain state while in point loss or constant state. The movements of the weekly prices of the Cal Bank stock on the GSE are not different from those of the Access bank stock presented in Figure 2. The transition matrix and diagram for the Cal Bank equity are presented in Figure 4. It is observed that on average, Cal stock price has 46.8 percent chance of returning to point loss state or continual decreasing in stock price. However, Cal stock price has 24.7 percent chance of switching from point loss state to a constant state and 28.6 percent chance of switching from point loss state to point gain state.Figure 4
Cal Bank equity transition matrix and diagram.Furthermore, there was 0.507 probability of returning to the constant state and 0.261 and 0.232 probabilities for Cal Bank stock price switching from constant state to loss state or gain state, respectively. It is interesting to note that the Cal Bank stock has 0.381 likelihood of returning to the point gain state and lesser chances of switching from point gain state to constant state or point loss state.The long-run distribution of Cal Bank stock prices affirmed that weekly prices of equity are more likely to decrease than been constant or increasing (Table2). Furthermore, the mean recurrent times of Cal Bank stock weekly prices have an average of approximately three weeks to revisit point gain state while on the increase, whereas it would take approximately four weeks to revisit point gain state when in loss or constant states (Table 2). Furthermore, the behaviour and movements of the remaining nine stocks (EGH, ETI, EGL, GCB, RBG, SIC, SG-GH, SCB, and TGB) are not completely different from the movements of Access bank and Cal Bank stocks. However, the differences observed are the magnitude of the transition probabilities for their movements from one state to another (Figures 5–13). Furthermore, there are similar long-run distribution of their stock prices and similar mean recurrent times as displayed in Table 2 for the remaining nine stocks. For instance, Ecobank weekly stock prices have an average of three weeks to revisit point gain state while increasing and approximately 4 weeks to revisit point gain state while been on the decreasing or constant prices.Figure 5
Ecobank equity transition matrix and diagram.Figure 6
Ecobank Transnational Inc. equity transition matrix and diagram.Figure 7
Enterprise Group Ltd. equity transition matrix and diagram.Figure 8
GCB Bank Plc equity transition matrix and diagram.Figure 9
Republic Bank Plc equity transition matrix and diagram.Figure 10
SIC Insurance Company equity transition matrix and diagram.Figure 11
Societe Generale Ghana Ltd. equity transition matrix and diagram.Figure 12
Standard Chartered Bank equity transition matrix and diagram.Figure 13
Trust Bank Gambia Ltd. equity transition matrix and diagram.The statistical analysis of the Markov chain model for fitting equities is displayed in Table3. The chi-square test for goodness of fit was used to test the null hypothesis that the steady-state probabilities are stable and consistent. It is observed from Table 3 that all the 12 equities’ chi-square tests recorded p values greater than 5 percent level of significance. This implies that the steady-state probabilities of the three states for all the equities are stable and consistent. It can therefore be concluded that the Markov chain model employed produces a good fit to the data.Table 3
Chi-square test for goodness of fit for the Markov chain model.
EquityTest statisticsdfp valueAccess0.05120.975ADB0.87720.645CAL0.15420.926EGH0.04420.978ETI0.28820.866EGL0.04820.976GCB0.07820.962RBG0.38920.823SIC0.05420.973SG-GH0.17820.915SCB0.07220.965TBG0.10820.947Table4 depicts the overall average rating of assets under the financial sector based on the following metrics on mean recurrent times. It is observed that Standard Chartered Bank (SCB) emerged as the best stock or equity in terms of U11 since SCB stock has the lowest mean recurrent time to state of point gain while in point gain state. This means it takes SCB the shortest number of weeks among its peers for its share prices to increase. In addition, the next stocks with the minimum number of weeks in ascending order are as follows: GCB, Ecobank Ghana (EGH), Cal Bank, Societe Generale GH (SG-GH), Ecobank Transnational Inc. (ETI), Enterprise Group Ltd. (EGL), Access Bank Ghana Plc, Republic Bank Ghana Ltd. (RBG), SIC Insurance Company Ltd., Trust Bank Gambia Ltd. (TGB), and ADB (Table 3).Table 4
The rankings of the equities based on their mean recurrent times and steady state.
EquitiesU00U01U10U11Steady stateAverage rankingOverall rankingAccess1.1926.8801.3206.2120.1568.48thADB1.03067.6672.00034.8330.02910.612thCal1.4343.7181.6153.3020.2954.24thEGH1.5073.7301.8922.9710.3393.43rdETI1.2934.9091.4384.4150.2266.46thEGL1.2468.3502.0505.0730.2106.87thGCB1.5764.5522.6212.7370.3722.22ndRBG1.17510.4121.8246.7100.1548.99thSIC1.1758.0451.8246.7100.1489.310thSG-GH1.3546.3332.2403.8270.2664.85thSCB1.5984.8892.9232.6730.3771.61stTBG1.07814.9231.16713.7910.07611.211thAdditionally, considering the steady-state time with respect to the point gain state, it was observed that SCB stock recorded the highest chance of gaining points or increasing in stock price weekly and adjudging it as the best performing stock. It was followed by GCB, Ecobank GH, Cal Bank, SG-GH, ETI, EGL, Access Bank Plc, RBG, SIC, Trust Bank Gambia Ltd., and ADB. Finally, the overall rating and ranking of these stocks with regard to the metrics (U00, U01, U10, U11, and steady-state point gain) show that the SCB stock emerged as the best performing stock and followed by GCB, Ecobank, Cal Bank, SG-GH, ETI, and Trust Bank Gambia Ltd. being 11th position and ADB being observed as the worse performing stock (12th position).


## 4. Discussion and Conclusion

This paper sought to apply Markov chain techniques to select financial stocks listed on the Ghana Stock Exchange based on the mean recurrent times and steady-state distribution for investment consideration. The success of an investor particularly in a stock market centers on the choice of decision made which in turn hang on to the large extent on how well knowledgeable one is in stock analysis. According to Choji et al., Markov chain models have been used to analyse and predict the movement of stock prices in a stock market [8].The paper has shown systematically the applications of Markov chain techniques in analysing the transition probabilities and movement of the stock prices among the three states: point loss, constant, and point gain. Generally, the long-run distribution of the stocks showed that the constant state recorded the highest probabilities as compared to the other two states: point loss and point gain states. The stock prices showed similar long-run distribution and similar mean recurrent times except in the cases of ADB stock. However, the results showed that the mean recurrent time to the point gain state ranges from three weeks to thirty-five weeks approximately. Finally, Standard Chartered Bank, GCB, Ecobank, and Cal Bank were considered the top best performing stocks with respect to the mean recurrent times of their stock prices increasing and attaining the highest probabilities in the long run. However, ADB, Trust Bank of Gambia, Access Bank Plc, and Republic Bank stock prices were observed to have produced the highest probabilities for their stock prices to remain constant.According to studies by Choji et al. and D. Zhang and X. Zhang, the Markov chain model was successfully used to predict and forecast the stock price movements and stock market trends in China and Nigeria, respectively [8, 9]. In Kenya, Otieno et al. employed the Markov chain model to forecast stock market trend of Safaricom share in Nairobi Securities Exchange [10]. Bhusal used the Markov chain model to forecast the behaviour of Nepal Stock Exchange (NEPSE) index [11]. Based on the empirical evidence for the use of the Markov chain model to analyse and forecast the movements of stock market trends, the application for Markov chain techniques to select financial stocks based on the mean recurrent times and steady-state distribution for investment consideration is appropriate. Hence, centred on the findings of the study, the paper recommends that investors should consider Standard Chartered Bank (SCB), GCB, and Ecobank equities when constructing asset portfolios for higher returns.



---

*Source: 2863302-2022-08-13.xml*