On the Price Dynamics of a Two-Dimensional Financial Market Model with Entry Levels

*is paper aims to extend the model developed by Tramontana et al. By adding trend followers who pay attention to the most recent observed price trend, we formulate a financial market model driven by a new two-dimensional discontinuous piecewise linear (PWL) map with three branches.*e dynamic behavior of the mapping system is studied in two cases according to different trend followers’ expectation of the stock price. *e existence and stability conditions of periodic attractors and other bounded attractors are derived by using qualitative and quantitative methods, theoretical analysis, and numerical simulation. When trend followers are neutral on the stock market, we present that the basin of locally attracting fixed points can be determined by the preimages of two borderlines. We also prove that one of its surprising features is that model simulations may appear to be chaotic, although only regular dynamics can emerge. When trend followers are bullish or bearish on the stock market, we present the existence conditions of attracting coexistence fixed point, globally and locally attracting fixed point, and periodic and other bounded attractors. *e transversal homoclinic theory of flip saddle periodic point is applied to prove the existence of chaotic attractor. We also give the calculation methods of border collision bifurcation (BCB) curves. *is paper advances our knowledge of discontinuous PWL systems and reveals the endogenous evolution of bubbles and crashes and excessive volatility in financial markets from a new perspective with new methods.


Introduction
Financial markets often experience severe bubbles and crashes and excessive volatility, which in turn can have a huge impact on the real economy. Prominent examples include the stock market crash of 1929, which led to the great depression, and the stock market crash of 2007, which led to the great recession. It is very important for financial regulation to find out the financial market change law so as to prevent financial crisis. erefore, it has been widely followed to model and study financial markets. In recent years, it has become a research hot spot to focus on the micro foundation of financial market model based on heterogeneous agents. Empirical studies show that changes in stock market participants amplify boom-bust levels. Kindleberger and Aliber [1] argue that "during the stock market rally, there was a widespread sense among investors that 'it's time to get on the train before leaving the station.' Shiller [2], likewise, reports that "investors, their confidence and expectations buoyed by past price increases, bid up speculative prices further, thereby enticing more investors to do the same, so that the cycle repeats again and again." erefore, it is an important task and main link of current financial regulation to make the influence of the expectation and behavior of financial market participants on the price of financial market clear. Our paper aims at adding to the burgeoning literature on agent-based financial market models which explain the dynamics of financial markets by highlighting the trading activity of their participants. Previous contributions in this field include the works by Day and Huang [3], Chiarella [4], De Grauwe et al. [5], Kirman [6], Lux [7], Brock and Hommes [8], LeBaron et al. [9], Farmer and Joshi [10], He and Li [11], and Gu [12]. According to this class of models, interactions between heterogeneous and boundedly rational speculators can generate complex endogenous price dynamics, including, for instance, the emergence of bubbles and crashes. More recent follow-up papers are surveyed by Hommes [13], LeBaron [13], Lux [14], Chiarella et al. [15], and Westerhoff [16].
Only a few one-dimensional PWL models in this exciting area have been proposed. For example, see the asset pricing models of Huang and Day [17], Day [18], Huang et al. [19], and Tramontana et al. [20][21][22][23]. Piecewise linear maps may be regarded as an approximation of more complicated nonlinear maps. ey often allow for a deeper analytical study of the underlying dynamical system and thus may offer novel interesting results about how financial markets function.
Tramontana et al. [22] have considered two types of chartists and fundamentalists and formulated a one-dimensional dynamical model with two branches. Type 1 chartists and type 1 fundamentalists are always active in the market and 2 chartists and type 2 fundamentalists only act with market entry levels. Tramontana et al. [22] argue in the end of their paper that "by assuming that chartists pay attention to the most recently observed price trend, the model would turn into a two-dimensional map." In this paper, we incorporate trend followers into the model developed by Tramontana et al. and build a model involving five types of speculators. Type 1 and type 2 chartists believe in the persistence of bull and bear markets; type 1 and type 2 fundamentalists believe in mean reversion. While type 1 chartists and type 1 fundamentalists are always active in the market, type 2 chartists and type 2 fundamentalists are only active when prices are at least at a certain distance away from the fundamental value. Trend-following traders buy and sell based on recent price movements in the stock market. If the market price of the stock goes up, they will buy, and if the price goes down, they will sell. e speculators transactions are mediated by a market maker who also adjusts prices with respect to the excess demand. As it turns out, the dynamics of our model are driven by a 2-dimensional PWL map with three branches. It should also be noted that 2-dimensional (2D) discontinuous PWL maps with two borderlines have not been found yet. Despite their simplicity, they can, however, lead to surprising new insights. We hope that our paper will advance our knowledge of such maps.
Mathematical insights into a 2D discontinuous map are important since these kinds of systems have recently found a wide use in physical, engineering, economics, and social systems. It is well known that such dynamical systems defined by piecewise smooth functions exhibit several phenomena, which cannot occur in smooth systems, for example, BCB, sliding, and chattering [24]. e biggest characteristic is BCB occurring when a periodic point collides with a border. Although BCB theory for continuous PWL maps is well developed by Banerjee et al. [25], the results related to BCB theory for discontinuous maps are still in their infancy. A bifurcation theory for 1D discontinuous maps has been reported by Banerjee et al. [26], Gardini and Tramontana [27,28], Guckenheimer and Holmes [29], Jain and Banerjee [30], and Makrooni et al. [31]. In the context of general n-dimensional discontinuous maps, some important results related to the existence of period-1 orbits and period-2 orbits have recently been published by Hogan et al. [32] and Dutta et al. [33], respectively, and they have also been applied in practical systems by Bernardo et al. [34]. e bifurcation phenomena in a 2D PWL discontinuous map with one borderline have been investigated by Rakshit et al. [35] and Gu [12]. However, a 2D PWL discontinuous map with two borderlines has not found any result. We shall investigate its rich dynamical behavior including the periodic and chaotic orbits. We also give the basin of attraction by the preimages of two borderlines and prove the existence of homoclinic chaos by transversal interactions between the stable and unstable manifolds of periodic points.
After these introductory remarks, the plan of the paper is as follows. Section 2 concerns the formulation of 2-dimensional discontinuous financial model. In Section 3, we describe some preliminary properties of its underlying dynamical system. In Section 4, we start to investigate the model in more detail in the case where trend followers are neutral on the stock market. e existence conditions of periodic attractors are derived and basins of locally attracting fixed point are given by the preimages of two borderlines. No chaotic attractor is proved by transverse homoclinic theory and Lyapunov exponent. In Section 5, we focus on investigating the model in more detail in the case where trend followers are bullish on the stock market. e existence conditions of periodic attractors are given, which include globally attracting fixed points, locally attracting fixed points, attracting coexistence fixed points, and bounded attractors. e existence of homoclinic chaos is proved by the stable and unstable manifolds of a flip saddle periodic point. Finally, Section 6 concludes the paper.

