Next Article in Journal
Event-Triggered Fixed-Time Integral Sliding Mode Control for Nonlinear Multi-Agent Systems with Disturbances
Previous Article in Journal
Study on Transient Queue-Size Distribution in the Finite-Buffer Model with Batch Arrivals and Multiple Vacation Policy
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Detection of Mutual Exciting Structure in Stock Price Trend Dynamics

1
School of Mathematical Science and LMIB, Beihang University, Beijing 100191, China
2
School of Computer Science and Engineering and NLSDE, Beihang University, Beijing 100191, China
3
Zhengzhou Aerotropolis Institute of Artificial Intelligence, Zhengzhou 451162, China
4
Pengcheng Laboratory, Shenzhen 518052, China
5
Gabelli School of Business, Fordham University, New York, NY 10023, USA
*
Author to whom correspondence should be addressed.
Entropy 2021, 23(11), 1411; https://doi.org/10.3390/e23111411
Submission received: 28 September 2021 / Revised: 18 October 2021 / Accepted: 21 October 2021 / Published: 27 October 2021

Abstract

:
We investigated a comprehensive analysis of the mutual exciting mechanism for the dynamic of stock price trends. A multi-dimensional Hawkes-model-based approach was proposed to capture the mutual exciting activities, which take the form of point processes induced by dual moving average crossovers. We first performed statistical measurements for the crossover event sequence, introducing the distribution of the inter-event times of dual moving average crossovers and the correlations of local variation (LV), which is often used in spike train analysis. It was demonstrated that the crossover dynamics in most stock sectors are generally more regular than a standard Poisson process, and the correlation between variations is ubiquitous. In this sense, the proposed model allowed us to identify some asymmetric cross-excitations, and a mutually exciting structure of stock sectors could be characterized by mutual excitation correlations obtained from the kernel matrix of our model. Using simulations, we were able to substantiate that a burst of the dual moving average crossovers in one sector increases the intensity of burst both in the same sector (self-excitation) as well as in other sectors (cross-excitation), generating episodes of highly clustered burst across the market. Furthermore, based on our finding, an algorithmic pair trading strategy was developed and backtesting results on real market data showed that the mutual excitation mechanism might be profitable for stock trading.

1. Introduction

In numerous complex systems, activity is driven by endogenous and exogenous factors. The endogenous factors mainly refer to intrinsic self-excitation mechanisms, while the exogenous factors come from environmental changes or other events that take place independently of events that have occurred in a system. Typical instances could be found in seismic dynamics [1,2,3,4], tweets in social networks [5], neuronal firing [6,7], and so on. In this respect, financial markets are the most representative. The movement of asset prices is consistently affected by the occurrence of internal events, such as large orders and abnormal price changes related to past events [8,9,10,11,12], and also by the arrival of exogenous events, such as news and economic policies [13,14]. To identify the endogenous and exogenous effects and characterize how they influence movements in financial markets has been a crucial problem for decades.
Hawkes processes [2,15,16], described as point processes with linear or nonlinear interactions, are frequently used to model non-stationary dynamics of financial activities driven by endogenous and exogenous joint factors [17,18]. In Bowsher’s pioneering work [19], a bivariate Hawkes process was introduced in order to model the joint dynamics of trades and mid-price changes of the NYSE. Since then, a great number of works have been proposed, which include market activity or risk models [9,19,20,21,22], price models [10,11,23], and impact models [9,23,24]. The most attractive feature of the Hawkes model is that the intensity consists of two terms: one term is a background rate, which accounts for the environmental exogenous effect, and the second term stands for the triggering effect from the preceding events, which could represent the endogenous self-excitation or other kinds of combination excitation [13].
In a recent series of articles, several constructive works [13,22,25,26,27,28] have addressed the important problem of a mutually exciting mechanism in stock markets within the framework of Hawkes models. In [27], Ait-Sahalia et al. proposed an effective mutually exciting model to capture the jump-diffusion process in global stock markets. It is well demonstrated that a jump in one region of the world or one segment of the market increases the intensity of jumps occurring both in the same region (self-excitation) as well as in other regions (cross-excitation). Actually, this mutual excitation induces a special kind of correlations between markets or different segments of one market. We call such correlations mutual excitation correlations in the following discussion.
In this study, we proposed a multidimensional Hawkes-model-based approach for the characterization of mutual excitation correlations in stock markets. Instead of checking micro activity such as jumps or transactions in price change, we considered events identified by technical trading indicators [29,30]. The profitability of technical trading indicators has been discussed widely in the technical analysis literature [30,31,32,33,34]. The majority of trading rules based on technical indicators stem from the assumption that prices move in trends determined by the changing attitudes of traders towards various economic, political, and psychological forces. In this sense, the activity or patterns induced by technical indicators form a mesoscopic portrayal of market price movements.
Specifically, we studied the dynamics of crossovers of moving average lines in stock market. Moving average crossover is one of the most popular trend-determining techniques based on the crossing of two moving averages of prices. This technique is also known as the dual moving average crossover (henceforth dual moving average crossovers) rule [29] in the technical analysis literature. Dual moving average crossovers are considered to be a good indicator of a market movement since the “microstructure” noise could be partially eliminated by price averaging. To the best of our knowledge, there are few works using mesoscopic economic activity such as dual moving average crossovers of prices to study the inner relevance in stock markets. We applied our approach to the analysis of stock price data from Chinese A-share markets. In [28], Hung T. Diep and Gabriel Desgranges present some very interesting results about the dynamics of the price behavior in stock markets, such as that an assembly of agents in a financial market interact with each other, which involved some exogenous factors like the economic temperature as well as economic measures taken by the government. We also identified a large number of golden and death crossovers in all the stock sectors. Interestingly, our approach demonstrates that the crossover arrival dynamics in most stock sectors are generally more frequent than the standard Poisson process.
Our main original contribution is a Hawkes model of the crossover activity in various stock sectors where a multidimensional kernel describes the mutual effect among different stock sectors. We found that a triggering structure of stock sectors could be revealed by the mutual excitation correlations obtained from the excitement kernel matrix of our model. It is significant to emphasize that mutual excitation correlations can be applied to design a profitable trading strategy since the crossover activity studied in our model is fundamental for the classical moving average (MA) trading rules [29]. To make a preliminary attempt, we proposed a quantitative pair trading strategy verified by back-testing on real stock market data.
The remainder of the article is organized as follows. In Section 2, we present our data set of prices and the main variables introduced to characterize the MA. We then perform statistical measurements for the crossover event sequence like the method used in spike train analysis. Meanwhile, we introduce the model of the univariate Hawkes processes and multidimensional Hawkes processes. In Section 3, we show how Hawkes models are able to describe the dynamics of an MA cluster in sectors when only the endogenous component is considered, and then we choose the leading sector and present our modeling approach, where a new component of the Hawkes process is added, taking into account the effect of the leading sector. Moreover, we present an empirical performance comparison of trading portfolios, which use our finding with the buy-and-hold strategy on the sector index. Finally, we present some conclusions Section 4.

