Analysis of Chinese Stock Market by Using the Method of Visibility Graph

Many researchers studied the complexity of financial markets based on complex networks methods. The conversion of financial markets into complex networks is an open issue. In this paper, the data of 2571 stock companies in 2012 and the data of 2578 stock companies in 2013 are collected from Chinese stock market. Every year, data of these stock companies are randomly arranged. These data are then converted into some complex networks based on the visibility graph method. For these complex networks, degree distribution and clustering coefficient are considered. Our results show that the complex networks have the powerlaw distribution and small-world properties. The Pareto principle is also testified by the rank of average degree of companies in Chinese stock.


INTRODUCTION
Recently, complex networks have attracted much attention since many structure and properties of real complex systems in natural sciences field that can be described by complex networks [1 -10] .The financial market is a typical complex system since it has many complexity factors [11 -13].Consequently, the complex networks are a useful tool to research the complexity of financial markets [14 -21].However, how to convert the complexity of financial markets into a theoretical model of complex networks is still an open issue in the study.Namiki et al. [22] built the complex networks using the threshold method.Tabak et al. [23] built the minimum spanning tree for researching Brazil stock market and Brazil fund finance.Cai Shimin et al. [24] obtained the grid structure of the financial market based on empirical research.Recently, Chinese stock market has been considered by many researchers.For examples, Yao et al. [25] studied the difference on herding behavior between A and B of Chinese markets.The relationship between Chinese stock market and surrounding stock markets has been studied by Feng et al. [26].The asymmetric multifractal scaling behavior and forecasting volatility of Chinese stock market are revealed by using asymmetric multifractal detrended fluctuation analysis method and the Heterogeneous Autoregressive with Continuous volatility and Jumps model, respectively [27,28].
The visibility algorithm is an efficient and intuitional approach to convert the time series into a graph, which is denoted by a visibility graph [29].The visibility graph is used to reveal the properties of different types of time series [30 -34].Firstly, in the visibility algorithm, the values of a time series are represented by the height of vertical bars.The higher the value of vertical bars, the higher will be the value of time series.Secondly, these vertical bars are regarded as landscapes, and every bar is linked with other that can be seen from the top of the considered one [35] Lastly, every bar and link is denoted as a node and edge, respectively.The time series is described by networks.Specifically, some time series of the financial market are also indicated by visibility graph, such as quarterly macroeconomic series of China [36] and gold price time series [37].In this paper, Chinese stock market is considered on the basis of visibility graph method.The data is collected from 2571 Chinese stock companies in 2012 and 2578 of that in 2013.For data of each year, four sequences are obtained after data of these stock companies are randomly arranged on four times.And then, every sequence is converted into complex networks based on the visibility algorithm.Eight complex networks are obtained for two years.The degree distribution and clustering coefficient of these complex networks are calculated.Some properties of Chinese stock market are also revealed.
The remainder of this paper is organized as follows: Section 2 briefly introduces the complex networks and visibility graph.The method of stock network based on visibility graph is proposed in Section 3.An illustrative numerical example for Chinese stock market is described in Section 4. Conclusion on the outcomes of the analysis is drawn in Section 5.

Degree Distribution of Complex Networks
The degree of node is a basic parameter to describe the local characteristics of the network, degree of node i is denoted as K i .It is defined as follows [38]: where n is the total number of node, X ij and is defined as 1 if node i is connected to node j, and 0 otherwise.i is the focal node, j shows all other nodes.
From complex networks, probability of degree distribution of node with degree K is denoted as P K and defined as follows: (2) where N k is the number of nodes with degree k.For average degree , we have: For random network, its degree distribution is as follows [38]: However, degree distribution of scale-free network is as follows [39]:

Clustering Coefficient and Average Path Length of Complex Networks
The small-world networks have the higher clustering coefficient and shorter average path length.For given node i, its clustering coefficient C i is the probability of the connection between any two points connected with node i.It is defined as follows [5]: where E i represents the number of edges of connected neighboring nodes i.

()
The average coefficients C is defined as follows: (4) For fully-connected network, the value of C = 1.For scale-free network, the value of average coefficients is close to 1.
For unweighted complex networks, denoting l ij as path length of between node i and node j, which satisfies: The average path length of complex unweighted networks is given as follows: (6)

