Analysing network structures and dynamics of the Pakistan stock market across the uncertain time of global pandemic (Covid-19)

Purpose ― The global pandemic COVID-19 has attracted considerable interest from researchers globally. However, there is very little systematic work on the impact of the COVID-19 crisis on the local stock markets. This paper proposes a complex network method that examines the effects of global pandemic COVID-19 on the Pakistan stock market to fill in these gaps. M ethods ― Firstly, correlograms are plotted to inspect the correlation matrices of the overall and two sub-sample periods. Secondly, correlation threshold networks and topological properties are examined for different threshold levels. Finally, this paper uses evolving MSTs to construct a dynamical complex network and presents dynamic centrality measures, normalised tree, and average path lengths. Findings ― The findings show that COVID-19 related certainty and crisis lead to low volatility and a star-like structure, resulting in a quick flow of information and a strong correlation among the Pakistan stock market. Implication ― This analysis would help investors and regulators to manage the Pakistan stock market better. In addition, the comprehensive study solely on the Pakistan stock market will be helpful for Pakistan government officials and stock market participants to assess and predict the risks of the Pakistan stock market associated with the global pandemic COVID-19. Originality ― This paper addresses both classes of the networks. To the best of our knowledge, the static and dynamic evolution of the Pakistan stock market around the global pandemic COVID-19 has not been performed yet. (Alexakis, Eleftheriou, & Patsoulis, 2021), Complex network methods (Aslam et al., 2020; Zhang, Hu, & Ji, 2020), and panel data techniques (Cepoi, 2020; Salisu, Sikiru, & Vo, 2020). However, this study examines Pakistan’s stock market reaction to the global pandemic Covid-19 by using complex network methods.