2. Materials and Methods

2.1. DATA

We used daily frequency price data of more than 2000 stocks in Chinese A-share markets, purchased from the Wind data service. Specifically, these stocks were divided into 10 sectors according to the Global Industry Standard Classification (GISC), which included energy, materials, consumer discretionary, consumer staples, health care, financials, information technology, telecommunication services, utilities, and industrials. Details of each stock sector are demonstrated in Table 1. Here, the telecommunication sector was not taken into consideration due to a very few number of stocks. The timestamps of the data set were restricted to the regular session (9:30–11:30 and 13:00–15:00) from 4 January 2016 to 31 December 2018. For convenience, in the following discussion the time scales are normalized into interval ( 0 , 100 ) .
The change of stock prices is full of random noise and cannot serve as a good indicator of market movement. Thus we alternatively choose the crossovers of moving average lines as filtered price transactions and analyzed the time series of the crossover events. Basically, moving averages are considerable parts in the ensemble of tools in technical analysis trading. The properties and efficacy have been investigated in many previous academic studies. Without loss of generality, here we considered a commonly used moving average indicator, the exponential moving average (EMA). Denoting the closing price P n ( n N + ) of a stock at time n and denoting E n ( k ) as the k t h day backward exponential moving average at time n, the calculation formula reads:
E n ( k ) = 2 ( P n E n 1 ( k ) ) / n + E n 1 ( k ) ,
where a large (small) value of parameter k indicates a long-term (short-term) moving average. To filter the price change with crossovers, we considered the long-short EMA cross-over, which also performs as a basic trading strategy. Concretely, a “buy” signal could be issued when the shorter EMA crosses above the longer EMA, which is also named as a “golden crossover.” Similarly, “sell” signals can be defined in the opposite direction, which is called a “death crossover” as the longer EMA crosses above the shorter one. This technique is also known as the dual moving average crossover (henceforth dual moving average crossovers) rule [29] in the technical analysis literature. Technical analysts argue that when price moves upwards, the shorter moving average will rise faster than the long-term one, which is less responsive to recent price changes, indicating buying pressure and the possibility of a future bullish trend. Thus, for investors, the appearance of a golden crossover indicates that one should open a long position and maintain the position until the short-term average cross below the long-term one. By applying the same reasoning, investors should sell the asset when a death crossover appears.
In this study, we were concerned with the statistical properties of golden and death crossover signals, which can be represented as binary variables. The golden crossover signal variable S n G at time n based on an EMA cross-over is defined as follows:
S n G = 1 , E n 1 ( k s ) < E n 1 ( k l ) & E n ( k s ) > E n ( k l ) , 0 , e l s e .
In the same manner, the death crossover signal S n D at time n can be obtained as:
S n D = 1 , E n 1 ( k s ) > E n 1 ( k l ) & E n ( k s ) < E n ( k l ) , 0 , e l s e .
Here, k s and k l are short-term and long-term parameters, respectively. In the following study, we took k s = 12 and k l = 26 as general settings. To make an intuitive description, in Figure 1 we demonstrate an EMA golden crossover and a death crossover of a selected stock. Some statistical results of the stock data, such as numbers of stocks and crossovers in each sector, are presented in Table 1.

2.2. Statistical Measure for Crossover Event Sequences

