**3. The Analytical Study**

Fundamental and chartist components are piecewise linear maps of first and *L* + 1 order. In the present section, fundamental and chartist demand components are first considered singularly and analytically studied to the limit of their tractability, then they will be studied together. The market makers' demand will not be considered alone because this lacks economic sense.

#### *3.1. The Model with Fundamental Demand*

Let us start with the map

$$\begin{cases} \mathbf{x}\_t = a\mathbf{x}\_{t-1} + by\_{t-1} \\ \mathbf{y}\_t = c \arctan(\upsilon - \mathbf{x}\_{t-1}). \end{cases} \tag{10}$$

The system can be re-written in one equation

$$a\mathbf{x}\_t = a\mathbf{x}\_{t-1} + bc\arctan(v - \mathbf{x}\_{t-2}),\tag{11}$$

which is a one-dimensional map but a second-order difference equation. This map admits a positive fixed point lower than *v* for <sup>1</sup>−*<sup>a</sup> bc* <sup>&</sup>gt; 0, a negative fixed point for <sup>1</sup>−*<sup>a</sup> bc* < *m*<sup>∗</sup> and one negative and two positive fixed points greater than *v* for *m*<sup>∗</sup> < <sup>1</sup>−*<sup>a</sup> bc* < 0, where *m*<sup>∗</sup> is given by

$$m^\* = \frac{1}{1 + (v - x\_s^\*)^2},\tag{12}$$

given *x*∗ *<sup>s</sup>* to be the solution of the equation

$$\frac{x\_s^\*}{1 + (v - x\_s^\*)^2} + \arctan(v - x\_s^\*) = 0.$$

The local/global stability of such points can be studied numerically; the trajectories appear in some cases non-trivial, but a full analytical study is hindered by the presence of the arctang. The map in (10) can be approximated by a two-dimensional piecewise smooth map, which shows interesting behavior, and it is more analytically tractable. Note that parameters in the piecewise smooth map can be set to have a continuous map that approximates (10), the calculation is straightforward. For the sake of simplicity, we use the same notations even if they might differ.

Let us consider now the piecewise linear map

$$\begin{cases} \mathbf{x}\_t = a\mathbf{x}\_{t-1} + by\_{t-1} \\ \mathbf{y}\_t = c(\upsilon - \mathbf{x}\_{t-1})\chi(\mathbf{x}\_{t-1})\_{[v-\delta, v+\delta]} - d\chi(\mathbf{x}\_{t-1})\_{(v+\delta,\infty)} + d\chi(\mathbf{x}\_{t-1})\_{(\alpha, v-\delta)} \end{cases} \tag{13}$$

which can be written in a normal form

$$z\_t = \begin{cases} A\_1 z\_{t-1} + d \stackrel{\rightarrow}{1} & \mathbf{x}\_{\mathfrak{n}} < \boldsymbol{\upsilon} - \boldsymbol{\delta} \\\ A\_2 z\_{t-1} + c \stackrel{\rightarrow}{\underline{\boldsymbol{\upsilon}}} & \boldsymbol{\upsilon} - \boldsymbol{\delta} \le \mathbf{x}\_{\mathfrak{n}} \le \boldsymbol{\upsilon} + \boldsymbol{\delta} \\\ A\_1 z\_{t-1} - d \stackrel{\rightarrow}{1} & \mathbf{x}\_{\mathfrak{n}} > \boldsymbol{\upsilon} + \boldsymbol{\delta} \end{cases},\tag{14}$$

where *zt* = (*xt*, *yt*), −→*v* = (*v*, 0) , −→<sup>1</sup> = (0, 1) and

$$A\_1 = \begin{pmatrix} a & b \\ 0 & 0 \end{pmatrix}, \quad A\_2 = \begin{pmatrix} a & b \\ -c & 0 \end{pmatrix}.$$