A Discontinuous Financial Market Model
We assume that a market maker mediates transactions out of equilibrium by providing or absorbing liquidity, depending on whether the excess demand is positive or negative. In addition to clearing the market, the market adjusts prices according to the following rule: where f 1 is a positive reaction parameter. Clearly, (3) generates buying orders when the market is undervalued and generates selling orders when it is overvalued. What type 1 chartists and type 1 fundamentalists have in common is that they are almost always active. Once they perceive a mispricing, they start trading. Type 2 chartists and type 2 fundamentalists are different from them in the sense that they only become active when the misalignment exceeds a certain critical threshold level. As already mentioned, we assume in our model an attention-based market entry of type 2 traders. e orders of type 2 chartists and type 2 fundamentalists are therefore represented by respectively. Again, reaction parameters c 2 and f 2 are positive and the aforementioned threshold level is given by z > 0. Trend followers follow the trend blindly. When prices rise, they will make a decision to buy in order to sell at higher prices in the future, so, to get the difference, the demand is proportional to the price rise. On the contrary, when prices fall, they sell shares to minimize losses. We thus formalize the orders placed by trend followers as where s a can take any values and captures some general kind of optimism and pessimism of trend followers while prices remain constant. If s a > 0, then trend followers are optimistic or bullish, if s a < 0, they become pessimistic or bearish, and if s a � 0, they experience a hesitation and wait-and-see period or become neutral. s b ≥ 0 is trading aggressiveness of trend followers. Inserting (2)-(5) into (1) yields where Note first that s 1 and s 2 can take any values. A positive (negative) value of s 1 means that type 1 chartists are more (less) aggressive than type 1 fundamentalists. Of course, the same interpretation holds for s 2 and type 2 speculators: a positive (negative) value of s 2 now means that type 2 chartists are more (less) aggressive than type 2 fundamentalists. It is convenient to express the model in terms of deviations from its fundamental value.
Using auxiliary variable u t � P t − F, (6) yields Let us write v t � − s b u t− 1 ; then, (7) can be expressed as a two-dimensional discontinuous map: where ′ denotes the unit-time advancement operator and . is is the map we explore in detail in the rest of the paper. In this paper, we analyze the map under the following assumption: Assumption 1. e condition 0 < s b < 1 is assumed hereafter. All the results that follow rely on this assumption.