In order to investigate events with a more distinct financial meaning, we mainly focused on those FIRST crossover events of each stock instead of all the crossover events. The first moving average crossover in a given time window has significant behavioral finance meanings, which indicates a potential beginning of a trend among the stocks in a certain sector. We were more concerned about the excitation between different sectors in a given time window. The first crossover event could be a nice representation of the trend dynamics of one sector. It is also easier to identify these first crossovers so as to better distinguish the excitation effects between different sectors. In this sense, the first EMA crossovers of each stock in a certain sector during a given period were selected. We note here that since the data granularity was 1 day, to distinguish those events happening on the same day, we randomized the corresponding event times by adding each timestamp expressed in days with a random number uniformly distributed in (0,1]. In Figure 2 we illustrate how those first golden EMA crossovers in the financial and IT sector were distributed.
To study the statistical proprieties of the EMA crossover, we first considered inter-event times, which indicate the time interval between each pair of events [35]. Let us consider a sequence of interevent times T 1 , T 2 , , T n between n + 1 golden (death) crossover events, and T i represents the length of the i t h time interval. We carefully checked the distribution of T i in various stock sectors, and it was demonstrated that the inter-event times between successive events in any chosen stock sector distribute as a power-law form, which is significantly divergent from the exponential distributions expected in a classical Poisson process. In Figure 2, we show an example, which is the distribution of T i in the financial sector. In Table 2, we show the power-law constants of the inter-event times distributions for each sector. The larger value of the power-law constant in the CS sector may indicate a weak correlation between the crossover activity of intra-stocks, while, in the financial sector, the power-law constant was smaller, which indicates a more active trend dynamic pattern. We can use the variances of these distributions to adopt different investment strategies for different sectors. Therefore, it was necessary to study the excitation effect between different sectors.
This observation motivated us that the dynamics of crossover events might not be regular. In fact, similar questions are also investigated in computational neuroscience, where neuronal activities called spike trains are extensively studied [36]. Revelation of inner connectivity or relations from various patterns of event actions have been widely attempted for neural circuits or online social contacts [37,38]. To make a quantitative description, we analogically introduced a promising measure, which was originally introduced in spike-train data analysis [38,39], the local variation(LV). It has been verified that the LV measure is quite efficient and robust in characterizing whether the activity rate of a event sequence is regular or intermittent [38]. Generally, the LV is defined as follows:
L V = 1 ( n 1 ) i = 1 n 1 3 T i T i + 1 2 T i + T i + 1 2
We note here that the factor 3 in Equation (4) was to make the LV value for a standard Poisson process equal to unity. In this sense, if L V < 1 , the inter-event times are smaller than those expected in a Poisson process, which means the event sequence is more regular than a Poission one. Otherwise, if L V > 1 , the event sequence is much more intermittent. To make a more comprehensive sketch of the crossover event sequence, we divided the whole time interval into N times windows and checked the corresponding LV values for each time window. In this way, we obtained a sequence of L V as L V 1 i , L V 2 i , , L V N i for each stock sector i.
An intuitive question is whether these L V sequences for different stock sectors are correlated. Since the answer to this question may help reveal the underlying connection structure of the stock market, we made a direct attempt by checking the Pearson correlation coefficient between two L V sequences. Take the IT and financial sectors for instance. We checked the distributions of corresponding L V sequences in the two sectors and illustrated the Pearson coefficient in a contour manner, as shown in Figure 3.
For the whole stock market, the correlation coefficients for each pair of stock sectors were examined. For both golden crossover and death crossover events in 9 stock sectors, we obtained two 9 × 9 coefficient matrix accordingly in Figure 4.
In this study, we tried to answer three questions. Does the activity rate of crossover events show regular or intermittent features? What is the relationship or interconnection between the event sequences for different stock sectors? Is there a possible mathematical model that could characterize the inner structure of the crossover event dynamics?

2.3. The Univariate Hawkes Processes

Actually, the arrival of EMA crossovers can be viewed as discontinuous random processes. Numerous kinds of models have been proposed to investigate the discrete nature of market pattern arrivals. The Poisson point process is a fundamental case in which events arrive independently of one another with a constant arrival rate λ . However, due to a lack of correlation structure, the Poisson point process can hardly capture the stylized features of markets, such as clustering of stock EMA crossover arrivals in some sectors. In this sense, the self-excited Hawkes model is a more consistent approach, which can be regarded as the generalization of the nonhomogeneous Poisson process, where the intensity λ t of arrival events at time t depends on the history of the process H t according to:
λ ( t | H t ) = μ ( t ) + t i < t ϕ ( t t i ) ,
where the first term μ ( t ) is a background rate, which accounts for exogenous events that are independent of history, and the second term represents the triggering effect from the preceding events at the occurrence time t i , the strength of which is controlled by a triggering kernel function ϕ ( · ) .
For our purposes, we first simply introduced the univariate Hawkes process approach to study the EMA crossover arrivals of stocks within a single sector. We assumed that the background (triggering) term was exclusively attributed to the exogenous (endogenous) effect. From another point of view, this univariate Hawkes process can be mapped into the well-known branching processes. The strength of the endogenity of the process is then characterized by the branching ratio 0 ϕ ( s ) d s , that is, the average number of events that are directly triggered by a single event. The branching ratio is also interpreted as a ratio of the events with endogenous origin to all the events. Therefore, exogenous “mother” events occur with intensity μ ( t ) and give rise to endogenous “child” events, which themselves give birth to more child events.
Via estimation of Hawkes processes parameters, the functional form of the kernel ϕ ( · ) is essential. In empirical studies, one can choose an a priori functional form for the kernel, depending on some parameters, and then determine the parameters by maximizing the likelihood over the observed data. In our application, for the endogenous kernel ϕ ( · ) , we adopted an exponential kernel that does not resort to rejection sampling. This kernel was proposed by Dassios and Zhao [2013] and scales linearly to the number of events drawn.
ϕ ( s ) = α e β s ,
where α and β are parameters. Especially, the parameter α corresponds to the branching ratio (magnitude), while β fixes the time scale. It is worth to note here that the power law function form is also common for the triggering kernel in the context of quantitative finance, especially in accounting for the long-range memory. In this study, since we only considered EMA crossovers of some stocks in a fixed short interval, which is lacking in long-range memory, we chose the exponential form for computational simplicity.

2.4. The Mutual and Multidimensional Hawkes Processes