The phase space of this map is divided by the borderlines *x* = *v* − *δ*, *x* = *v* + *δ* into 3 regions <sup>L</sup><sup>1</sup> :<sup>=</sup> {(*x*, *<sup>y</sup>*) <sup>∈</sup> <sup>R</sup><sup>2</sup> : *<sup>x</sup>* <sup>&</sup>lt; *<sup>v</sup>* <sup>−</sup> *<sup>δ</sup>*}, <sup>L</sup><sup>2</sup> :<sup>=</sup> {(*x*, *<sup>y</sup>*) <sup>∈</sup> <sup>R</sup><sup>2</sup> : *<sup>v</sup>* <sup>−</sup> *<sup>δ</sup>* <sup>≤</sup> *<sup>x</sup>* <sup>≤</sup> *<sup>v</sup>* <sup>+</sup> *<sup>δ</sup>*} and <sup>L</sup><sup>3</sup> :<sup>=</sup> {(*x*, *<sup>y</sup>*) <sup>∈</sup> <sup>R</sup><sup>2</sup> : *<sup>x</sup>* <sup>&</sup>gt; *<sup>v</sup>* <sup>+</sup> *<sup>δ</sup>*}; in each region the dynamics follows a linear map continuous in its relative region. The map is invertible if *bc* = 0. By a straightforward calculation we find that the map owns three fixed points *Oi* ∈ L*<sup>i</sup>* with *i* = 1, 2, 3,

$$\begin{array}{ll} O\_1 = \left(\frac{bd}{1-a}, d\right) & \text{if } & \frac{bd}{1-a} < v - \delta \\ O\_2 = \left(\frac{bcv}{1-a+bc}, cv\frac{1-a}{1-a+bc}\right) & \text{if } & v - \delta \le \frac{bcv}{1-a+bc} \le v + \delta \\ O\_3 = \left(-\frac{bd}{1-a}, -d\right) & \text{if } & -\frac{bd}{1-a} > v + \delta \end{array} \tag{15}$$

Each of these three points exists in an own existence region according to parameters value (*a*, *b*, *c*, *d*, *δ*, *v*). In order to determine the stability, we need to calculate the eigenvalues of matrices *A*<sup>1</sup> and *A*2, where the characteristic polynomials are

$$p\_1(\lambda) = \lambda(a - \lambda), \qquad p\_2(\lambda) = \lambda^2 - a\lambda + bc.$$

Since *p*1(*λ*) admits *λ* = 0 and *λ* = *a* as roots, *O*<sup>1</sup> and *O*<sup>3</sup> are stable if *a* < 1. The polynomial *<sup>p</sup>*2(*λ*) has discriminant <sup>Δ</sup> <sup>=</sup> *<sup>a</sup>*<sup>2</sup> <sup>−</sup> <sup>4</sup>*bc* that depicts different stability regions according to *a*, *b*, *c* values. The curve Δ = 0 partitions the space

R<sup>3</sup> into two regions where the eigenvalues are


The bifurcation conditions are given by

$$\begin{array}{ll}\text{Period} & \textit{doubling}(flip): & 1+a+bc=0\\\text{Saddle} & -node(foldbf.): & 1-a+bc=0\\\text{Neimark} & \textit{Sacker}: & bc=1.\end{array} \tag{16}$$

In Figure 1 (**left**) the stability regions and the bifurcation curves are represented in the (*a*, *b*) plane with *c* = 1, while in (**middle**) the stability regions and the bifurcation curves are represented in the (*b*, *c*) plane with *a* = 1. In Figure 2 (**left:right**) the bifurcation surfaces are shown in the (*a*, *b*, *c*) space. The conditions for the asymptotic stability are

$$\begin{array}{rcl} 1 - \text{Tr}(A\_2) + \text{Det}(A\_2) &=& 1 + a + bc > 0 \\ 1 + \text{Tr}(A\_2) + \text{Det}(A\_2) &=& 1 - a + bc > 0 \\ \text{Det}(A\_2) &=& bc < 1. \end{array}$$

In Figure 1 the asymptotic stability region is highlighted by the striped area. Simulations and relative discussion of this case are reported in Section 4.

**Figure 1.** In (**a**) on the left hand side the bifurcation conditions together with the asymptotic stability region of the map in Equation (14) are represented in the plane (*a*,*b*) with *c* = 1; In (**b**) on the right-hand side the bifurcation conditions together with the asymptotic stability region are represented in the plane (*b*,*c*) with *a* = 1. The green area corresponds to complex eigenvalues, the blue one to real eigenvalues; the black lines denote the flip and fold bifurcation, the red line marks the Neimarck Sacker bifurcation and the striped area characterizes the asymptotic stability region.

**Figure 2.** (**left**), (**middle**), (**right**) show the three bifurcation conditions in Equation (16) represented in the space (*a*,*b*,*c*).

#### *3.2. The Model with Fundamental and Market Makers Demands*