Some Preliminary Properties
e first property is that parameter z is a scale variable. (8) is topologically conjugated to the map in (9).
Proof. In fact, by using the change of variable x � u/z, y � v/z and defining the aggregate parameter m � s a /z, our model in (8) becomes Note that m can be positive, negative, or zero. However, the two cases with a positive and negative sign of m are topologically conjugated to one another. We have the following.

Theorem 2.
e map T in (9) with m < 0 is topologically conjugated with the same map T with m > 0.
Proof. In fact, by using the change of variable x � − s, y � − t, the map in (9) leads to is property means that the results for m > 0 also hold for the case m < 0. In economic scenarios, the price dynamics of bearish trend followers are the same as those of bullish trend followers. So, in this paper, we only analyze the following cases: (1) trend followers are neutral, that is, m � 0; (2) trend followers are bullish, that is, m > 0. Model (9) can be expressed as , and T is represented by a two-dimensional PWL discontinuous map with two discontinuity borders. e map T has three branches: one locates in the middle of a region enclosed by two borders x � − 1 and x � 1 (denoted by T M ), and the others locate outside of the region (denoted by T O ). One is on the left side of the range |x| < 1 (denoted by T L ), and the other is on the right side of the range |x| < 1 (denoted by T R ). □ Theorem 3. e map T in (11) (i.e., (9)) is an invertible map all over its domain except x � ±1.
Proof. In fact, from (11), we have where e map T − 1 has three branches: one locates in the middle of a region enclosed by two borders y ′ � − s b and y ′ � s b (denoted by T − 1 M ), and the others locate outside of the region (denoted by T − 1 O ). One is above the range |y ′ | < s b (denoted by T − 1 A ), and the other is below the range |y ′ | < s b (denoted by T − 1 B ). To prove that the map in (11) is invertible all over its domain, we rewrite (11) as Because y ′ � − s b x and s b > 0, we have (11) is an invertible map all over its domain except x � ±1. □