At this step, we present the main contribution of this study: a potential sector–sector leading impact mechanism recovered by a multidimensional Hawkes process, which characterizes the mutual effects between each pair of stock sectors. Actually, this model was designed to figure out the impact of EMA crossover arrivals within one sector on stock activities (EMA crossovers) in another sector. Namely, the crossover activities of one sector were now not only a self-excited point process but were also influenced by other sectors. Concretely, when considering a selected stock sector A 1 , the crossover events in A 1 forms the points process, and we assumed that the arrivals of crossover events in other sectors A 2 , A 3 , A 4 , , A M forms the external events that contribute additional exciting intensities to the process in A 1 . In this sense, the crossover process outside sector A 1 was considered to be deterministic in the mutual model. Since we aimed at finding out the mutual impact among the sectors, it was reasonable to regard the events in other sectors that could significantly affect the evolution of the selected sector. Generally, the effect of such external events could be modeled via a separate term in the intensity expression. For λ ( t ) in some given sector i, the mutual model can be expressed as:
λ i ( t ) = μ i + t i < t ϕ i ( t t i ) + j = 1 M 1 t k j < t ϕ j ( t t k j ) ,
where μ i is still the exogenous intensity, and ϕ i ( · ) is the endogenous self-exciting kernel for sector i. The third term, ϕ j ( · ) , is the exogenous kernel that accounts for the external events’ excitements from sector j, which were assumed to be deterministic and known in advance. As we said, these special exogenous events increase the rate of immigrants’ arrival via memory kernels ϕ j , which, in general, could be distinguishable both in terms of the magnitude and the relaxation for each j via using the exponential form. In this way, both ϕ i ( · ) and ϕ j ( · ) were regarded as excitement terms.
Analogously, for each sector i, one can obtain a similar mutual equation like Equation (7). Considering there was a total of M sectors, an M-dimensional Hawkes point process N ( t ) = ( N i ( t ) ) , i [ 1 , M ] for every i can be defined. By combining both the internal and external terms, the i-th component of its intensity function λ i ( t ) is a linear regression of the past jumps of N ( t ) , i.e.,
λ i ( t ) = μ i + j = 1 M t k j < t ϕ E i j ( t t k j ) ,
where μ i is the exogenous intensity and ϕ E = ϕ E i j ( · ) , 1 i , j M is the Hawkes excitement kernel matrix, where each ϕ E i j ( · ) is a real positive function. Alternatively, the matrix convolution form of Equation (9) simply rewrites:
λ ( t ) = μ + ϕ E d N s .
As described in [11,25], the stability condition of this multidimensional Hawkes process is decided by the L 1 norm matrix of kernel ϕ E . Namely, if the L 1 norm matrix,
| | ϕ L | | = ( | | ϕ E i j | | 1 ) , 1 i , j M ,
has a spectral radius strictly smaller than one, then the process N t admits a version with stationary increments.
Similarly, we also specified the functional form of ϕ E i j as the exponential kernel. As we discussed in the univariate part above, the exponential kernel gives good results for the excitement component, that is,
ϕ E i j = α i j e β i j t .
We note here that the norm of ϕ E i j indicates the mean number of events of type i triggered by an event of type j, which can be used as as an indicator for estimating the impacts from sector j working on sector i.

3. Results and Discussion

3.1. Single Sector

We estimated the best parameters for each stock sector separately by maximizing the log likelihood. The whole time interval was divided into N time windows of equal length w. As we mentioned in the data section before, time stamps were normalized into (0,100), and w N = 100 should be satisfied. Further, since there was a total of three-year daily data, the time window also had a corresponding real time length meaning, i.e., if the time window is designed to represent three months, then w should be set as 100 / 12 since there are twelve three-month time windows in three years. In this way, we could obtain a set of optimal parameters for each sector with a given time window length w as in Table 3. Basically, the log-likelihood function of the univariate Hawkes process of given parameters θ based on the data D [ S , T ] = { t i } i = 1 n of n events in an observation interval [ S , T ] is given as
l o g L ( θ | D [ S , T ] ) = i = 1 n l o g λ ( t i | H t ) S T λ ( t | H t ) d t
where log represents the natural logarithm throughout the article. Further, it was necessary to determine the best time window length w for studying the first-crossover events. In fact, the likelihood values can be considered as a score for ranking the performance of each w. Higher scores correspond to a better fitting effect to the Hawkes model. In this way, various likelihood values corresponding to various values of w ranging from 1 to 10 were calculated through the estimation process. Results for different stock sectors indicate that, for most sectors, w = 2 or w = 3 should be a favorable choice, which is shown in Figure 5. In the following discussion, we prefered to set w = 3 , since three month is also one quarter in the financial cycle, which has distinct economical meanings.
Overall, we argue that the univariate Hawkes model with the exponential kernel provides a nice description of the empirical data for individual stock sectors. Based on the conclusion in [13], the Hawkes process is stationary if
n = 0 ϕ ( τ ) d τ < 1 .
Here, the quantity n is the fraction of the average intensity induced by the self-exciting part. As n became close to 1, most of the activity could be regarded to be induced by the underlying self-exciting factors, whether they hence appeared to be endogenously generated.

3.2. Multiple Sectors

Similar to Equation (12), the log likelihood function of our multidimensional model can also be analytically derived. In this sense, we could estimate a set of parameters in Equation (11). Concretely, for each sector in the data set, the multidimensional model was calibrated referring to a time window of length w = 3 as we discussed in the univariate case. First, the exogenous intensity μ i of each sector was investigated through the multidimensional model. In Table 4, we show the μ i values together with the average number (activity) of golden and death crossover events in each sector. Compared with the μ i values obtained in the univariate model (refer to Table 1), the updated exogenous intensity in the multidimensional model appeared to be much smaller for each sector. We argue that this means the crossover dynamics may be dominated by the triggering term, which is also consistent with our hypothesis.
The set of parameter pairs ( α i j , β i j ) can be estimated by executing regression of the multidimensional model on the real data set. After that, one could gain the norm matrix | | ϕ L | | defined in Equation (10), in which the matrix element ϕ E i j indicates influence divergences for individual sectors. As illustrated in Figure 6, we present the norm matrix | | ϕ L | | for both golden and death crossover cases in the heat map manner. The triggering impact of sector i indexed in the horizontal axis and on sector j indexed on the vertical axis is identified by distinguishable colors. This triggering impact matrix actually provides a landscape of the price-trend-inducing relationship between nine stock sectors in the Chinese A-share market. For instance, in the golden crossover heat-map, the financial sector, in most cases, had a stronger triggering effect on other sectors, which means the golden crossover of financial stocks might, in large probability, cause several cascading golden crossovers in other sectors. While, in the death crossover case, the energy sectors seemed to play a leading fall-down role, that is, the death crossovers of energy stocks may possibly induce price down crossovers in other sectors. Figure 6 also shows that the matrix is asymmetric, which reveals an additional correlation structure than the Pearson correlation coefficient matrix presented in Figure 4. It is interesting to see that although the financial sector had a strong impact on other sectors, it was not strongly self-excited in the golden crossover case, while, for the death crossover, the IT sector showed a considerable self-excited signal among all the sectors, which is also consistent with the exogenous intensity μ = 0.686 (largest) of IT calculated in Table 4. This indicates a cascading fall down of price is likely to happen within the IT sector. In Table 5, the average impact of each sector on the other ones is detailed.
Additionally, the condition for stationarity of Equation (9) was also verified by checking the eigenvalues of the norm matrix | | ϕ L | | . For both the golden and death crossover cases, the eigenvalues of the corresponding matrix were presented in the complex plane. It was demonstrated that all the eigenvalues were located within the unit circle on the complex plane, as illustrated in Figure 7, which ensured the stationarity of the data.