In the following section, we consider fundamental demand together with market makers. Considering market makers alone have a poor economical meaning, for this reason, it is more of interest to the presented case. We have the following system

$$\begin{cases} \mathbf{x}\_t = a\mathbf{x}\_{t-1} + by\_{t-1} \\ \quad y\_t = c(\upsilon - \mathbf{x}\_{t-1})\chi(\mathbf{x}\_{t-1})\_{[\upsilon-\delta,\upsilon+\delta]} - d\chi(\mathbf{x}\_{t-1})\_{(\upsilon+\delta,\infty)} + d\chi(\mathbf{x}\_{t-1})\_{(\alpha\upsilon\nu-\delta)} - d\_my\_{t-1} \end{cases}, \tag{17}$$

which corresponds to a normal form as in (14) where

$$A\_1 = \begin{pmatrix} a & b \\ 0 & -d\_m \end{pmatrix}, \quad A\_2 = \begin{pmatrix} a & b \\ -c & -d\_m \end{pmatrix}.$$

Matrices *A*<sup>1</sup> and *A*<sup>2</sup> are invertible if *adm* = 0 and −*adm* + *bc* = 0, respectively. As in (13) the phase space is divided in 3 regions L*i*, with *i* = 1, 2, 3 and a straightforward calculation brings to the following fixed points

$$\begin{array}{ll} O\_1 = \left( \frac{bd}{(1-a)(1+d\_m)}, \frac{d}{1+d\_m} \right) & \text{if } & \frac{bd}{(1-a)(1+d\_m)} < \upsilon - \delta\\ O\_2 = \left( \frac{bc\upsilon}{(1-a)(1+d\_m)+bc}, \upsilon \frac{1-a}{(1-a)(1+d\_m)+bc} \right) & \text{if } & \upsilon - \delta \le \frac{b\upsilon\upsilon}{(1-a)(1+d\_m)+bc} \le \upsilon + \delta \end{array} \tag{18}$$
 
$$\begin{array}{ll} O\_3 = \left( -\frac{bd}{(1-a)(1+d\_m)}, -\frac{d}{1+d\_m} \right) & \text{if } & -\frac{bd}{(1-a)(1+d\_m)} > \upsilon + \delta \end{array} \tag{19}$$

Now the parameters set includes the new parameter *dm*. The characteristics of polynomials are

$$p\_1(\lambda) = (-d\_m - \lambda)(a - \lambda), \qquad p\_2(\lambda) = \lambda^2 + (d\_m - a)\lambda - ad\_m + bc.$$

In L<sup>1</sup> and L<sup>3</sup> eigenvalues are always real and fixed points are stable if *a* < 1 and *dm* < 1. Flip bifurcation occurs at *a* = 1 and *dm* = 1, fold bifurcation occurs at *a* = 1 and *dm* <sup>=</sup> <sup>−</sup>1, while Neimarck Sacker bifurcation occurs when *<sup>a</sup>* <sup>=</sup> <sup>−</sup> <sup>1</sup> *dm* . The stability region in L<sup>2</sup> is given by the conditions

$$\begin{array}{l}(1-a)(1+d\_{m})+bc>0\\(1+a)(1-d\_{m})+bc>0\\bc-ad\_{m}<1\end{array}\tag{19}$$

and bifurcation conditions are

$$\begin{array}{ll} \text{Period} & \text{double}(flip): & (1+a)(1-d\_m) + bc = 0\\ \text{Saddle} - node(foldbf.): & (1-a)(1+d\_m) + bc = 0\\ \text{Neimark} & \text{Soker}: & bc - ad\_m = 1 \end{array}$$

Assuming that *dm* ∈ [0, 1] which is economically reasonable, in Figure 3 stability regions and bifurcation curves are plotted with *c* = 1 (lhs) and *a* = 1 (rhs). The triangular region moves accordingly the effect of *dm*, while the hyperboles on the right-hand side moves up and down accordingly.

**Figure 3.** In (**a**) on the left hand side the bifurcation conditions together with the asymptotic stability region of the map in Equation (17) are represented in the plane (*a*, *b*) with *c* = 1; In (**b**) on the righthand side the bifurcation conditions together with the asymptotic stability region are represented in the plane (*b*,*c*) with *a* = 1. In green the area in which eigenvalues are complex, in blue where eigenvalues are real, the black lines denote the flip and fold bifurcations, the red line marks the Neimarck Sacker bifurcation, and the striped area characterizes the asymptotic stability region. The Figure can be compared with Figure 1 to see that the presence of market makers enlarge the stability region.

