#### Abstract

The stock market is a dynamical system composed of intricate relationships between financial entities, such as banks, corporations, and institutions. Such a complex interactive system can be represented by the network structure. The underlying mechanism of stock exchange establishes a time-evolving network among companies and individuals, which characterise the correlations of stock prices in the time sequential trades. Here, we develop a novel technique in quantum statistics to analyse the financial market evolution. We commence from heat bath analogy where the normalised Laplacian matrix plays the role of the Hamiltonian operator of the network. The eigenvalues of the Hamiltonian specify energy states of the network. These states are occupied by either indistinguishable bosons or fermions with corresponding Bose-Einstein and Fermi-Dirac statistics. Using the relevant partition functions, we develop the thermodynamic entropy to explore dynamic network characterisations. We conduct the experiments to apply this novel method to identify the significant variance in network structure during the financial crisis. The thermodynamic entropy provides an excellent framework to represent the variations taking place in the stock market.

#### 1. Introduction

The stock price is usually regarded as one of the chief representatives of economic activity in the financial market [1, 2]. It reflects the interaction among each individual and company [3]. The correlation between different financial entities is a complex system that evolves with time. Exploring the dynamic evolution of such a complex system reveals the intrinsic mechanism of the financial market and attracts scientists from different fields [1–5].

To quantify such a dynamic system, tools from complex networks have been applied to study the time sequential stock market prices [1, 5, 6]. Generally, most available network approaches map time series into the network domain so that it presents the topological and structural properties of the system [6, 7]. For example, the hierarchical structure of a minimal spanning tree provides a topological space in correlation coefficients of economic taxonomy [8]. The community structure of stock market networks represents the structural variations during the financial crisis [6].

However, most of the available work mainly focuses on the topological structure of the financial networks. They only introduce the global information of a specific period. Since the strong correlation in the time evolution of the stock market, it is significant to study the statistical properties of dynamic networks, especially during the financial crisis [4, 9, 10]. Recently, a robust method introduces the entropic measurement to quantify the network characterisation [9, 11, 12]. For example, the von Neumann entropy gives a qualitative expression for the entropy associated with the degree combinations of nodes forming edges [11–13].

To embark on this type of analysis, this paper is motivated by establishing effective and efficient methods for measuring the thermodynamic entropy in time-evolving networks. In particular, we analyse the stock market networks from the New York Stock Exchange (NYSE) [6]. We show that the financial crashes are characterised by the presence of well-defined changes to the thermodynamic entropy [13, 14], whereas outside these critical periods this characterisation remains stable for long periods. To do this, we make use of some recent framework in quantum statistics concerning the normalised Laplacian matrix for the construction of partition functions in Bose-Einstein and Fermi-Dirac statistics [15, 16].

##### 1.1. Related Literature

The study of correlation of financial equities plays a vital role in improving the ability to model financial entities, such as stock portfolios and fragility. The underlying principle is the use of financial time series, from which a correlation (or covariance) matrix is estimated, to construct networks [3, 17]. Then, the network characterisations shed new light on their underlying structure and dynamics.

There are different approaches to address this problem [1–5, 7]. The most common one is the principal component analysis of the correlation matrix of the time sequential financial data [18]. But this method only considers the global and linear information between pairs of financial entities. More and more research finds that the intermediate connections and collective dynamics are also crucial in analysing the financial system, especially in describing the cascade effect of the crisis [6, 13, 17]. In such a case, the occurrence of extreme events is inferred from the detection of anomalies in the time series originating from the network evolution.

Recently, an investigation of the thermodynamic properties has been performed by physicists by using the perspective and theoretical results of the network theory [5, 7, 10]. Network entropy has been extensively used to characterise the salient features of the structure in the network dynamics [9]. For example, the von Neumann entropy can be used as an effective characterisation of network structure, commencing from a quantum analogue in which the Laplacian matrix plays the role of the density matrix [11, 12]. Since the eigenvalues of the density matrix reflect the energy states of a network, this approach is closely related to the heat bath analogy in thermal physics. This provides a convenient route to use entropy to analyse network characterisations.