The Dynamic Behavior of Model with Neutral Trend Followers
In this section, we study the dynamic behavior of trend followers at the stage of hesitation and wait-and-see when prices remain constant. Let us consider map T in (9); for the particular case m � 0, the map T becomes We are first going to describe some simple properties of the map defined by (15). e first one is immediate from its structure. Performing the change of variable x � − s, y � − t, the map is transformed into itself, which means that the phase space is symmetric with respect to the origin. We have so proved the following. Remark 1. In particular, a periodic orbit (p 1 , p 2 , . . . , p n ) has points symmetric with respect to the origin, or (− p 1 , − p 2 , . . . , − p n ) is also a periodic orbit. e origin is always fixed point of the system in (15). We denote the fixed point of middle subsystem (|x| < 1) by O M (0, 0) and the fixed point of outer subsystem (|x| > 1) by Since iterations from initial conditions in outer region |x| > 1 are influenced by the "nonexistent" fixed point, which is called a "virtual" fixed point, the fixed points O O and O M are stable when their eigenvalues are less than 1 in magnitude.
us, the fixed point O M is stable when the parameters satisfy the following condition: and the fixed point O O is stable when the parameters satisfy the following condition: We have the following.
; then, any initial condition other than O M has a divergent trajectory. We can consider the regions in the parameter space (s b , s 1 ), as summarized in Figure 2, where the regions (in light grey) with divergent dynamics are those already introduced in eorem 5, while those associated with the stability of the fixed point in the origin O M � (0, 0) (see the white regions in Figure 2) are described in the following. □ Theorem 6 (globally attracting fixed point). Suppose that s 2 > 0 (or s 2 < 0); consider the map T 0 with s 1 < − s 2 < 0 (or s 1 < 0) and s 1 > − 2 − 2s b (or s 1 > − 2 − 2s b ); then, the fixed point O M in the origin is globally attracting.
Proof. In fact, if − 2s b − 2 < s 1 + s 2 < 0, then O O is a virtual attractor located in the middle region. So any initial condition in the range |x| > 1 has a trajectory which, in a few iterations, enters the range |x| < 1 from which the trajectory converges to the origin, since O M is an attractor if − 2s b − 2 < s 1 < 0.
is leads to the central white region R in Figure 2. While the dynamics in the green regions are what we will focus on next, first, R(1) in Figure 2(a) and R(2) in Figure 2    shows the preimages of borders x � ±1. As the border of right side x � 1 (denoted by BR) for PWL map T 0 intersects with the borders of PWL map T − 1 0 (y � ±s b ) at two points A and B, it has three preimages. One locates in the middle range |x| < 1, and the others locate in the regions x < − 1 and x > 1, respectively. at is, , and BR B � T − 1 B (BR) are on the same line y � 1 − (1 + s b + s 1 + s 2 )x but with different locations. BR A locates on the left of the region |X| < 1 and the other BR B on the right of the region |X| < 1. As the points A and B locate on the borders of T − 1 0 , they thus can be considered as in the middle region |y ′ | < s b or in outer region |y ′ | > s b . ey have two preimages, that is, Similarly, the border of left side x � − 1 (denoted by BL) for PWL map T 0 has a similar situation. It has three preimages x but with different locations. e intersections C and D also have two preimages, respectively, that is, . Although virtual saddle O O does not exist, its stable and unstable manifolds exist in outer region |x| > 1. So trajectory in outer region |x| > 1 and away from the stable manifolds diverges along the unstable manifolds of saddle O O . From (15), we know that if |x| < 1, we have As shown in Figures 4(a) and 4(c), we can prove that any point in green regions and grey regions is  div.
Complexity mapped into the region |x| > 1 after two and three iterations, respectively, and thus has divergent trajectory. Now, we focus on the dynamics in green regions R(2) in Figure 2(a) and R(1) in Figure 2 ; O M is a flip (regular) saddle and O O is a virtual attractor (does not exist). Any trajectory starting in the range |x| > 1 is mapped into the region |x| < 1 due to the effect of a virtual attractor O O . Any trajectory starting in the range |x| < 1 is mapped into the region |x| > 1 after finite iterations along the unstable manifolds of O M (see Figure 5) and then comes back. is process continues and leads to the bounded invariant set. As we shall show later, this bounded invariant set may be periodic points or quasi-periodic trajectories and no chaotic orbit exists.
Let us first analyze the conditions leading to periodic dynamics. Let S: where First, we must note that A L � A R � A O , and by the basic property of the trace operator we have that tr( We can prove by induction that the trace is invariant under exchange sequence. For example,   Complexity 7 erefore, let (p + q + r) � n and suppose that p is the number of periodic points of n-cycle with symbol sequence S 0 , S 1 , . . . , S n− 1 in the region x < − 1 and q in the region |x| < 1 and r in the region at is, the n-cycle with symbolic sequence L p M q R r satisfies the following equation: We have so proved the following.
where p is the number of periodic points of the n-cycle in the region x > 1 and q in the region |x| < 1 and r in the region On the other hand, the fact that one of the eigenvalues is equal to 1 in the piecewise linear case means that the cycle cannot be a saddle. As s b < 1, only one eigenvalue of n-cycle is equal to 1, so the cycle is stable but is not attracting. As the existence of an invariant saddle is a precursor to chaotic dynamic behavior, there is no saddle periodic orbit except for the flip (or regular) saddle fixed point O M . However, there is no transversal homoclinic orbit between stable and unstable manifolds of saddle fixed point O M . In fact, for the case (s b , s 1 ) ∈ R(2) in Figure 2(a) (or (s b , s 1 ) ∈ R(1) in Figure 2(b)), O M is a flip (regular) saddle and its eigenvalues satisfy λ u < − 1 < λ s < 0 (0 < λ s < 1 < λ u ). It is easy to calculate the local stable and unstable manifolds of O M .
at is, S loc : s b x + λ s y � 0 and U loc : s b x + λ u y � 0. As their slopes It has three preimages: one is itself, and the others, denoted by always locate in the region |x| > 1 (see Figure 5), consider the local unstable manifold U loc is invariant under T M , and its image itself locates in the range |x| < 1. So U � U loc cannot intersect with Stransversally, and there is no transversal homoclinic orbit between the stable and unstable manifolds of saddle fixed point O M . We conclude that system (15) has periodic points or quasi-periodic trajectories and no chaotic attractor. e numerical results are qualitatively similar to those that can be obtained in a chaotic regime (see Figure 6). However, no chaotic regime can exist here. At all parameter values in region R(2) of Figure 2(a) and in region R(1) of Figure 2(b), there are either periodic points or quasi-periodic trajectories but there are no chaotic trajectories. is fact can also be verified by calculating the Lyapunov exponent for − 4.2 < s 1 < − 3. As shown in Figure 7, obtained with s b � 0.8, s 2 � 0.6, negative Lyapunov exponent implies that no chaotic regime can exist.

The Dynamic Behavior of the Model with Optimistic or Bullish Trend Followers
In this section, we study the dynamic behavior of the model with optimistic or bullish trend followers. We first give the divergence conditions of map system T in (9) and then present the existence and stability conditions of fixed points. e existence conditions of attracting coexistence fixed points, globally attracting fixed point, and attracting fixed point M * and saddle O * or O * are also presented. Finally, e existence and stability conditions of higher periodic attractors are investigated and BCB curves of period-2 are given. We find that there is homoclinic chaos in the case of m ≠ 0 which is quite different from that of m � 0.
respectively. e fixed points M * and O * are stable when their eigenvalues are less than 1 in magnitude. e stable conditions of fixed points M * (or M * ) and O * (or O * ) are (16) and (17), respectively (the same as the fixed points O M and O O in Section 4). en, from the stable conditions (16) and (17) and the admissibilities (21) and (22) of the fixed points, we have the following theorems.
Theorem 9 (divergence). Consider the map T with one of the following conditions:   (16) and (21), we know that M * is virtual attractor that locates in the region |x| > 1; if then, M * is a regular saddle (see the grey regions in Figure 9(b)).
then, trajectory starting from any initial condition in the plane converges to the fixed point O * . Consider the map T with one of the following conditions: en, trajectory starting from any initial condition in the plane converges to the fixed point M * .
Proof. For case (1), is an attractor and M * is a flip saddle (see the yellow region in Figure 8(a)).
For case (2), noting that 0 us, O * is an attractor and M * is a virtual attractor (see the yellow region in Figure 8(b)). For case (3), noting that s 2 < 0 and m < 2s b us, O * is an attractor. If − s 2 < m, then s 1 < − s 2 < m, and M * is a virtual attractor. If  Figure 9(a)). For case (4), noting that s 2 < 0 and then M * is a regular saddle (see the yellow region in Figure 9(b)). For case (5), * is a virtual attractor (see the cyan region in Figure 8(b)).
For case (6), noting that s 2 < 0 and us, M * is an attractor and O * is a virtual attractor (see the cyan region in Figure 9(a)). □ Theorem 13 (attracting fixed point and saddle). Consider the map T with one of the following conditions:   Figure 9(a)). (16) and (21), we know that the fixed point M * is an attractor. Noting that s 2 < 0 and (17) and (22), we know that the fixed point O * is a flip saddle (see the white region in Figure 9(b)). In all cases, the attractor M * is not globally attracting and has basins of attraction B(M * ). Any initial condition in B(M * ) (complement of B(M * ) ) has a divergent trajectory along the unstable manifolds of O O or O * (see Figure 10). □    14 Complexity