## *3.3. The Model with Chartist Demand*

Considering only the chartist component, the model takes the form

$$\begin{cases} \mathbf{x}\_t = a\mathbf{x}\_{t-1} + by\_{t-1} \\ \quad y\_t = e \cdot \left( \frac{1}{\mathbb{S}} (\mathbf{x}\_{t-1} - \mathbf{x}\_{t-1-\mathbb{S}}) - \frac{1}{\mathbb{L}} (\mathbf{x}\_{t-1} - \mathbf{x}\_{t-1-L}) \right) \chi(D), \end{cases} \tag{20}$$

where *D* = {*xi with i* = *t* − *L* − 1, ... , *t* − 1 | *doat*−<sup>1</sup> · *doat*−<sup>2</sup> < 0}. It is a system of order *L* + 1, that can be transformed into a *L* + 2 system of first order as following

$$\begin{cases} \begin{aligned} \mathbf{x}\_{t+1}^{(1)} &= a\mathbf{x}\_{t}^{(1)} + b\mathbf{x}\_{t}^{(2)}(t) \\ \mathbf{x}\_{t+1}^{(2)} &= e \cdot \left(\frac{1}{\mathcal{S}} (\mathbf{x}\_{t}^{(1)} - \mathbf{x}\_{t}^{(S+2)}) - \frac{1}{\mathcal{L}} (\mathbf{x}\_{t}^{(1)} - \mathbf{x}\_{t}^{(L+2)})\right) \chi(D) \\ \mathbf{x}\_{t+1}^{(3)} &= \mathbf{x}\_{t}^{(1)} \\ \mathbf{x}\_{t+1}^{(4)} &= \mathbf{x}\_{t}^{(3)} \\ \vdots \\ \mathbf{x}\_{t+1}^{(S)} &= \mathbf{x}\_{t}^{(S-1)} \\ \vdots \\ \mathbf{x}\_{t+1}^{(L+2)} &= \mathbf{x}\_{t}^{(L+1)} \end{aligned} \tag{21}$$

Let be **z***<sup>t</sup>* = (*x* (1) *<sup>t</sup>* , *x* (2) *<sup>t</sup>* , ... , *x* (*L*+2) *<sup>t</sup>* ), the system takes the normal form **z***<sup>t</sup>* = *A***z***t*−<sup>1</sup> in *D*, where

$$A = \begin{pmatrix} a & b & 0 & \cdots & \cdots & 0 \\ \frac{\varepsilon}{S} - \frac{\varepsilon}{L} & 0 & \cdots & 0 & -\frac{\varepsilon}{S} & \cdots & \frac{\varepsilon}{L} \\ 1 & 0 & 0 & & \cdots & 0 \\ 0 & 0 & 1 & 0 & & \cdots & 0 \\ & \vdots & 0 & 0 & 1 & 0 & \cdots & 0 \\ & \vdots & 0 & \vdots & 0 & \ddots & \cdots & 0 \\ & \vdots & 0 & & 0 & \ddots & 1 & 0 \\ & \vdots & 0 & & 0 & \cdots & 0 & 1 \end{pmatrix}.\tag{22}$$

Outside *<sup>D</sup>* the system collapses in *xt* <sup>=</sup> *axt*−1, which has the trivial solution *xt* <sup>=</sup> *<sup>a</sup><sup>t</sup> x*0. The characteristic polynomial is given by

$$p(\lambda) = a\_1 \lambda^{L+2} + a\_2 \lambda^{L+1} + a\_3 \lambda^L + a\_4 \lambda^{L-S-1} + a\_5$$

where *<sup>a</sup>*<sup>1</sup> = (−1)*L*, *<sup>a</sup>*<sup>2</sup> = (−1)*L*+1*a*, *<sup>a</sup>*<sup>3</sup> = (−1)*L*+1*<sup>b</sup> e <sup>S</sup>* <sup>−</sup> *<sup>e</sup> L* , *<sup>a</sup>*<sup>4</sup> = (−1)*<sup>L</sup> eb <sup>S</sup>* , and *a*<sup>5</sup> = (−1)*L*+<sup>1</sup> *eb <sup>L</sup>* . In this case the study of the stability region is not trivial.