The heat bath analogy provides the framework of energy states in the network. It applies the matrix representation using the eigenvalues of network structure. These energy states are in the situation of thermal equilibrium, which are occupied by particles with the heat reservoir [19, 20]. Due to the thermal effect of this analogy, the particle occupation follows the quantum statistical distribution in these energy states. This specifies the microstates of the network structure and provides deep insights into network behaviour [15].

Two kinds of quantum statistical distribution are described in this thermodynamic picture, i.e., Bose-Einstein statistics and Fermi-Dirac statistics [21–23]. The relevant partition functions in each case provide the thermodynamic characterisations in network structure, such as entropy [19]. Here, in order to apply this heat bath analogy, we commence the Hamiltonian representation using the Laplacian matrix in the networks. Then, the eigenvalues of Laplacian matrix are regarded as the energy states populated by particles following Bose-Einstein and Fermi-Dirac statistics, respectively [20]. Two kinds of partition function in each quantum case provide different occupation statistics for the energy levels. This gives different thermodynamic entropy for each statistical distribution [16]. The qualitative description is that particles in Fermi-Dirac statistics obey the Pauli exclusion principle with only one particle for each energy state. This population is less dense than Bose-Einstein statistics since particles can aggregate in the same energy state [24].

The quantum representation of Bose-Einstein and Fermi-Dirac statistics also manifests differently in thermodynamic framework [24]. For instance, particles in Bose-Einstein statistics tend to condense in the lowest energy states at low temperature [21], compared to Fermi-Dirac statistics, there is only one particle per energy state [22, 23]. This is because there is little thermal disruption dictated by the Pauli exclusion principle [21, 22]. Therefore, the entropy derived from this thermodynamic perspective conveys different aspects of network structure. Since the particle samples the spectrum of Laplacian energy states, at low temperature in Bose-Einstein statistics, it is likely to respond more strongly to the spectral gap (the difference between the zero and first nonzero normalised Laplacian eigenvalues) and are thus sensitive to cluster or community structure [24, 25]. On the other hand, particles in Fermi-Dirac statistics occupy a broader spectrum of energy states. It is more sensitive to the details of spectrum density and thus convey more information about the Laplacian structural spectrum, such as the path length and cycle length distributions [26, 27].

##### 1.2. Paper Outline

The aim of this paper is to explore the behaviour of the thermodynamic entropy from quantum statistics in stock market networks. In particular, we validate our framework by analysing time-evolving networks constructed through correlation coefficients between stocks traded at the New York Stock Exchange (NYSE). We show that the financial crashes are characterised by the presence of salient fluctuation in thermodynamic entropy. To do this, we make use of some recent results from spectral graph theory concerning the construction of the normalised Laplacian matrix for partition function in quantum statistics.

This paper is organised as follows. In Section 2 we specify how the time-evolving network of the financial market is constructed and describe some basic concepts in network representation. In Section 3 we present the methodology used to derive thermodynamic entropy using the network Hamiltonian and partition function. We highlight the relevance of quantum statistics, i.e., Bose-Einstein and Fermi-Dirac statistics, for the financial market characterisation. In Section 4, we provide our experimental results and evaluation. Finally, in Section 5 we present the conclusions of the study.

#### 2. The Time-Evolving Stock Market Networks

##### 2.1. Stock Market Dataset