Higher Periodic and Chaotic Attractors
(1) Suppose that s 2 > 0 and en, trajectory starting from any initial condition converges to periodic and other bounded attractors.
Proof. For case (1), noting that    is results in a bounded orbit that may be periodic, semiperiodic, or chaotic (see the green region in Figure 8).
For case (2), noting that s 2 < 0 and m < Considering (17) and (22), we know that O * is an attractor and locates in the middle region |x| < 1. If (16) and (21) crosses x � ± 1, it is dragged to the outer region due to the virtual attractor M * located in |x| > 1. e state therefore gets locked between the two virtual attractors and that results in a bounded orbit. e same behavior is exhibited by an initial state in the middle region. is bounded orbit may be high periodic, semiperiodic, or chaotic. In case (b), if s 1 > m > 0, then M * is a regular saddle; if − m < 0 < s 1 < m, then M * is a virtual regular saddle. Noting that O * is a virtual attractor, trajectory starting from any initial state in the outer region is dragged to the virtual attractor O * located in the middle region; when it crosses x � ± 1, it is driven back toward the outer region along the unstable manifolds of regular saddle M * or M * . is also results in a bounded orbit that may be periodic, semiperiodic, or chaotic (see the green region in Figure 9(a)). For case (3), if − 2s b − 2 − s 2 < s 1 < − s 2 − m, noting that s 2 < 0 and 2s b + 2 + s 2 < m < 2s b + 2, then we have Considering (17) and (22), we know that O * is an attractor and it locates in the middle region |x| < 1. If m > − s 2 > 0, from (24), then s 1 < − s 2 < m and − 2s b − 2 < s 1 < − s 2 − m < 0. Considering (16) and (21), we know that M * is an attractor and it locates in the outer region |x| > 1; if m < − s 2 , we can consider the two cases (a) s 1 < 0 and (b) s 1 > 0. We can prove, by the methods similar to (2), that trajectory starting from any initial condition converges to periodic and other bounded attractors (see the green region in Figure 9(b)). Let us first analyze the conditions leading to periodic dynamics. Let S: Z ⟶ L, M, R { } be a periodic symbol sequence with minimal period n, n ≥ 1 (i.e., S i+n � S i for all n ≥ 1). For a periodic symbol sequence S 0 , S 1 , . . . , S n− 1 , let T S � T S n− 1°· · ·°T S 1°T S 0 denote the iteration of T following S. A straightforward expansion leads to where Let S (i) denote the ith shift permutation of S (e.g., if S � LLMR, then S (2) � MRLL). e ith point of an S-cycle, denoted by An S-period is admissible if every point lies on the correct side of |x| < 1 or on |x| > 1. e following formula results from manipulating (27): Admissibility is therefore determined by whether the absolute value of x S i is greater than 1, as described in the following theorem. □ Theorem 15 (admissibility). Suppose that m ≠ 0, det (I − M S (i) ) ≠ 0. en, the S-period is an admissible periodic solution of (11) if and only if if S i � L or R, then and if S i � M, then Furthermore, since T S (i) is an affine map, the S-period is asymptotically stable if and only if the eigenvalues lie strictly inside the unit circle. For two-dimensional maps, it is well known that stability relates to Jury conditions [36]. Suppose that m ≠ 0, det(I − M S (i) ) ≠ 0; then, the S-cycle is an asymptotically stable periodic solution of (11) if the following three conditions are satisfied: As we set, in this paper, 0 < s b < 1 and then det(M S ) � (s b ) n < 1; condition (3) always holds. If there is equality in at least one of (1)-(2) but the other condition is satisfied, then the S-period is stable (i.e., Lyapunov-stable) but not asymptotically stable. Equalities in (1)-(2) correspond to, in order, an eigenvalue of 1 and an eigenvalue of − 1. Note that det(I − M S ) ≡ 1 − tr(M S ) + det(M S ); hence, the assumption that det(I − M S ) ≠ 0 eliminates the possibility of equality in (1).
Stability conditions of period-2 with symbol sequences S � OM and S (1) where a � 1 + s b + s 1 .
e existence regions of period-2 with symbol sequences OM and MO are We thus have the following theorem.
and then period-2 with symbol sequence MO is attractor.
Setting |x S i | � 1 in (28), we get BCB curves of equations: We shall show that there is a chaotic orbit when m ≠ 0 in the mapping system (9), which is different from the case where m � 0. If a parameter set satisfies condition (1) in eorem 14, O * is a virtual attractor and it locates in the middle region |x| < 1, and M * is a flip saddle. en, any initial condition converges to a bounded attractor which may be a chaotic attractor. e Lyapunov exponent and onedimensional bifurcation diagram of mapping system (9) with respect to parameter s b are shown in Figures 11(a) and  Figure 11 is obtained with s 1 � − 4.5, s 2 � 3, m � 1, and (x 0 , y 0 ) � (0.3, 2). As shown in Figure 11(a), if s b > s b c , trajectory starting from initial condition (0.3, 2) may converge to a chaotic orbit. As shown in Figure 11(b), periodic, semiperiodic, or chaotic orbit may exist. Comparing the two figures, we know that although Lyapunov exponent is positive as s b > s b c , there may be a periodic orbit. Now we show that there is definitely a homoclinic chaos for a parameter set s b � 0.8, s 1 � − 4.5, s 2 � 3, m � 1. As shown in Figure 12 respectively. As U M intersects with the line x � 1 (the border of map T) at C, it has two images rooted on both sides of the line y � − s b , which is the border of map T − 1 . One is M * C M � T M (M * C) belonging to the unstable manifolds of M * and the other is As MO at P, and unstable manifolds of the flip saddle M * thus generate a chaotic attractor (see Figure 2(b)). We thus have the following theorem.
Theorem 17 (homoclinic chaos). Suppose that a parameter set satisfies condition (1)    20 Complexity mapping system (9) with respect to parameter s b are shown in Figure 3, obtained with s 1 � − 0.5, s 2 � − 3, m � 1, and (x 0 , y 0 ) � (0.5, − 0.3). As shown in Figure 13(a), if s b > s b c , trajectory starting from initial condition (0.3, 2) may converge to a chaotic orbit. As shown in Figure 13(b), periodic, semiperiodic, or chaotic orbit may exist. Comparing the two figures, we know that although Lyapunov exponent is positive as s b > s b c , there may be a periodic orbit. Now we show that there is definitely a homoclinic chaos for a parameter set s b � 0.95, s 1 � − 0.5, s 2 � − 3, m � 1 (see Figure 14 e local stable and unstable manifolds of P 1 are As S P intersects with the borderline y � s b at it has two preimages rooted on both sides of borderline x � − 1 at the points A − 1 M and A − 1 O , respectively. One is it has two preimages rooted on both sides of borderline x � − 1 at the points B − 1 M and B − 1 O , respectively. One is As U P intersects with the borderline x � 1 at C, it has two images rooted on both sides of borderline y � − s b at the points C M and C O , respectively. One is C M P 2 � T M (CP 1 ), and the other is U 1 O � T O (U p ). As U P intersects with the borderline x � − 1 at D, it has two images rooted on both sides of borderline y � s b at the points D M and D O , respectively. One is D M P 2 � T M (DP 1 ), and the other is It intersects with y � s b and y � − s b at two points C M (x(P 1 ) − (s b + λ u /(a + s 2 )s b )[y(P 1 ) + 1] + a + m, − s b ) and D M (x(P 1 ) − (s b + λ u /(a + s 2 )s b )[y(P 1 ) − 1] − a + m, − s b ), respectively. If A locates on the left side of D M and B on the right side of C M , then C M D M and S P have transversal homoclinic intersections and unstable manifolds of the flip saddle periodic orbit P 1 , P 2 and thus generate a chaotic attractor (see Figure 14(b)). We thus have the following theorem.

Summary and Conclusion
In this paper, we study a simple financial market model in which interactions between heterogeneous speculators can generate endogenous price dynamics. For two reasons, the model has a discontinuous piecewise linear shape: First, speculators (essentially) rely on linear technical and fundamental trading strategies. Second, while some of them are always active, others stop trading if the misalignment in the market drops below a certain threshold value. One advantage of the model's functional form is that it allows an in-depth and comprehensive investigation of its properties. As we incorporate trend followers and chartists and fundamentalists with entry level, the model dynamics are driven by 2-dimensional discontinuous map with two borderlines. is is a new dynamic model that we have not seen yet. We hope that our analysis is also useful for the investigation of similar dynamical systems. As m � s a /Z, if m � 0, then s a � 0; this implies that trend followers are neutral. e results for m > 0 also hold for the case of m < 0 due to the symmetry of the map T. If m ≠ 0, then trend followers are bullish (s a > 0) or bearish (s a < 0). We investigate the dynamical behavior of two cases, m � 0 and m ≠ 0, respectively. For map T 0 (in the case of m � 0 ), we give the conditions of having a divergent trajectory and the existence conditions of globally attracting fixed point. We present that the basins of locally attracting fixed point can be determined by the preimages of the borderlines of map T 0 . We also find that the existence condition of a nonzero n-cycle is that at least one of its eigenvalues is 1. We finally prove that the map T 0 cannot have chaotic attractors by the transversal homoclinic theory and Lyapunov exponent. For map T (in the case of m ≠ 0 ), we give the conditions of having a divergent trajectory and the existence conditions of attracting coexistence fixed point, globally attracting fixed point, and locally attracting fixed point. We present the existence conditions of higher periodic and other bounded attractors and the calculation methods of BCB curves. We also prove that the map T has chaotic attractors by the transversal homoclinic intersection of flip saddle periodic point and Lyapunov exponent. e results show that the dynamical behavior of bullish or bearish trend followers is more complex than that of neutral ones.
From an economic point of view, our simple model can help us explain the emergence of bubbles and crashes and excessive volatility. If the state of our system is unstable, we think that Complexity 21 stock market crash occurs. If the state of our system is quasiperiodic or chaotic, we think that stock market is in excessive volatility. As we have seen from eorems 5 and 9, market crash can be caused by either type 1 chartists dominating type 1 fundamentalists (s 1 � c 1 − f 1 > 0) or two types of chartists dominating two types of fundamentalists (s 1 + s 2 � c 1 + c 2 − f 1 − f 2 > 0). Market crash can also be caused by either type 1 fundamentalists (strongly) dominating type 1 chartists (s 1 < − 2s b − 2 < 0, i.e., f 1 − c 1 > 2 + 2s b ) or two types of fundamentalists (strongly) dominating two types of chartists (s 1 + s 2 < − 2s b − 2, i.e., f 1 + f 2 − c 1 − c 2 > 2 + 2s b ). Additional trend followers are useful for market stability if type 1 chartists or two types of chartists are dominated by too aggressive type 1 fundamentalists or two types of fundamentalists in stock market. is subverts our intuitive impression. In fact, when fundamentalists of type 1 or two types of fundamentalists are more aggressive than chartists, that is, s 1 < 0 or s 1 + s 2 < 0, if trend followers participate in trade, then s 1 + 2s b + 2 > 0, s 1 + s 2 + 2s b + 2 > 0 may hold. A financial market crash that occurs when s 1 < − 2s b − 2, s 1 + s 2 < − 2s b − 2 is not likely to happen. So market stability requires the speculative behavior of trend followers to offset overly aggressive fundamentalists. Keeping financial markets stable requires regulators to limit excessive speculation by chartists or fundamentalists and to balance the speculation of fundamentalists with that of trend followers. Our main results may be summarized as follows: Bubbles and crashes of financial markets can be caused by one of chartists or fundamentalists (of two types) dominating another. e speculative behavior of trend followers can rein in bubbles and crashes of financial markets when fundamentalists (strongly) dominate chartists. Even when trend followers are neutral or bullish, prices may tend to be overly volatile; price dynamics with bullish trend followers are more complex than those with neutral trend followers, such as coexisting attractors and chaos. Excessive volatility is caused by the quasi-periodic phenomenon for model of financial markets with neutral trend followers. However, excessive volatility is caused by the chaotic phenomenon for model of financial markets with bullish trend followers.
Data Availability e (MATLAB and IDMC software) data used to support the findings of this study are included within the supplementary information files.

Conflicts of Interest
e author declares that there are no potential conflicts of interest.