3.3. Strategy

As previously outlined, one of the motivations for this study was to build a profitable trading strategy based on the triggering structure revealed by our multidimensional model. To make a preliminary attempt, we utilized the triggering impact of sector A (leader sector) on sector B (audience sector) to generate buy and sell signals on sector B during stock trading. From the golden crossover heat-map, it can be seen that the financial sector has a considerable triggering impact on the material sector; thus, we took the financial sector as the leader one and the material sector as the audience one. The trading period was the same as the previous one used above, i.e., due to regulations in the Chinese stock market, one can only execute long operations on the stocks. The trading signals can be generated as follows: for the buying signal, once the number of golden EMA crossovers of the leading sector within one day exceeds a certain threshold Δ B , we will, before the close of the day, buy all the stocks that have not encountered their first golden EMA crossovers. Similarly, for the long selling signal, if the number of death EMA crossovers of stocks in the leader sector exceeds a certain threshold Δ S , we will sell the holding stocks that have not encountered their first death EMA crossover at the close of the day. To avoid fluctuation risk, another technical indicator, moving average convergence divergence (MACD), was also used. If the MACD value of the stock becomes smaller than 0, the long selling operation is also executed. A detailed list of trade rules can be found in Table 6. To avoid fluctuation risk, one common technical indicator, MACD [30], was also introduced here. If the MACD value of the stock becomes smaller than 0, the long selling operation is also executed. Without loss of generality, we numerically tested various values from 2015 to 2018 and finally set the threshold Δ S = Δ B = 4 to achieve the maximal profit. Typical transaction costs for a round trip (purchase and sale) of a stock were set as 0.05 % , which is the same in the real market trading case. In order to better verify the results we found, we not only conducted the backtesting from 2015 to 2018, but we also conducted the backtesting in 2019 and 2020 with the same strategy and parameter settings for 2015–2018.
The returns for the trading strategy described above are illustrated in Figure 8. The result of net value revealed that this strategy can generate significant profits during the six-year evaluation period. To evaluate trader performance, we compared the daily portfolio value of our strategy with the buy-and-hold strategy on the index of the audience sector in our six-year evaluation period.
Figure 8 shows the daily return of the two strategies over the assessment period. The daily earnings were calculated based on the earning performance of the previous trading day. Compared with the change of −6.5% in the material index, our strategy yielded a remarkable return of 188.80% in 2015–2018, and our strategy also achieved fantastic returns in 2019–2020. If we hedge with the index of the material sector, the net curve can be smoother and higher. With reasonable conditions, the proposed quantitative pair trading strategy is quite promising to find the leader relationship of the two sectors.

4. Conclusions

In this study, we introduced a Hawkes-process approach to the description of the novel leading relationship between nine sectors in Chinese A-share market, in line with the first crossover of the exponential moving average of the close price in a fixed interval. The leading relationship is very important and might reveal the sensitivity of sectors to the market activity. We first performed statistical measurements for a crossover event sequence that was similar to a spike train in neuronal activities and then considered the unconditional Hawkes modeling, i.e., we only considered a single sector. We found that the criticality parameters seem to be pretty insensitive to the change of the tick size, while the parameters of the kernel showed an abrupt change around it, and we obtained the best length of interval by comparing the score of each sector. We then considered our main original contribution, namely, the introduction of a new leading relationship between nine sectors in the Chinese A-share market. First, we chose the leading sector by the matrix of the norms of the kernel. Then, in both cases, we showed that the model with the leading sector kernel(s) outperformed the simple Hawkes model with only the endogenous kernel. We also noted that, once the leading sector term was introduced, the model obtained a better fitting. This suggests that, in the presence of localized exogenous excitation, a Hawkes model that does not consider leading-triggered non-stationarity could overestimate. Finally, we also designed and implemented a quantitative pair trader, utilizing the excitation influence of te leader sector on the audience sector, which achieved remarkable excess returns comparing with the benchmark.
An important limitation of our model is that, as it was presented, it treats equally all the MA crossover bursts. If there is an extremely great MA crossover bursting in the estimation interval, and this burst has different characteristics that lead to very different impacts, the model is expected to average the differences or to be influenced by the most relevant ones. Today, machine learning and deep learning is very popular in stock forecasting, [40,41] both have successfully applied machine learning methods for stock predictability and achieved fantastical and valuable results. Our model may also provide potential machine learning features for stock predictability. For example, according to our model, one can use the number of crossovers, the intensity of excitation, the duration of excitation, etc. to extend the features pool.
Despite being focused on financial market data, the approach presented in this study could be useful in the analysis and modeling of other complex systems. In fact, the presence of exogenous and endogenous drivers of the activity is ubiquitous in other systems monitored in continuous time. Our model can be possibly applied into bond convergence trading. Actually, convergence trading is a trading strategy consisting of two positions: buying one asset forward and selling a similar asset forward (going short the asset) for a higher price. For example, we can sell the 30-year US treasury bond short and buy the 29½-year US treasury bond. Compared with stocks, we can regard the rise in bond price to a certain level as a golden crossover and the decline in bond price to a certain level as a death crossover. There may also be some mutual excitation mechanism between the golden crossovers or the death crossovers of different bonds. The 30-year bonds generally trade at a premium over the 29½-year bonds, because they are more liquid—there is a liquidity premium. Once a newer bond is issued, this liquidity premium will generally decrease or disappear. Therefore, the rise of the 29½-year US treasury bond prices (golden crossover) may excite the decline in the 30-year US treasury bond prices (death crossover). Actually, our model can be modified to figure out the impact of death crossovers’ arrivals within one bond on golden crossovers in another bond. Describing the different source of excitation as correlated point processes is in general quite complicated, and the Hawkes approach proposed here could be a useful method to model, fit, and evaluate the leading relationship between the several drivers of generic stochastic dynamics.

