Detecting and explaining changes in various assets' relationships in financial markets
Makoto Naraoka, Teruaki Hayashi, Takaaki Yoshino, Toshiaki Sugie, Kota Takano, Yukio Ohsawa
11 Detecting and explaining changes in various assetsโ relationships in financial markets
Makoto Naraoka , Teruaki Hayashi , Yukio Ohsawa , Takaaki Yoshino , Toshiaki Sugie , Kota Takano Graduate School of Frontier Sciences, The University of Tokyo, Japan Graduate School of Engineering, The University of Tokyo, Japan Nissei Asset Management Corp., Japan
Abstract
We study the method for detecting relationship changes in financial markets and providing human-interpretable network visualization to support the decision-making of fund managers dealing with multi-assets. First, we construct co-occurrence networks with each asset as a node and a pair with a strong relationship in price change as an edge at each time step. Second, we calculate Graph-Based Entropy to represent the variety of price changes based on the network. Third, we apply the Differential Network to finance, which is traditionally used in the field of bioinformatics. By the method described above, we can visualize when and what kind of changes are occurring in the financial market, and which assets play a central role in changes in financial markets. Experiments with multi-asset time-series data showed results that were well fit with actual events while maintaining high interpretability. Introduction 1.1
Research on the explanation of changes
Today, machine learning algorithms such as deep learning have dramatically improved the accuracy in various tasks such as prediction and classification, and artificial intelligence research is said to have entered its third boom. For example, as of January 2020, the accuracy of speech recognition has achieved 97.8%, which is said to exceed the accuracy of human hearing [1]. Applied research is also conducted in conjunction with other diverse fields such as medicine, finance, marketing, and physics. While machine learning algorithms, such as deep learning, have become capable of providing high-precision, it is often difficult for humans to interpret and explain why the output is the way it is, resulting in a black box-like state of affairs. Being a black box makes it difficult to be justified against the output. The inability to demonstrate relevance, especially when used for decision-making in business or society, can be a barrier to building consensus in the presence of various stakeholders and taking action. With this situation, the Ministry of Internal Affairs and Communications (MIC) in Japan has raised the "principle of transparency" and the "principle of accountability" as part of its AI utilization principles [2], and that shows there is a growing demand for accountability of AI in society.
Purpose
This study aims to detect changes in the relationship between various assets in the global financial markets to support fund managers' investment decision-making. Asset management companies and banks sell mutual fund financial products related to stocks and bonds. In Japan, for example, Japanese stocks, developed country stocks, Japanese bonds, and U.S. bonds are often sold according to the type of asset: stocks for stocks, bonds for bonds, and so on. In recent years, there has been a growing interest among investors in multi-asset funds, which combine multiple types of assets and allocate them according to market trends as needed. In response to this demand, asset management companies are also building and selling multi-asset funds. Therefore, it will be useful to support fund managers who deal with multi-asset funds, and the purpose of this study is to assist them by detecting and visualizing the changes of the asset to asset relationship. Method
In this study, to detect changes in the relationship between each asset in the financial market in a form that can be interpreted by fund managers managing multi-asset funds, we used two methods: visualization in the form of temporal networks and quantification of indicators of market trends based on the networks.
Co-occurrence Networks and Graph-Based Entropy 2.1.1 pre-processing
To calculate the distance matrices, we preprocessed the raw time-series data according to the following procedure. โ divided the time series by window, โก standardized (Z-score) within the window, and โข corrected for price movement directionality based on fund managers' experience. The standardization was performed as shown in Equation 1, where t is the time and w is the window width. ๐๐ ๐๐๐๐ ๐ก = ๐ฅ ๐ก โ ๐๐๐๐(๐ฅ ๐กโ๐ค,๐กโ๐ค+1,โฆ,๐ก )๐๐ท(๐ฅ ๐กโ๐ค,๐กโ๐ค+1,โฆ,๐ก ) (1) The directional corrections are made by multiplying those that tend to increase in price at risk-on by 1 and those that tend to decrease by -1.
Creating a distance matrix
Based on the time-series data for each asset, we calculate a distance matrix that represents the degree to which the price movements of each asset are similar. We used Dynamic Time Warping (DTW) [3] to calculate the distance from an asset to another. DTW is a method of stretching the time axis so that the distance between two sequences is minimized. It is often used as a distance calculation method for time-series data because it is more noise-resistant than Euclidean distance and more suitable for human intuition.
The distance between the sequence P = {p , ..., p l } and the sequence Q = {q , ..., q m } is below in Equation 2, and the distance can be calculated by matching each element of the sequence P with each element of the sequence Q in ascending order. ๐ท ๐๐ก๐ค (๐, ๐) = ๐(๐ ๐ , ๐ ๐ ), ๐(๐, ๐) = โ๐ ๐ โ ๐ ๐ โ + min { ๐(๐, ๐ โ 1)๐(๐ โ 1, ๐)๐(๐ โ 1, ๐ โ 1)(2) Fig 1 The left figure shows the distance measured by Euclidean and the right shows the distance measured by DTW* Making Co-occurrence Networks
Based on the distance matrices, if the distances for each pair of assets are smaller than a certain threshold, we consider them to be similar and create and visualize the network by putting an edge on them.
Quantification by Graph-Based Entropy (GBE)
Graph-Based Entropy (GBE) [4] is a measure of Shannon's entropy applied to the network structure, calculated based on the clusters represented in the network and defined as follows.
Hg = โ โ ๐(๐๐๐ข๐ ๐ก๐๐ ๐ ) log ๐(๐๐๐ข๐ ๐ก๐๐ ๐ ) ๐ ๐คโ๐๐๐ ๐(๐๐๐ข๐ ๐ก๐๐ ๐ ) = ๐๐๐๐(๐๐๐ข๐ ๐ก๐๐ ๐ )โ ๐๐๐๐(๐๐๐ข๐ ๐ก๐๐ ๐ ) ๐ (3) GBE has the property of being low when many clusters are condensed in a network. In a financial market, when the market is stable, the prices of each asset move freely to some extent, while when a kind of major event occurs and the market becomes unstable, the prices of many assets will fall or rise uniformly. Wikimedia Commons. (n.d.). Euclidean vs DTW, Retrieved May 21, 2020, from https://upload.wikimedia.org/wikipedia/commons/6/69/Euclidean_vs_DTW.jpg
Therefore, GBE can express stability in the financial market, and if the value of GBE falls sharply, it can be said that the market has moved from a stable state to an unstable state.
Differential networks 2.2.1
Making a difference matrix from the distance matrix
The distance matrix is created in the same way as described in the procedure for constructing the co-occurrence network, and then the difference matrix is created by taking the difference at each time step.
Let the distance matrix at time t be X t and the difference matrix D t is defined as follows. ๐ท ๐ก = ๐ ๐ก โ ๐ ๐กโ1 (๐ก โฅ 2) (4) Creating a differential network
The absolute value of the difference matrix forms a differential network by putting an edge on a pair of assets whose absolute value exceeds a certain threshold.
Differential network analysis is a method originally used in the field of bioinformatics[5], and in previous studies, it has been applied to gene regulatory networks in normal and cancer states to identify factors that contributed significantly to network changes as cancer progresses [6]. On a differential network, since edges are drawn over pairs whose relations have changed significantly, it is thought that nodes that have changed significantly will collect a large number of edges, which will then appear on the network as hubs. Although differential networks are used in bioinformatics, there are not so many examples of their use in other fields, including the field of finance. In this study, we use differential networks to identify and visualize assets that have made significant changes in the whole financial market. Besides, when the number of hubs represented on the differential network is high, it can be considered that large-scale changes are taking place in financial markets. Experiments and Discussion 3.1
Data and Parameters in experiments
We construct co-occurrence and differential networks and calculate GBE based on the time-series data of various types of financial assets. We used 49 time-series data of 49 series consisted of US stocks (S&P500), Japanese stocks (TOPIX), US treasury, Japanese government bonds, and exchange rates (dollar/yen) for the period from 01/01/2000 to 07/08/2019, with daily price. The window width of the DTW distance calculation was set to 20 days (days that stock markets are open in a month), the threshold of the distance to draw the edge in the co-occurrence network was set to be less than 2.0, and the threshold of the difference of the distance to draw the edge in the differential network was set to be more than 1.0 in absolute value, and the distance away from the edge with a value greater than 1.0 was connected with the red edge and the distance closer with a value less than -1.0 was connected with the blue edge. For each node in the differential network, those with a degree greater than or equal to 3 are considered as hubs.
Experimental Results and Discussions
We focus on 2007 in the results. In the differential networks, the number of hubs consisting of blue edges (hereinafter referred to as "closer hubs") has increased rapidly since the end of February (Fig. 2), and the visualized figures (Fig. 4 and Fig. 6) show that hubs have been formed around Japanese stocks (green nodes) and US stocks (red nodes). The value of GBE has also fallen sharply at the same time. In the corresponding co-occurrence network, the Japanese and U.S. stock clusters were separated on February 27, 2007 (Fig. 3), and gradually joined together to form a densely packed cluster two weeks later (Fig. 5). The combination of Japanese and U.S. stocks on the co-occurrence network and the increase in closer hubs centered on Japanese and U.S. stocks on the differential network can be considered consistent with the phenomenon of simultaneous global stock price declines in the real world and can be said to capture the relational changes in financial markets in an interpretable way.
Fig 2 The number of hub nodes. The red line means the number of father hubs, the blue line means the number of closer hubs, and the purple line (right axis) means GBE.
Fig 3 Co-occurrence Network with the zoomed figure on February 27, 2007 *2 The colors of the nodes are as follows: Red: US stocks, Green: Japanese stocks, Orange: US Treasuries, Blue: Japanese government bonds, Green-yellow: dollar-yen exchange, Black: others.
Fig 4 Differential Network on
February 27, 2007 *2 Fig 5 Co-occurrence Network on March 13, 2007 *2 Fig 6 Differential Network on March 13, 2007 *2 Besides, the number of hubs consisting of red edges (hereafter referred to as further hubs), which signify that the distance has gone away, has also increased sharply through November, with GBE values rising. The breakdown of the hubs on the differential network is dominated by U.S. Treasuries (Fig 9), and in the co-occurrence network, a single cluster of tightly coupled U.S. Treasuries and JGBs was formed in early November (Fig 7), but the cluster gradually became loosely coupled (Fig 9) and separated into two clusters in mid to late November (Fig 10). During this period, the interest rates on short-term bonds were quite low because of the subprime mortgage crisis, which shifted funds from long-term bonds such as stocks and U.S. 10-year bonds to short-term bonds such as 2-year bonds. As a result, it is thought that the price movement of Japanese government bonds has come to be different from that of other Japanese government bonds. 2
Fig 7 Co-occurrence Network (Partial excerpts) on November 1, 2007* Fig 8 Co-occurrence Network (Partial excerpts) on November 13, 2007* Fig 9 Differential Network (Partial excerpts) on November 13, 2007* Fig 10 Co-occurrence Network (Partial excerpts) on November 19, 2007* Related Research
Studies using co-occurrence networks and GBE have also been conducted in the past to detect changes in consumer purchasing behavior in supermarkets. In supermarkets, departmental supervisors at each store formulated sales strategies for consumers in a vertically organized manner, and there were few cross-departmental cooperation. Therefore, by creating and visualizing a co-occurrence network of products that consumers are likely to buy together, and by identifying the period of greatest change in the GBE, the study revealed that it supports cross-departmental collaboration in planning sales strategies and is attractive to consumers [7]. 4 Conclusion
The results suggest that the co-occurrence network, GBE, and the differential network, can be applied to detect changes across multiple assets in financial markets in a sufficiently interpretable manner and that this is in line with the events of what is happening in the real world. This is expected to support fund managers' decision-making in managing multi-asset funds, which are still not so many in Japan. So far, co-occurrence networks and GBE have been used only in studies of changes in consumer behavior in supermarkets, and differential networks have only been used in studies in the context of bioinformatics, and there have been few studies that have applied them to other fields, including finance. This study shows that it can be applied to financial markets as well. As a future issue, we would like to verify the usefulness of this study by experimenting to see if the results of decision making using this study in fund management by fund managers lead to improved investment performance.
References [1] Han, K. J., Prieto, R., Wu, K., & Ma, T. (2019). State-of-the-art speech recognition using multi-stream self-attention with dilated 1d convolutions. arXiv preprint arXiv:1910.00716. [2] The Ministry of Internal Affairs and Communications, AI Network Society Promotion Conference. โ Report 2019. โ ๏ผ๏ผ