The New York Stock Exchange dataset contains the daily prices of 3,799 stocks which had been traded continuously on the New York Stock Exchange for over 6005 trading days. The stock prices were obtained from the Yahoo! financial database (http://finance.yahoo.com). A total of 347 stocks were selected from this set, all of which listed the historical stock prices from January 1986 to February 2011 [6]. For these stocks, we apply the logarithm of return in (1) to describes the closure price of stocks over the trading period [1, 3].where is the th stock price at day . The advantage of using the logarithm of return price, instead of the stock price directly, is that it is independent of inflation and discount factors and does not require the nonlinear or stochastic transformations to correct some common trends [28, 29]. Thus, the stock market dataset contains the closure prices of 347 stocks over the period of 6004 days.

##### 2.2. Stock Market Networks

In our network representation, the nodes correspond to various stocks and the edges indicate that there is a statistical similarity between the time series associated with the stock closing prices. In particular, to determine the edge structure of the network, we apply the Pearson correlation coefficient in (2) to quantify the similarity between two time sequential stock prices. where is the logarithm of return. Therefore, we obtain a fully weighted matrix of correlation coefficients which represents the weight of edges by .

However, the correlation coefficient matrix cannot straightly represent the topology structure of financial networks, since it does not fulfill the definition of axioms of a metric. In order to analyse the network structure using the adjacency matrix, we set a threshold to get a strong connection matrix for the edges. This leads to the definition of stock market networks bywhere is the Heaviside function [30] and is the Kronecker delta [31].

To analyse the time evolution of the stock market networks, we use a time window to compute the correlation coefficients between the time series for each stock pair [6]. Specifically, as shown in Figure 1, we set the length of time window days inside which the network is constructed by the correlations. Connections are created between a stock pair if the correlation exceeds a determined threshold. In our experiments, we set the correlation coefficient threshold to the value to so that of all possible* N(N-1)/2* edges remained at each time. The empirical results show that there are no significant changes for the network entropy if* η* belongs to the range [5%, 25%]. Then, we sequentially slide the window by to generate a sequence of networks according to the stock market time [6]. This yields a time-varying stock market network with a fixed number of 347 nodes and varying edge structure for each of the 6,000 trading days. The edges of the network, therefore, represent how the closing prices of the stock follow each other.

##### 2.3. Network Representation

Let* G(V, E)* be an undirected network with node set and edge set , and let |*V*| represent the total number of nodes on network* G(V, E)*. The adjacency matrix of a network is defined asThen the degree of node is .

The normalised Laplacian matrix of the network is defined as , where* L = D - A* is the Laplacian matrix and denotes the degree diagonal matrix whose elements are given by and zeros elsewhere. The element-wise expression of is

#### 3. Quantum Statistics in Networks

In order to characterise network properties, we apply the methods in quantum statistics to analyse the network structure. Commencing from the network Hamiltonian, the network is regarded as a system of grand canonical ensemble [20]. The corresponding partition function is then developed to derive the thermal quantities, such as energy and entropy [24].

##### 3.1. Network Hamiltonian

The Hamiltonian operator is usually used to describe the system energy in quantum mechanics. It involves two terms of the particles, namely, the kinetic energy and potential energy [32]. The standard definition of Hamiltonian is In terms of the network description, we apply the heat bath analogy to describe the network behaviour. The network energy states can be regarded as the eigenvalues of the Laplacian matrix which determines the Hamiltonian operator [14]. Since the particle occupation in the energy state subject to thermal agitation, the Hamiltonian operator governs the particles in the networks by the heat bath. The temperature of thermal reservoir determines the particle occupation statistics and the relevant chemical potential plays a vital rule in the number of particles of the network system [15, 19].

Here, in the network thermal analogy, we regard the kinetic energy operator as the negative of the adjacency matrix, i.e., -A, and the potential energy* U(r, t)* as the degree matrix D. Thus, the Hamiltonian operator is identical to the network Laplacian matrix [33]. Similarly, the normalised form of the network Laplacian is regarded as the Hamiltonian operatorIn this case, the eigenvalues of the Hamiltonian are the energy states of the network . These eigenvalues all greater than or equal to zero, and the multiplicity of the zero eigenvalues is the number of connected components within the network.

##### 3.2. Thermodynamic Quantities

To describe the network using the thermodynamic quantities, we consider the network system with particles. The corresponding Hamiltonian operator governs the network energy states which is immersed in a thermal reservoir of temperature . The relevant partition function* Z( β, N)* represents the thermodynamic characterisations in the network, where

*β*is inverse of temperature [20]. When specified in this way, we can derive the thermodynamic quantities. For example, the average energy is given bythe thermodynamic entropy byand the chemical potential byIn terms of the particle distribution in the energy states, the statistical properties of particles describe the thermodynamic quantities associated with the partition function for the different occupation statistics [34]. Therefore, the network characterisations, including the entropy, energy, and temperature, can be computed from the related partition function.

##### 3.3. Bose-Einstein Statistics

Particles in Bose-Einstein statistics are indistinguishable so that they accommodate each energy state with an unlimited number [21]. The network Hamiltonian specifies the energy states to make bosons aggregate in the same energy state without obeying Pauli exclusion principle [21].

Thus, in the network system, it contains a varying number of particles with a control parameter chemical potential* μ.* The corresponding partition function is given byThen, the related entropy can be achieved from (9),This kind of thermodynamic entropy depends on the chemical potential. It closely relates to the number of particles with the partition function. As the temperature

*β*controls the thermal occupation in each energy state, the corresponding number of particles in the level with energy

*ε*

_{i}isAs a result, the total number of particles in the system isDue to the nonnegative number of particles in each energy state, the control parameter, i.e., chemical potential

*should be less than the minimum energy state, i.e., .*

*μ*As the particles in Bose-Einstein statistics tend to congregate in the lower energy state at the low temperature, the relevant thermodynamic entropy strongly reflects the smaller Laplacian eigenvalues. Therefore, this kind of network characterisation closely relates to the spectral gap (the degree of bipartiality in a graph) and the number of connected components (the multiplicity of the zero eigenvalues) [24].

##### 3.4. Fermi-Dirac Statistics

Particles in Fermi-Dirac statistics are indistinguishable fermions so that they obey the Pauli exclusion principle [22, 23]. Each energy state has a maximum number of occupation that only one particle can accommodate at the state [22, 23].

The network Hamiltonian determines the behaviour of these particles, where the free fermions follow Fermi-Dirac statistics. The corresponding partition function provides the statistical properties of the networks, which is given byThe associated entropy is achieved byIn accordance with the Pauli exclusion principle, the number of particles accommodating the th energy state isand the total number of particles in the network isIn order for a single particle per energy state, the chemical potential is the th energy level, and so .

Since Fermi-Dirac statistics exclude multiple occupations at the same state, this kind of thermodynamic entropy does not strongly represent the properties of the Laplacian spectrum. But it samples a broader distribution of Laplacian eigenvalues which is sensitive to a greater portion of network spectrum. Therefore, this thermodynamic characterisation might expect to reflect subtle differences within a network structure.

#### 4. Experiments and Evaluations

##### 4.1. Experimental Results

We now conduct the experiments on the thermodynamic entropy to the stock market network evolutions. This provides a useful characterisation for analysing the stock market fluctuation. We first investigate whether this kind of entropy is effective to detect the network structural variance in time series.

Figure 2 shows New York Stock Exchange in the thermodynamic entropy from Bose-Einstein and Fermi-Dirac statistics. The sharp peaks in the time sequential data indicate the positions of significant financial events, such as Black Monday, Friday the 13th mini-crash, Early 1990s Recession, 1997 Asian Crisis, 9.11 Attacks, Downturn of 2002-2003, 2007 Financial Crisis, the Bankruptcy of Lehman Brothers, and the European Debt Crisis [9, 10]. Each financial crisis indicates the significant variance in entropy associated with dramatic network structural changes. We take the downturn of 2002-2003 as an example. After the 9.11 attacks, the investors lost trust in the United States economy due to the terrorism. Many Internet companies collapsed subsequently. This forced numerous large corporations to restate earnings and reestablished investors’ confidence [7]. This considerably altered the interrelationships among stocks and resulted in a significant fluctuation in the structure of the entire market [16].

In order to better understand the relationship between network structure and thermodynamic entropy, we take the 1997 Asian financial crisis as an example to further visualise how the network structure organised with entropy near a critical time point. This works as a reference for the effect of financial instabilities in the network structure [7, 35, 36]. During July to November in 1997, as shown in Figure 3, the thermodynamic entropy describes the instability of the network structure in the stock market. We note that the community structure or the connected components of the network always correspond to the fluctuation of thermodynamic entropy. Here, we select four different instants of time, using node colour to represent the density of degree connections. To correctly observe the thermodynamic evolution, the parameters of temperature and particle numbers are kept fixed for the four instant times in the visualisation of networks A, B, C, and D.

In Figure 3, we note that before the crisis the network structure is mainly composed of two predominant communities and the thermodynamic entropy remain stable at the low-value area. As the network approaches the crisis, the network structure changes drastically. Only a highly connected cluster at the centre of the network remains. The two community structures substantially vanish and the value of entropy tends to climb up. During the crisis, the network structure exhibits a more homogeneous connection, as represented by the higher values of entropy. At this epoch, most stocks are disconnected, meaning that the prices evolve without strong correlations. Similar patterns of the 1997 Asian Crisis can be found in temporal network analysis. This result also agrees with other findings on the structural organisation of financial market networks [7, 18, 35, 36]. Throughout the crisis period, the connected compositions preserve most of their communities, and the entropy becomes to decrease to the low value. After the crash in a long period, the network recovers to connect again.

To better quantitatively investigate the relationship between a financial crisis and thermodynamic entropy, we present a set of critical crisis periods in Figure 4. These periods are marked alongside the curve of the thermodynamic entropy in Bose-Einstein statistics, which exhibits a similar tendency in Fermi-Dirac statistics. As shown in Figure 4, the most striking observation is that almost all of the largest peaks and troughs can find their realistic financial crisis correspondences, which show the thermodynamic entropy is sensitive to network structural changes.

In addition, for each considered crisis, we observe different detailed behaviours around the time span of the crisis. For example, both Friday 13th the mini-crash and 1997 Asian Crisis present a sharp trough and peak in the corresponding time series, which dramatically change the network structure in a short time. On the other hand, Bankruptcy of Lehman Brothers and European Debt Crisis exhibit a persistent influence on the stock market with a broad entropic fluctuation in those periods. Therefore, this indicates that the thermodynamic entropy can capture network characterisations related to the financial crisis at different times.

##### 4.2. Evaluations

The correlation coefficient is computed between all the possible pairs of the stock price. Here, to validate the thermodynamic network entropy, we build the financial networks with another form of network construction, i.e., mutual information [37]. Figure 5 shows the entropy fluctuation in both traditional pairwise correlation and mutual information. Both diagrams contain time series for all of our stock market price. In each case, the entropy undergoes a sharp increase corresponding to the financial crises, which are associated with dramatic structural changes in the networks. Similarly, in Figure 2, the alternative form of network construction is also effective in indicating the critical events. The different feature is that, compared to other network construction method, the thermodynamic quantities show the greatest variation during the crises, suggesting that changes in cluster-structure (modularity) are important during these episodes.

We then compare our thermodynamic entropy with other thermodynamic characterisations, namely, the heat kernel signature [38] and the wave kernel signature [39], to analyse the dynamic financial networks. Figure 6 shows three-dimensional scatter plots obtained from the principal component analysis (PCA) of network representations, respectively. Both plots show a compact manifold structure. However, the smooth and compact manifold trajectory does not identify the critical points, such as Black Monday, 1997 Asian Crisis, and Stock Market Downturn. This indicates that although thermodynamic characterisation is effective to analyse financial network evolution, other thermal representation methods preserve information concerning significant changes in network evolution compared to the thermodynamic entropy [6, 19].

**(a) Heat kernel signature**

**(b) Wave kernel signature**

Next, we analyse the network similarity at different time steps. We compare the financial crisis of the same nature happened at two different time periods, i.e., 1929 and 2008. Figure 7 shows the network topologies at the global stock market crisis in 1929 and in 2008 [40]. These two events have a similar in magnitude. They both lead to the recessions in the world trade and unemployment [40]. As shown in Figure 7, both of two global crises have a similar entropy trajectory and the network topology also exhibit a similar pattern. During the crisis, the network structure exhibits a more homogeneous connection, with remaining only a highly connected cluster at the centre of the network.

**(a) Global financial crisis in 2008**

**(b) Global financial crisis in 1929**

Finally, we focus in detail on a critical financial event, namely, the 1997 Asian Crisis, to explore the dynamic structural difference with the entropic variance. We decompose the edge entropy by using the eigenvector of the Laplacian matrix and replacing its eigenvalues with the thermodynamic entropy elements. As shown before in Figure 3, the network structure has a dense cluster before the crisis and the number of connections decreases significantly during the financial crash. After that, the stocks begin to recover connections with another and a few stocks tend to form some clusters in the network structure. This phenomenon also reflects on the edge of entropy decomposition. Figure 8 shows the edge entropy distribution around the crisis for two quantum statistics. There is a narrow distribution during the 1997 Asian Crisis, compared with a broader edge entropy distribution before and after the crash.

**(a)**

**(b)**

**(c)**

**(d)**

**(e)**

**(f)**

Moreover, an interesting observation is the difference of edge entropy distribution between Bose-Einstein and Fermi-Dirac statistics after the Asian Crisis. This is because the networks make some clusters with community structure. Since Bose-Einstein statistics preferentially sample the lower energy levels with the network eigenvalue spectrum, it is more suitable to detect networks with strong community edge connection [34], while Fermi-Dirac statistics may be more sensitive to the mean and variance of the eigenvalue distribution since they probe a wider range of energy levels [15].

In conclusion, the thermodynamic entropy from quantum statistics can provide an effective tool to represent the dynamic structure of network evolution. To explore a more detail, Bose-Einstein statistics is more sensitive to reflect strong community edge connection, while Fermi-Dirac edge entropy is more suitable to represent high degree variations.

#### 5. Conclusions

The study of stock market networks not only improves the decisions related to the industrial entities but also provides a reliable indicator for an imminent widespread stock value decline, which refers to a financial crisis. This description of the network evolution tends to convey the dynamic financial market which infers the underlying financial activities and partnerships.

The goal of this paper is to show that thermodynamic entropy can be used to describe the dynamics of stock market networks. Here, we explore the thermodynamic framework from quantum statistics, i.e., Bose-Einstein statistics and Fermi-Dirac statistics. By considering the heat bath analogy, we derive the Hamiltonian operator as the normalised Laplacian matrix of the network. Derived by different choices of partition functions, we compute the thermodynamic entropy based on the particle distribution with energy level occupation statistics.

The results indicate that it is suitable to use the thermodynamic entropy to attest the statistical significance of experimental observations on stock market networks. Entropy in quantum statistics can provide an indicator to identify the financial crisis during the network evolution. Furthermore, the thermodynamic characterisations in both quantum statistics are effective in representing dynamic network structure. The difference between two cases is that particles in Bose-Einstein statistics tend to condense into a low energy state, which preferentially samples the small value eigenvalues of network spectrum. The corresponding entropy is more suitable to detect networks with strong community edge connection. Particles in Fermi-Dirac statistics, on the other hand, follow the Puli exclusion principle with only one particle per energy state. It probes a wider range of network spectrum which is more sensitive to the mean and variance of the eigenvalue distribution.

In addition, a more interesting study would be remained to explore different pruning techniques which can be used to transform a correlation matrix into the adjacency matrix. Novel network construction method would provide new insights about the structural characterisations. Furthermore, other datasets related to the financial market, such as interbank ownership, could provide additional developments about the relevance of thermodynamic characterisations during pronounced market crises.

#### Data Availability

The New York Stock Exchange date is available at http://finance.yahoo.com. The corresponding code is freely available upon request.

#### Disclosure

This research received no specific grant from any funding agency in the public, commercial, or not-for-profit sectors.

#### Conflicts of Interest

The authors declare that they have no conflicts of interest.

#### Acknowledgments

The authors would like to thank Weimin Li and Bing Wang for useful supports and comments. The authors acknowledge simulating discussions and help with Edwin R. Hancock and Richard C. Wilson.