**1. Introduction**

Financial markets are complex systems whose functioning has been studied and discussed largely in literature. Conventionally, markets are seen as populated by rational investors that arbitrage away any possible predictable gain, thus what is left is just perturbation with null returns. However psychological forces unquestionably play a role in financial crashes, for example, it happened in 1929, on the Black Monday of October 1987, or in the dot.com bubble of 2001. Bubbles and crashes cannot be explained by an efficient market, where prices are supposed to reflect all the available information. Starting from empirical facts that cannot be explained by the efficient market hypothesis and observable features that can be seen as the outcome of speculative activities, a large stream of literature developed models in which prices are driven by the demand of heterogeneous market participants. The addressed issues consisted in understanding how irregular patterns, alternating periods of bull and bear markets, can be derivable from the way actors participate in the market. One of the first behavioral model in this direction was proposed in [1] with linear trading rules that were successively extended to non-linear versions in [2,3]. At the same time, imitative behavior and switching between investment styles have been also largely addressed to explain the emergence of fads, herding behavior, and financial bubbles [3–5]. Such a field intersects also with some empirical literature that looks at financial data searches for chaotic traces instead of randomity [6–9].

In the mentioned literature two rather standard approaches in terms of investment styles are considered: fundamental analysis and technical analysis. The fundamental

**Citation:** Fabretti, A. A Dynamical Model for Financial Market: Among Common Market Strategies Who and How Moves the Price to Fluctuate, Inflate, and Burst? *Mathematics* **2022**, *10*, 679. https://doi.org/10.3390/ math10050679

Academic Editor: Arsen Palestini

Received: 10 January 2022 Accepted: 17 February 2022 Published: 22 February 2022

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

**Copyright:** © 2022 by the author. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

analysis supports the trading through a deep analysis of the real economy behind the asset and evaluating the future earnings; in this respect, a fundamental value will summarize the outcome of such analysis and will drive the trader's order submission. The technical analysis, based on graphs and indices, return trends and the market sentiment, provides concise tools to understand where the market is going. Professional traders rely both on technical and fundamental analysis to determine whether and how to participate in the market. Hence the model considers the price driven by a composite demand in which fundamentals and indices contribute together to move the price. Moreover, the third typology of component is considered, hereafter referred to as market makers' demand: market makers are specific entrepreneurs who accomplish the task to absorb excess demand if any. The fundamental and chartist demand components are assumed piecewise linear, indeed it is quite common that an investor does not participate continuously in the market rather she enters (buy) or exits (sell) the market if something gives her a signal of unfair prices or trend inversion; in other words, an investor submits an order, whatever it is, when something happens to suggest the presence of earning opportunities. Thus the model belongs to that part of literature that sees markets as financial dynamical systems and applies continuous and discontinuous piecewise smooth maps in economics and finance, as [10–12]; in the specific financial markets, see [13] for a review. In the present model, the chartist demand component is given by a common chartist investment strategy that uses the difference of moving averages to catch trend inversions. From the mathematical point of view, this leads to a large first-order difference equation system whose study is not so straightforward. The equilibrium points and their stability can be studied only partially; the bifurcations that occur belong to the class of border collision bifurcations for which analytical results are still limited to low order systems [14–16].

The analytical and numerical analysis confirm that demand based on fundamental analysis keeps prices around the fundamental value even when chaos appears. Demand based on technical analysis can in large amount contribute to enhancing the chaos of the system and the price oscillations, while market makers assume the role to stabilize the market. The presence in the market of investors, those who try to speculate without caring about fundamentals, generates dynamics that remove the price from its fundamental value because their action drives the market in the same direction the market goes, giving strength to the trend. A clear example of such a phenomenon is represented by the financial bubble (see [17,18]): increasing prices lead investors to buy, which feeds the price increase far away from its fundamental. On the other hand, when the price is so pumped, it starts a period of instability, then a crash can occur, or a smooth deflation will bring back the price near its fundamental. In the model each demand component is weighted by a specific parameter, the ratios between these parameters give the balance between the investment styles relative dominance. Results are anything but surprising, and in line with the related literature, however, the emergence of a situation in which the fundamental demand component alone generates periodic prices and small amounts of chartist demand push prices to converge. How can chartist demand push to equilibrium a periodic dynamic triggered by the fundamentals? In an attempt to answer this question: while the fundamental demand component generates a loop that feeds a periodic up and down of prices, the chartist demand component that moves in an opposite direction operates as softening the fundamental force resulting in a convergent price. One could argue that the interaction of different investments styles in the market generates disequilibrium in prices when their contribution is out of proportion, otherwise, the market moves chaotic without spikes or anomalies, apparently in line with the efficient market hypothesis. In other words, one can conclude that the observed instability does not derive from the presence of some specific investment style in itself, rather from a disproportion of their reciprocal contributions to form the total demand.

The novelty of the model stays in introducing: (a) a common chartist investment strategy that sees applied the moving averages; in particular, the difference between two moving averages, as used by technical analysis, involves the use of past prices in the long and short term, leading to a high order system whose study is anything but trivial to face; (b) the market makers demand so far has not experienced enough attention in the related literature. Future investigations will move in the direction of studying deeply the border collisions bifurcation in high order system as it occurs here; adding sophistication to the market makers demand via a piecewise map, which would be more reasonable from the economic point of view; developing a stochastic version of the model to replicate more realistically the market and allowing for calibration on real data.

The rest of the paper is organized as follows: Section 2 presents the model with all its components in details; Section 3 presents the analytical study of the system in each component, in the limit of their tractability; Section 4 presents numerical examples with relative observations and results; in Section 5 a general discussion on the model is provided; finally Section 6 concludes.

#### **2. A Financial Market Model**

The proposed model considers the price as moved by the market demand, driven by three rather standard components: a fundamental component, set according to a "fair" price deriving from fundamental analysis; a chartist component, that follows the market trend by using technical analysis, and a market makers component, that helps liquidity and price fluidity absorbing demand in excess.

Let *xt* and *yt* be the stock price and the demand at time *t*, respectively. They can be put in relation by a difference equation system of the type

$$\begin{aligned} x\_t &= a x\_{t-1} + b y\_{t-1} \\ y\_t &= y\_t^f + y\_t^c + y\_t^{\text{mm}} \end{aligned} \tag{1}$$

where *y<sup>f</sup> <sup>t</sup>* , *<sup>y</sup><sup>c</sup> <sup>t</sup>* and *ymm <sup>t</sup>* are the fundamental, chartist and market makers demands, respectively. The price is driven by past prices, just one step before, and the demand *yt*−1. The price dependence with respect to the past and the demand could be modeled in many different maps, for the sake of tractability the linear map remains one of the most adopted choices.

Under the action of the three market forces, prices will move up and down, showing stable, periodic, or chaotic behavior. Each market component can dominate more than others pushing the market to an equilibrium price or an erratic movement, that even in a stylized fashion can remind real market reproducing known stylized facts. Each component will be studied analytically and numerically, varying the specific parameters that balance the weight of each component. In the following, each component will be described in detail.