The Visibility Graph
In order to characterize time series from associated network topology, the visibility graph method was first proposed by L. Lacasa et al. in 2008 [29].In the visibility graph method, the values of time series are plotted using vertical bars.A vertical bar links with others which can be seen from the top of itself.The visibility criterion is established in the literature as follows: Definition 2.1 Two arbitrary data values (t 1 , y 1 ) and (t 2 , y 2 ) have visibility, and consequently they become two connected nodes of the associated graph [29], if any other data (t 3 , y 3 ) placed between them fills the requirement: As shown in Fig. (1), the histogram shows a time series with 11 data values, and the associated graph is obtained according to the visibility algorithm.In the histogram, if a bar can be observed from the top of considered one, it will found to be linked.If two bars are linked in the histogram, the vertices which represent them will be linked in the associated graph.The associated graph extracted from a time series is follows: Connected: Each node sees at least its nearest neighbors.

1.
Undirected: The associated graph extracted from a time series is undirected.2.
() tt y y y y tt Invariant under affine transformations of the series data: the visibility criterion is invariant, when horizontal 3.
and vertical axes are rescaled.

THE METHOD OF STOCK NETWORK BASED ON VISIBILITY GRAPH
Extraction of stock network from the stock market is an important task.The stock market is described as time series by many researchers [40 -42].However, they usually considered income of a stock company in a specific time period or in a trading day.These references do not portray the situation of stock companies of other nations.In this paper, all stock companies of other nations are considered and modeled as stock networks.The main steps of modeling are as follows: Step 1: The values of closing price of all stock companies are collected through software of stock.
Step 2: The closing price of each stock company is described as a vertical bar.The value of close price is represented by height of vertical bar.The bigger the value is the higher the bar will be.
Step 3: For each year, data of these vertical bars are arranged randomly.
Step 4: Two vertical bars are joined by a straight line, if their direct linking is not crossing the other bars.
Step 5: These vertical bars and joints are represented by nodes and edges of network, respectively.According to the above five steps, a stock network is obtained.For each year, data of these vertical bars are randomly arranged a number of times.For each time, the range can be converted into complex networks based on the visibility graph method.

The Visibility Graph and Some Measures of Complex Networks
The application of complex networks in Chinese stock market is considered in this section.The basic data is the year-end closing price of all public companies in China, taken from the year 2012-2013 of Chinese stock market.The date derived from Straight flush, an online stock trading securities analysis software.According to the proposed method, every year, the data of these vertical bars are arranged randomly four times.And then, four stock networks are obtained and denoted as and, where is shows the times of random permutation.The four complex networks of 2012 and 2013 are shown in Figs.(2 and 3) respectively.The degree distribution and clustering coefficient of these complex networks are shown in Table 1.From Table 1, the values of are always between 10 and 11, the values of are always less than 4 and the values of are always around 0.83.The values of average path length of these complex networks are small and the values of clustering coefficient are big, although these networks have a great number of nodes.From Figs. (2 and 3), the degree distribution is fitting with, the values of in these complex networks are approximate 3.5.The average degree of every company is calculated each year, and then the companies are sorted from high to low according to the value of average degree.The companies ranking in top 10 of every year are shown in Table 2. Table 2 shows that these companies are always banks and oil companies.

Analysis of Chinese Stock Market
From previous section, although the number of companies is more than 2000, the average degree and the average shortest length of these complex networks are always about 10 and 4, respectively.The values of average degree in top 10 companies are always more than 95.Indeed, the No.1, The Industrial and Commercial Bank of China is 648.75 in 2013.In these complex networks, there are few Hob nodes, such as "The Industrial and Commercial Bank of China", "The Agricultural Bank of China" and "Bank of China".Meanwhile, from Figs. (2 and 3), the stock-market networks of Chinese stock market show scale-free property.From Table 2, ranking with average degree of companies, there are almost state holding pattern companies in the top 10 list.The result described that public sector of the economy is very important in the Chinese stock market.
Another interesting result here is that the verification of the Pareto principle.As per the ranking of average degree of company, the sum of 20 percent of companies having general income is 81.16% and 80.05% in 2012 and 2013, respectively.It reflects a market phenomenon that minority companies are occupied numerous markets.The result described the disequilibrium of income of every company in the Chinese stock market.Moreover, these stock networks follow the power-law distribution, which also explains these networks fit in the Pareto Principle.For Chinese stock market in 2012 and 2013, the Pareto Principle and the scale-free property are found to be consistent.

CONCLUSION
Complex networks have been applied for researching financial markets.There are many methods to convert the financial markets into complex networks.In this paper, the visibility graph method is used to describe the Chinese stock market.The basic data is the year-end closing price of all public companies in China, ranging from 2012-2013 Chinese stock market.Based on visibility graph method, complex networks are obtained.And then, some measures of complex networks are studied.Our results revealed that the stock networks have the power-law distribution and small-world properties.Indeed, the Pareto principle is also found in Chinese stock market using our method.The numerical examples show that the proposed approach can reveal the stock market.The proposed method not only extends the application of the visibility graph but also enriches the studying of Chinese stock market.