Author Contributions

Conceptualization, S.L., X.J. and K.X.; methodology, S.L. and X.J.; software, S.L. and J.W.; writing—original draft preparation, S.L. and X.J.; writing—review and editing, X.J., L.T. and K.X. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by The National Key Research and Development Plan of China under Grant No:2018AAA0102301.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

3rd Party Data Restrictions apply to the availability of these data. Data was obtained from [Tushare] and are available http://tushare.org/ (accessed on 20 October 2021) with the permission of [Tushare].

Acknowledgments

This work has been supported by The National Key Research and Development Plan of China under Grant No:2018AAA0102301.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Hawkes, A. Cluster models for earthquakes-regional comparisons. Bull. Int. Stat. Inst. 1973, 45, 454–461. [Google Scholar]
  2. Ogata, Y. The asymptotic behaviour of maximum likelihood estimators for stationary point processes. Ann. Inst. Stat. Math. 1978, 30, 243–261. [Google Scholar] [CrossRef]
  3. Su, J.B. How to Promote the Performance of Parametric Volatility Forecasts in the Stock Market? A Neural Networks Approach. Entropy 2021, 23, 1151. [Google Scholar] [CrossRef] [PubMed]
  4. Yen, P.T.W.; Xia, K.; Cheong, S.A. Understanding Changes in the Topology and Geometry of Financial Market Correlations during a Market Crash. Entropy 2021, 23, 1211. [Google Scholar] [CrossRef] [PubMed]
  5. Fujita, K.; Medvedev, A.; Koyama, S.; Lambiotte, R.; Shinomoto, S. Identifying exogenous and endogenous activity in social media. Phys. Rev. E 2018, 98, 052304. [Google Scholar] [CrossRef] [Green Version]
  6. Krumin, M.; Reutsky, I.; Shoham, S. Correlation-based analysis and generation of multiple spike trains using Hawkes models with an exogenous input. Front. Comput. Neurosci. 2010, 4, 147. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  7. Pernice, V.; Rotter, S. Reconstruction of sparse connectivity in neural networks from spike train covariances. J. Stat. Mech. Theory Exp. 2013, 2013, P03008. [Google Scholar] [CrossRef]
  8. Rambaldi, M.; Filimonov, V.; Lillo, F. Detection of intensity bursts using Hawkes processes: An application to high-frequency financial data. Phys. Rev. E 2018, 97, 032318. [Google Scholar] [CrossRef] [Green Version]
  9. Bacry, E.; Muzy, J.F. Hawkes model for price and trades high-frequency dynamics. Quant. Financ. 2014, 14, 1147–1166. [Google Scholar] [CrossRef] [Green Version]
  10. Bacry, E.; Delattre, S.; Hoffmann, M.; Muzy, J.F. Modeling microstructure noise with mutually exciting point processes. Quant. Financ. 2013, 13, 65–77. [Google Scholar] [CrossRef]
  11. Bacry, E.; Jaisson, T.; Muzy, J.F. Estimation of slowly decreasing hawkes kernels: Application to high-frequency order book dynamics. Quant. Financ. 2016, 16, 1179–1201. [Google Scholar] [CrossRef]
  12. Zhang, C.; Zhang, Y.; Li, F. Feature Extraction of Sequence of Keystrokes in Fixed Text Using the Multivariate Hawkes Process. Math. Probl. Eng. 2021, 2021. [Google Scholar] [CrossRef]
  13. Rambaldi, M.; Pennesi, P.; Lillo, F. Modeling foreign exchange market activity around macroeconomic news: Hawkes-process approach. Phys. Rev. E 2015, 91, 012819. [Google Scholar] [CrossRef] [Green Version]
  14. Xia, L.; You, D.; Jiang, X.; Guo, Q. Comparison between global financial crisis and local stock disaster on top of Chinese stock network. Phys. Stat. Mech. Its Appl. 2018, 490, 222–230. [Google Scholar] [CrossRef]
  15. Hawkes, A.G. Point spectra of some mutually exciting point processes. J. R. Stat. Soc. Ser. (Methodol.) 1971, 33, 438–443. [Google Scholar] [CrossRef]
  16. Hawkes, A.G. Spectra of some self-exciting and mutually exciting point processes. Biometrika 1971, 58, 83–90. [Google Scholar] [CrossRef]
  17. Bauwens, L.; Hautsch, N. Modelling financial high frequency data using point processes. In Handbook of Financial Time Series; Springer: Berlin/Heidelberg, Germany, 2009; pp. 953–979. [Google Scholar]
  18. Omi, T.; Hirata, Y.; Aihara, K. Hawkes process model with a time-dependent background rate and its application to high-frequency financial data. Phys. Rev. E 2017, 96, 012303. [Google Scholar] [CrossRef] [Green Version]
  19. Bowsher, C.G. Modelling security market events in continuous time: Intensity based, multivariate point process models. J. Econom. 2007, 141, 876–912. [Google Scholar] [CrossRef] [Green Version]
  20. Hardiman. Branching-ratio approximation for the self-exciting Hawkes process. Phys. Rev. Stat. Nonlinear Soft Matter Phys. 2014, 90, 062807. [Google Scholar] [CrossRef] [Green Version]
  21. Filimonov, V.; Sornette, D. Quantifying reflexivity in financial markets: Toward a prediction of flash crashes. Phys. Rev. E 2012, 85, 056108. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  22. Embrechts, P.; Liniger, T.; Lin, L. Multivariate Hawkes Processes: An Application to Financial Data. J. Appl. Probab. 2011, 48, 367–378. [Google Scholar] [CrossRef] [Green Version]
  23. Jaisson, T.; Rosenbaum, M. Limit theorems for nearly unstable Hawkes processes. Ann. Appl. Probab. 2015, 25, 600–631. [Google Scholar] [CrossRef] [Green Version]
  24. Bacry, E.; Iuga, A.; Lasnier, M.; Lehalle, C.A. Market impacts and the life cycle of investors orders. Mark. Microstruct. Liq. 2015, 1, 1550009. [Google Scholar] [CrossRef]
  25. Hawkes, A.G. Hawkes processes and their applications to finance: A review. Quant. Financ. 2018, 18, 193–198. [Google Scholar] [CrossRef]
  26. Bacry, E.; Mastromatteo, I.; Muzy, J.F. Hawkes processes in finance. Mark. Microstruct. Liq. 2015, 1, 1550005. [Google Scholar] [CrossRef]
  27. At-Sahalia, Y.; Cacho-Diaz, J.; Laeven, R.J. Modeling financial contagion using mutually exciting jump processes. J. Financ. Econ. 2015, 117, 585–606. [Google Scholar] [CrossRef] [Green Version]
  28. Diep, H.T.; Desgranges, G. Dynamics of the price behavior in stock markets: A statistical physics approach. Phys. Stat. Mech. Its Appl. 2021, 570, 125813. [Google Scholar] [CrossRef]
  29. Pätäri, E.; Vilska, M. Performance of moving average trading strategies over varying stock market conditions: The Finnish evidence. Appl. Econ. 2014, 46, 2851–2872. [Google Scholar] [CrossRef]
  30. Shynkevich, A. Performance of technical analysis in growth and small cap segments of the US equity market. J. Bank. Financ. 2012, 36, 193–208. [Google Scholar] [CrossRef]
  31. Park, C.; Irwin, S.H. What do we know about the profitability of technical analysis? J. Econ. Surv. 2007, 21, 786–826. [Google Scholar] [CrossRef]
  32. Brock, W.; Lakonishok, J.; Lebaron, B. Simple Technical Trading Rules and the Stochastic Properties of Stock Returns. J. Financ. 1992, 47, 1731–1764. [Google Scholar] [CrossRef]
  33. Sullivan, R.; Timmermann, A.; White, H. Data-snooping, technical trading rule performance, and the bootstrap. J. Financ. 1999, 54, 1647–1691. [Google Scholar] [CrossRef]
  34. Toke, I.M. “Market Making” in an Order Book Model and Its Impact on the Spread. New Econ. Wind. 2011, 9, 49–64. [Google Scholar]
  35. Heeger, D. Poisson model of spike generation. Handout Univ. Standford 2000, 5, 1–13. [Google Scholar]
  36. Shinomoto, S.; Shima, K.; Tanji, J. Differences in spiking patterns among cortical neurons. Neural Comput. 2003, 15, 2823–2842. [Google Scholar] [CrossRef]
  37. Shinomoto, S.; Kim, H.; Shimokawa, T.; Matsuno, N.; Funahashi, S.; Shima, K.; Fujita, I.; Tamura, H.; Doi, T.; Kawano, K.; et al. Relating neuronal firing patterns to functional differentiation of cerebral cortex. PLoS Comput. Biol. 2009, 5, e1000433. [Google Scholar] [CrossRef]
  38. Aoki, T.; Takaguchi, T.; Kobayashi, R.; Lambiotte, R. Input-output relationship in social communications characterized by spike train analysis. Phys. Rev. E 2016, 94, 042313. [Google Scholar] [CrossRef] [Green Version]
  39. Sanlı, C.; Lambiotte, R. Local variation of hashtag spike trains and popularity in twitter. PLoS ONE 2015, 10, e0131704. [Google Scholar] [CrossRef]
  40. Abdullah, M. The implication of machine learning for financial solvency prediction: An empirical analysis on public listed companies of Bangladesh. J. Asian Bus. Econ. Stud. 2021. [Google Scholar] [CrossRef]
  41. Zhao, Y.; Chen, Z. Forecasting stock price movement: New evidence from a novel hybrid deep learning model. J. Asian Bus. Econ. Stud. 2021. [Google Scholar] [CrossRef]