Introduction
A distressing global pandemic as COVID-19, which rattled the stock markets throughout the globe, brought the businesses and economies to a standstill, having a considerable impact that no country was prepared for. According to World Health Organisation (WHO) 1 , there are currently 67 Million confirmed cases and 1.5 Million deaths (as of December 8, 2020) due to Coronavirus disease  globally. The novel coronavirus declared as a pandemic by WHO in March 2020 has already contained the economy due to its contagious human to human transmission, due to which authorities of the world have forced stringent quarantine of their population and business activity shut down (Topcu & Gulal, 2020). The international monetary fund (IMF) predicted a shrink in the world GDP by 3% during the year. Given the significant impact on the world economy, developing countries like Pakistan will suffer the worst pandemic.
The global pandemic COVID-19 has attracted significant interest from researchers worldwide within a short period. In a survey, (Goodell, 2020) assessed several pandemics and mentioned that the COVID-19 could have an extensive impact on the financial markets, mainly comprising stock markets and institutions. Therefore, it is a promising area for future study. Ashraf (2020) found an adverse reaction of stock markets from 64 countries towards an increase in the number of COVID-19 cases and thus concluded that markets reacted quickly to the pandemic. Al-Awadhi, Alsaifi, Al-Awadhi, and Alhammadi (2020) applied the panel testing technique to examine 1,579 stocks listed in the Chinese stock market between January 2020 and March 2020, and their results similarly found significant adverse effects of a pandemic on stock returns of entire companies.
Additionally, He, Sun, Zhang, and Li (2020) applied the classical event study methodology to several industries of the Chinese stock market. He found a few industries worst affected, along with the negative impact of a pandemic on stock prices of the Shanghai stock market. On the contrary, Alam, Alam, and Kavita (2020) examined the Indian stock market reaction during the COVID-19 lockdown using the event study methodology. Their results found positive average abnormal returns (AAR) during the lockdown period compared to negative AAR before the lockdown period. Salisu, Ebuh, and Usman (2020) applied Panel vector autoregressive (pVAR) on oil and stocks to examine its impact on the pandemic related shocks. Their results suggested extended impacts on oil and stocks during the pandemic compared to the period before the pandemic. Various other methods have been employed to examine the effects of a global pandemic on stock markets, such as the dynamic Spatial Durbin Model (DSDM) (Alexakis, Eleftheriou, & Patsoulis, 2021), Complex network methods (Aslam et al., 2020;Zhang, Hu, & Ji, 2020), and panel data techniques (Cepoi, 2020;Salisu, Sikiru, & Vo, 2020). However, this study examines Pakistan's stock market reaction to the global pandemic Covid-19 by using complex network methods.
Pakistan reported the first case of coronavirus on February 26, 2020. The number of confirmed cases in Pakistan comprises 0.625% of the global confirmed cases to 0.42 Million, along with 8,398 pandemic related deaths (as of December 8, 2020). Following others, the authorities of Pakistan ordered a strict lockdown resulting in the shutdown of businesses throughout the country to curb the impact of a pandemic. The country's stock market witnessed a significant decline, with foreign investors pulling off the money and industries being affected; the stock index reached the bottom level on March 19 in the past five years (Waheed, Sarwar, Sarwar, & Khan, 2020). A country struggling to manage its balance of payment crisis and in economic crisis (Memon, Yao, Aslam, & Tahir, 2019), the impact of the pandemic is vast. Therefore, the IMF approved $1.386 Billion for Pakistan to manage COVID-19 related shock. In addition, authorities in Pakistan limited the lockdown duration option and resumed the industry through intelligent lockdown measures that improved the country's stock market index. Previous studies either focused on examining the impact of global pandemic COVID-19 on developing stock markets, such as Albulescu, (2021); Baker et al. (2020); Mazur, Dang, and Vega (2021); Mittal and Sharma (2021) ;Narayan, Devpura, and Wang (2020), or global stock indices (see : Ashraf, 2020a;Aslam et al., 2020;Zhang et al., 2020). However, this pioneering study focuses on the Pakistan stock market state and structure changes around COVID-19 through the application of network-based methods, using an expansive timeline. In addition, past studies mentioned adverse effects of COVID-19 on stock markets, such as Huo and Qiu (2020) ;Liu, Manzoor, Wang, Zhang, and Manzoor (2020); Takyi and Bentum-Ennin (2021). Therefore, this study will assist various stakeholders of stock markets in analysing and postulating the impact of COVID-19 on developing economies. Moreover, the comprehensive research solely on the Pakistan stock market will be helpful for Pakistan government officials and stock market participants to assess and predict the risks of the Pakistan stock market associated with the global pandemic COVID-19.
The network methods are valuable tools for studying stock market patterns and revealing evolving trends in the stock tree topology Field (Chakrabarti, Chakraborti, & Chatterjee, 2006;Memon & Yao(Chakrabarti, Chakraborti, & Chatterjee, 2006;Memon & Yao, 2021). After the seminal work of Mantegna (Mantegna, 1999), empirical analysis of stock markets through applications of complex networks has been a critical motive for the researchers throughout the world (Kazemilari, Mohamadi, Mardani, & Streimikis, 2019;Memon, Yao, & Tahir, 2020;Tang, Xiong, Jia, & Zhang, 2018;Wiliński, Sienkiewicz, Gubiec, Kutner, & Struzik, 2013;. Financial network analysis offers an unparalleled outlook revealing fresh perspectives on examining the stock market stability, risk, shock dissemination, and contagion (Taylor et al., 2015). In addition, network analysis through the application of the minimum spanning tree provides the interdependency and dynamic evolution of the market, which is essential for institutional investors and hedge fund operators in modelling risks and providing an interactive outlook of the stock market. Under empirical network analysis, two sub-classes are performed, commonly known as static and dynamic networks. Previous work mainly focuses on exploring static properties of the stock markets (Huang, Zhao, Su, Yang, & Yang, 2020). However, a significant issue about the static network is the avoidance of time evolution, which a few studies have addressed recently by analysing both the static interdependence and dynamic development of the stock market networks (Cao & Wen, 2019;. This paper addresses both classes of the networks. To the best of our knowledge, the static and dynamic evolution of the Pakistan stock market around the global pandemic COVID-19 has not been performed yet.
The rest of the paper is organised as follows: Section 2 contains the methodology and data used in the paper. Section 3 presents empirical findings and a discussion of the study. Finally, the conclusion, limitations and future research are provided in Section 4.

Methods
Given the time series of number of stocks, we can calculate the correlations among any pair of stocks at a specific time window with a length or size of . Consider ( ) and ( ) are the returns calculated as ( ) = ln ( ) − ln ( − 1), and ( ) = ln ( ) − ln ( − 1) at time of two stocks and respectively. The Pearson correlation coefficient among two stocks can be calculated (Mantegna, 1999): where <. . > signifies the statistical mean. This study comprises = 67 top stocks of the Pakistan stock market, and hence the correlation matrix represents an outlook of complex system between 67(67 − 1)/2 pair of stock edges. The correlation coefficient satisfies −1 ≤ ≥ 1, and threshold network Ɵ can be created by mentioning certain value Ɵ, for example if > Ɵ among two stocks, an undirected edge is drawn among stocks and . Specifically, at any point of threshold value Ɵ, we can get numerous number of links (Lee & Nobi, 2018;. By following Mantegna (1999), the correlation matrix is transformed into a distance matrix among pair of stocks and as: The rolling window technique is largely used in literature to construct dynamic network (Jia, An, Sun, Huang, & Wang, 2017;Khuntia & Pattanayak, 2020;. While relying on complex network theory, the study links entire pair of nodes conforming to the distance matrix = ( , ). Thereafter, the dynamic minimum spanning trees of various length are obtained by dividing the timeline through rolling window technique, in our study is one month. The MST can be defined as (Mantegna, 1999): In addition, this paper uses various topological properties to access the static and dynamic structures of Pakistan stock market network. While describing the information linkages among networks, density (average number of links per node) is used against various threshold levels Ɵ, can be calculated as follows: where represents number of edges, and is the number of nodes of the network. The average path length (APL) is defined as the mean distance among two stocks in a network, and can be expressed as: where is the shortest distance among the stocks and . The clustering coefficient is a criterion that assesses the degree of a group. For a given node , its clustering coefficient is the probability of connection among any two points associated with node . The formula for computing clustering coefficient is as follows: where represents number of links that exists in the network among the nodes associated with node , and , is the degree of node . For a whole Pakistan stock market network, the clustering coefficient is described as the average of entire nodes' clustering coefficients, calculated as where is total number of nodes of the network. Node degree is used to simplify a network containing × edges, which is massive number for a large , therefore for simplification the weakest linkages are taken out (Onnela, Chakraborti, Kaski, & Kertész, 2003). Node degree can be calculated as where , represents the adjacency matric of the th minimum spanning tree. In order to measure intermediary role of a certain node in the overall network, betweenness centrality ( ) measure is used (Barthélemy, 2004). For a node , the betweenness centrality is calculated as follows: where ℎ ( ) represents shortest paths among nodes and ℎ that pass-through node , and ℎ symbolizes aggregate number of shortest paths among and ℎ. Further, to access the dynamic properties normalized tree length (NTL) denoted as ( ) is applied: To examine the impact exerted by COVID-19 on the network structure and dynamics of the Pakistan stock market, we use a wide timeline covering 328 trading days, from July 1, 2019 to October 22, 2020. In addition to the overall analysis, we further divide the timeline into two subperiods of pre-and during-COVID-19 by country-specific pandemic conditions and confirmed cases. Pakistan, a neighboring country of China, where the pandemic began, and Iran, another bordering country with the highest death rates due to COVID-19, reported their first confirmed case on February 26, 2020, (Waris, Atta, Ali, Asmat, & Baset, 2020). Soon after this, the country started reporting regular confirmed and suspected cases, and within a short span of fifteen days, the confirmed cases reached 20, along with 471 supposed cases (Saqlain, Munir, Ahmed, Tahir, & Kamran, 2020). Therefore, the study investigates network structures and topological evolution during COVID-19 (February 26, 2020, to October 22, 2020 and Pre-COVID-19 (July 1, 2019, to February 25, 2020), where both sub-sample periods contain 164 trading days. The analysis utilises closing prices of the top 67 companies from 21 industry sectors listed in the Karachi Stock Exchange 100 Index (KSE-100). The time-series data has been gathered from investing (https://www.investing.com/). Appendix A lists all the top 67 companies acting as nodes of the networks categorised in their respective industry sectors.

Results and Discussion
The entire sample investigation period of correlation is presented in Figure. 1, along with two subsample periods of pre-and during COVID-19 in Figure. 2, and Figure. 3, respectively. The red colour in the correlogram plots shows positive correlation values. In contrast, blue color represents less or negative correlation, and the x and y axes vales offer each of the top 67 stocks of the Pakistan stock market. While looking at three figures, the initial observation shows visible changes in the correlation structures during these periods. The results in Figure. One further reveals the average correlation among stocks of 0.365, along with the maximum correlation among two cement sector nodes of DG khan cement and maple leaf cement of 0.849. This pair also has the most significant correlation of 0.894 during the COVID-19 period. While accessing the changes during two sub-sample periods in Figure. 2, and Figure.3, the results show that the pre-COVID-19 period has lower average correlation values, thus highlighting relatively weak clusters. The moderate correlation (0.391) during COVID-19 is higher than pre-COVID-19 (0.335). This shows that uncertain times during COVID-19 force stocks to move in one direction, similar to previous studies that reported a tighter correlation among stocks during crisis period (Lee & Nobi, 2018;. The uncertainty of the health-related COVID-19 crisis implied into broader crisis among the Pakistan stock market due to the vulnerability of investors in decision making.   The paper generates threshold networks of the Pakistan stock market by associating certain values Ɵ of correlation coefficient (Lee & Nobi, 2018;. In threshold networks of overall and two sub-sample periods, a node (V) comprises a stock, and (E) is an edge joining the two stocks weighted through a cross-correlation coefficient. Similarly, the topological properties of eight threshold networks of the Pakistan stock market for overall, pre-, and during-COVID-19 periods against various Ɵ levels are presented in table 1. The results show a higher mean correlation against many correlation threshold levels during the COVID-19 period, representing a stronger association among stocks than in other periods. In addition, the density of the network at lower threshold levels is greater for all the periods, and the edge links and density keep on reducing when the threshold level enhances (Dimitrios & Vasileios, 2015). Moreover, the results show high density even at a higher threshold level of Ɵ greater than 0.4 during the COVID-19 period, compared to pre-COVID-19 and overall period, owing to the herd behaviour due to uncertainty and crisis in Pakistan stock market. Regarding connectivity, cement and oil & gas marketing sector nodes of a Maple leaf (MLCF), DG khan cement (DGKC), Oil & Gas Development Company (OGDC), and Pakistan petroleum limited (PPL) are essential nodes in the pre-and during COVID-19 period. To investigate the transitivity and network span of Pakistan stock market, average clustering coefficient < > and average path length < > are applied to the correlation threshold network. The average clustering coefficient shows a fluctuating descending trend as threshold level increases, inversely, average path length shows an increasing trend with an increase in the threshold level. However, the < > becomes larger and inversely < > decreases at a very higher threshold level. While comparing the two sub-sample periods, the < > for all threshold levels during COVID-19 remain 1.77% higher to 0.805, compared with pre-COVID-19 average of 0.791. This implies that the crisis of COVID-19 contributes to some extent of fluctuation and transitivity among stocks of Pakistan stock market. In addition, Zhu, Kou, Lai, Feng, and Du (2021) also found higher clustering coefficient during the COVID-19 period, possibly reflecting close-world network features. An appealing concept linked with clustering coefficient is small world network, which is simply the ratio of the path length upon the clustering coefficient (Xu, Wong, Chen, & Huang, 2017). However, this paper uses average path length as replacement variable against different threshold levels for all the periods. Moreover, <L> shows that both networks of subsample periods are different. The transmission efficiency enhances due to higher network density, and lower threshold levels corresponds to COVID-19 related crisis, with majority investors become enormously thoughtful to the information resulting in spillover effect of various markets being clearly improved. Further, the COVID-19 related uncertainty and crisis leads to low volatility resulting in quick flow of information and strong correlations among Pakistan stock market.
Further, we use moving window correlation coefficients to examine the evolving correlations between stocks of the Pakistan stock market. The window length has been set to 1 month, resulting in 16-time windows. After the formation of evolving MSTs, the following sub subsections present an analysis of Pakistan stock market concerning highest evolving node degree, highest evolving betweenness centrality, dynamic normalised tree length, and dynamic average path length.
The centrality measures are helpful in representing the influence of critical nodes among a network. The highest centrality measure of node degree and betweenness centrality are presented in Figure 5. As shown in Figure. 5, the highest number of nodes in Pakistan stock market network increased from six in the month of July-2019 to eight in February 2020. In other words, the network structure represents a star-like structure during the time when Government of Pakistan has verified COVID-19 cases. Another peak in the highest node degree of eight was also noticed during October 2020, when the total number of COVID-19 cases reached 332,993, including 6,806 COVID-19 related deaths 2 . Previous studies found star-like structure of MST just before a crisis event that changed to chain-like during the crisis (Kumar & Deo, 2013;Zhao, Li, & Cai, 2016). In addition, the corresponding stocks with the highest betweenness centrality in the MST vary over time. The tremendous global influence and highest betweenness centrality among the Pakistan stock market stocks of 1,763 are noticed for October-2020.  Table 2 show top Stocks of Pakistan stock market based on highest degree and betweenness centrality score during each period. The results show varied stocks appear on top spot in accordance with their relative industry sector. In terms of highest node degree, stocks from cement sector such as: DGKC, MLCF, and LUCK dominating on the overall network structure followed by oil and gas marketing nodes of SHEL, PSO, and SSGC. This indicates that these two industries have become more active and attractive to investors, representing to higher centrality in the Pakistan stock market. Before COVID-19 commercial banking sector nodes appear twice on the most influential hub positions, which has been changed during COVID-19 period to varied sector nodes as the Pakistan stock market network reduced connectivity to the financial sector. With regard to betweenness centrality, oil and gas marketing sector is most significant, followed by engineering sector having highest number of short routes and reflecting strong intermediary role. This also shows crucial role of these sectors for Pakistan economy. Moreover, an increase in the average intermediary routes for engineering sector node of International steel (ISL) has also been noted for the two consecutive months of July and august 2020 during COVID-19 period.  Figure. 6 shows the highest fall of the normalised tree length (NTL) of the Pakistan stock market during the month of March 2020, soon after Pakistan confirmed the cases of COVID-19. The value of NTL dropped from 0.7146 in the month of January 2020 before COVID-19 to 0.5440 in the month of March 2020, the maximum shrinkage of tree structure among all the periods. Previous studies mention shrinkage in the tree length typically during crisis period, representing chaos and uncertainty due crisis-related shocks that lead to contraction and smaller MST of stock markets (Lee & Nobi, 2018;. Since then, the NTL improved instantly and reached its highest level of 0.9105 during the month of July 2020 and during the COVID-19 period. The measures are taken by the government of Pakistan to restrict the impact of COVID-19, such as: shortening the duration of complete lockdowns, implementing smart lockdowns, approval of fiscal stimulus package, and compensation towards various industries, resulted in the expansion of network structures.
Consequently, the NTL decreased sharply due to the Pakistan stock market confronted with extreme risk. Furthermore, the dynamic average path length is used to assess the network transfer efficacy among all the periods of the Pakistan stock market. The APL shows a fluctuating downward trend from July 2019 to January 2020, before COVID-19. The lowest APL of 5.7069 was noted during January 2020, representing an early indication of crisis, with entire investors becoming highly thoughtful of the information and spillover effect of the Pakistan stock market. The transmission efficacy enhanced afterwards, with the highest APL of 8.1655 recorded during the month of June 2020. However, the APL decreases slightly thereafter as the Pakistan stock market gradually becomes sparse again.

Conclusion
This paper presented a detailed analysis of the blue-chip stocks of the Pakistan stock market in the pre-, during COVID-19 and total sample period through complex network methods. The dynamic and static characteristics of network structures provided us with a comprehensive outlook of the Pakistan stock market, particularly during the crisis and uncertain time of COVID-19. This would be useful to the investors of the Pakistan stock market for opting for correct decisions related to their portfolios and managing risks, further to the regulators for accessing stock market stability and control.
The analysis of correlation matrices revealed visible changes among the correlation structures in all the study periods. However, low clusters and weak correlation are observed in the pre-Covid-19 period, followed by an increase in the correlation coefficients during the COVID-19 period, reflecting uncertainty of the health-related COVID-19 crisis. About the threshold networks, the results showed an interconnected and dense network of the Pakistan stock market during the COVID-19 period in almost all the threshold levels. The results further revealed highly connected MLCF, DGKC, OGDC, and PPL nodes during the two sub-sample periods. The threshold topological properties of clustering coefficient and average path length showed that the COVID-19 crisis added some extent of fluctuation and transitivity to the Pakistan stock market stocks.
To examine the dynamic structures of the Pakistan stock market, this paper constructed sixteen monthly MSTs covering both sub-sample periods. The results of dynamic MSTs revealed a star-like system during the month when the government of Pakistan identified confirmed cases of COVID-19. The topological properties of node degree showed important nodes on hub position mostly from two sectors of cement and oil and gas marketing. In addition, stocks from the oil and gas marketing sector have the most significance, followed by the engineering sector having the highest number of short routes and reflecting a robust intermediary role. This information can provide investors and regulators with better risk and portfolio management in the stock market.
The NTL decreased rapidly during the crisis and uncertain time during COVID-19 and recovered back where it reached its maximum level throughout the period. In addition, NTL has proposed a good indication for the investors to monitor and analyse the changing trend from the period before and during-COVID-19 the crisis time. Although this paper has addressed many issues related to the analysis of the Pakistan stock market, for future work, an assessment of south Asian stock markets can be performed by extending the application of complex network methods in a broader data, and by comparing the results achieved in this paper.