Figure 1. (Color online) EMA golden and death crossover. Red points identify golden and death crossovers of an individual stock 000001.XSHE during the period: (20150106, 20150405). Blue line: short-term EMA with k s = 12 days. Yellow line: long-term EMA with k l = 26 days. Black line: daily close price line.
Figure 1. (Color online) EMA golden and death crossover. Red points identify golden and death crossovers of an individual stock 000001.XSHE during the period: (20150106, 20150405). Blue line: short-term EMA with k s = 12 days. Yellow line: long-term EMA with k l = 26 days. Black line: daily close price line.
Entropy 23 01411 g001
Figure 2. Left panel: (color online) the distribution of inter-event times. This figure refers to the data of the financial sector. Right panel: (color online) demonstration of first EMA golden crossovers. Each red line represents a crossover event happening at a certain time along the horizontal axis. Upper panel: first EMA golden crossover events of each stock in the financial sector during the period ( 20150112 , 20150414 ] ) . Lower panel: the case in IT sector during the same period.
Figure 2. Left panel: (color online) the distribution of inter-event times. This figure refers to the data of the financial sector. Right panel: (color online) demonstration of first EMA golden crossovers. Each red line represents a crossover event happening at a certain time along the horizontal axis. Upper panel: first EMA golden crossover events of each stock in the financial sector during the period ( 20150112 , 20150414 ] ) . Lower panel: the case in IT sector during the same period.
Entropy 23 01411 g002
Figure 3. (Color online) left panel: distribution of two L V sequences in t h e n u m b e r time windows. The financial sector data are plotted in blue, while the IT sector data are in orange. Right panel: Pearson correlation coefficient between the IT and financial sectors.
Figure 3. (Color online) left panel: distribution of two L V sequences in t h e n u m b e r time windows. The financial sector data are plotted in blue, while the IT sector data are in orange. Right panel: Pearson correlation coefficient between the IT and financial sectors.
Entropy 23 01411 g003
Figure 4. The LV’s heat map of golden and death crossovers. Left panel: golden crossover Right panel: death crossover.
Figure 4. The LV’s heat map of golden and death crossovers. Left panel: golden crossover Right panel: death crossover.
Entropy 23 01411 g004
Figure 5. Score function for different values of w and different sectors.
Figure 5. Score function for different values of w and different sectors.
Entropy 23 01411 g005
Figure 6. The heat map of golden and death crossovers. Left panel: golden crossover. Right panel: Death crossover.
Figure 6. The heat map of golden and death crossovers. Left panel: golden crossover. Right panel: Death crossover.
Entropy 23 01411 g006
Figure 7. The spectral circle of the eigenvalues of both golden and death crossover matrices. Left panel: golden crossover. Right panel: death crossover.
Figure 7. The spectral circle of the eigenvalues of both golden and death crossover matrices. Left panel: golden crossover. Right panel: death crossover.
Entropy 23 01411 g007
Figure 8. Daily return of the two strategies over the assetment period.
Figure 8. Daily return of the two strategies over the assetment period.
Entropy 23 01411 g008
Table 1. Some statistical results of stock sectors. The names listed in the first line are the abbreviations of energy, materials, consumer discretionary, consumer staples, health care, financials, information technology, telecommunication services, utilities, and industrials respectively.
Table 1. Some statistical results of stock sectors. The names listed in the first line are the abbreviations of energy, materials, consumer discretionary, consumer staples, health care, financials, information technology, telecommunication services, utilities, and industrials respectively.
SectorsEneMatCDCSHCFinITTelUtiInd
No. of stocks83618596214293986684121924
No. of golden crossovers847564152742244281397856484013848463
No. of death crossovers812535550112148267192053883913548164
Avg. interval of golden crossover13.912.811.612.412.811.11237.411.410.1
Avg. interval of death crossover14.213.812.613.413.41112.536.911.212.9
Table 2. The power-law constants obtained by fitting the IET distributions for each sector.
Table 2. The power-law constants obtained by fitting the IET distributions for each sector.
EneMatCDCSHCFinITUtiInd
2.37342.80532.69293.00382.66722.09562.76662.33192.5408
Table 3. Optimal parameters for each sector.
Table 3. Optimal parameters for each sector.
Golden Crossover
SectorsEneMatCDCSHCFinITUtiInd
μ 0.3171.5091.2520.7000.7090.3031.4980.4952.092
α 0.5120.6090.7090.6670.7200.5950.6610.5900.619
β 0.5440.7070.7120.6920.7300.6340.6960.6070.632
n0.9410.8610.9960.9640.9860.9380.9500.9720.979
Death Crossover
SectorsEneMatCDCSHCFinITUtiInd
μ 0.3491.3281.3710.7280.8470.3231.2740.6261.858
α 0.3510.6480.6160.6140.6140.4690.6790.4920.631
β 0.3660.6490.6690.6370.6530.4820.7110.5160.666
n0.9590.9980.9210.9630.9400.9730.9550.9530.947
Table 4. The μ i values of univariate model and multidimensional model together with the average number (activity) of golden and death crossover events in each sector.
Table 4. The μ i values of univariate model and multidimensional model together with the average number (activity) of golden and death crossover events in each sector.
Golden Crossover
SectorsEneMatCDCSHCFinITUtiInd
Activity (events/day)0.7414.8974.5591.9272.3880.8344.8331.2047.317
μ 0.0290.690.4280.0130.0010.2320.85802.092
Single μ 0.3171.5091.2520.70.7090.3031.4980.4952.092
Death Crossover
SectorsEneMatCDCSHCFinITUtiInd
Activity (events/day)0.7264.6924.3691.8682.2730.7914.6171.1957.14
μ 0.1650.2080.520.1930.3420.0320.6860.0190.77
Single μ 0.3491.3281.3710.7280.8470.3231.2740.6261.858
Table 5. The average impact of each sector on the other ones.
Table 5. The average impact of each sector on the other ones.
SectorsEneMatCDCSHCFinITUtiInd
Golden case mean0.1010.0640.1410.1280.1260.4050.1250.0250.026
Death case mean0.2340.0440.110.0330.1070.0610.2190.0470.07
Table 6. The details of strategy.
Table 6. The details of strategy.
SignalOperation
The number of golden EMA
crossovers of the leading
sector within one day exceeds
a certain threshold Δ B
Buy stocks without any
EMA golden crossovers
when the signal arrives
The number of death EMA
crossovers of the leading
sector within one day exceeds
a certain threshold Δ S
Sell stocks in long
position without any
EMA death crossovers
when the signal arrives
MACD of the stock in
long position is smaller than 0
Sell the corresponding stock
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Li, S.; Jiang, X.; Wu, J.; Tong, L.; Xu, K. Detection of Mutual Exciting Structure in Stock Price Trend Dynamics. Entropy 2021, 23, 1411. https://doi.org/10.3390/e23111411

AMA Style

Li S, Jiang X, Wu J, Tong L, Xu K. Detection of Mutual Exciting Structure in Stock Price Trend Dynamics. Entropy. 2021; 23(11):1411. https://doi.org/10.3390/e23111411

Chicago/Turabian Style

Li, Shangzhe, Xin Jiang, Junran Wu, Lin Tong, and Ke Xu. 2021. "Detection of Mutual Exciting Structure in Stock Price Trend Dynamics" Entropy 23, no. 11: 1411. https://doi.org/10.3390/e23111411

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop