Explaining the stylized facts of foreign exchange markets with a simple agent-based version of Paul de Grauwe’s chaotic exchange rate model

We propose a simple agent-based version of Paul de Grauwe’s chaotic exchange rate model. In particular, we assume that each speculator follows his own technical and fundamental trading rule. Moreover, a speculator’s choice between these two trading philosophies depends on his individual assessment of current market circumstances. Our agent-based model setup is able to explain a number of important stylized facts of foreign exchange markets, including bubbles and crashes, excess volatility, fat-tailed return distributions, serially uncorrelated returns and volatility clustering. A stability and bifurcation analysis of its deterministic skeleton provides us with useful insights that foster our understanding of exchange rate dynamics.


Introduction
According to the triennial survey of the Bank for International Settlements (2019), the foreign exchange market is the largest financial market in the world.
Moreover, its trading volume largely reflects speculative orders.Questionnaire studies, summarized by Menkhoff and Taylor (2007), reveal that speculators rely on technical and fundamental trading rules when determining their orders.
Technical trading rules derive trading signals from past price movements.Due to their extrapolative nature, technical trading rules typically trigger buy (sell) signals when they detect positive (negative) exchange rate trends.Fundamental analysis presumes that the exchange rate will return towards its fundamental value, suggesting to buy (sell) undervalued (overvalued) currencies.Foreign exchange market models by, for instance, Frankel and Froot (1986), Kirman (1991), Westerhoff (2003a), de Grauwe andGrimaldi (2005, 2006a), Manzan and Westerhoff (2007), Beine et al. (2009), de Grauwe and Kaltwasser (2012), Federici and Gandolfo (2012), de Grauwe and Markiewicz (2013), Goldbaum and Zwinkels (2014), Gori and Ricchiuti (2018) and Gardini et al. (2022), are based on such observations.The overarching message of the latter contributions is that the interplay between speculators relying on technical and fundamental trading rules accounts for a substantial part of the dynamics of exchange rates. 1   In this paper, we revisit the seminal exchange rate model proposed by de Grauwe andDewachter (1992, 1993) and de Grauwe et al. (1993).For ease of exposition, we refer to their work hereafter as "Paul de Grauwe's chaotic exchange rate model".Let us recall the main assumptions on which this model rests. 2 First of all, the exchange rate is driven by the expectations of two types of speculators, namely chartists and fundamentalists.Chartists base their expectations on past movements of the exchange rate, using extrapolative forecasting rules.In contrast, fundamentalists predict that the exchange rate will converge towards its 1 Zeeman (1974), Beja and Goldman (1980), Day and Huang (1990), Chiarella (1992), Lux (1992), Brock and Hommes (1998) and Farmer and Joshi (2002) propose similar chartist-fundamentalist models to study the dynamics of stock markets.fundamental value.Moreover, speculators' perceptions of the fundamental value of the exchange rate are normally distributed around its true fundamental value.
Finally, the market impact of chartists and fundamentalists depends on market circumstances.In particular, the market impact of fundamental analysis increases with mispricing in the foreign exchange market.
We can outline the main mechanism that causes endogenous exchange rate dynamics in Paul de Grauwe's chaotic exchange rate model as follows.Chartists' extrapolative expectations are destabilizing.Since chartists dominate the foreign exchange market near its fundamental value, their behavior tends to drive the exchange rate away from its fundamental value.Fundamentalists have stabilizing regressive expectations.These expectations become increasingly relevant for the determination of the exchange rate as its mispricing worsens, pushing back the exchange rate towards its fundamental value.Since this development automatically leads to a revival of technical analysis in the foreign exchange market, the exchange rate remains in constant motion.Interactions between chartists and fundamentalists may even lead to chaotic exchange rate dynamics.
In this case, the exchange rate oscillates almost erratically around its fundamental value, an outcome that triggers, at least in a stylized way, bubbles and crashes and excess volatility.
The goal of our paper is to show that Paul de Grauwe's chaotic exchange rate model is more powerful than previously appreciated.In fact, we demonstrate that a simple agent-based version of Paul de Grauwe's chaotic exchange rate model is able to replicate a number of important stylized facts of foreign exchange markets.Within our agent-based model setup, each speculator places orders based on his own technical and fundamental trading rule.We model this aspect by assuming that speculators' technical and fundamental trading rules contain two elements -a common deterministic element and an agent-specific random element.Moreover, a speculator's choice between technical and fundamental analysis is probabilistic and depends on his individual assessment of current market circumstances.To be precise, the probability that a speculator opts for fundamental analysis increases with the distance between the exchange rate and what he regards as its true fundamental value.Clearly, each speculator has his own view about the true fundamental value of the exchange rate.Finally, speculators also manage their speculative investment position.Overall, there are three agent-specific sources of randomness in our agent-based model setup, related to speculators' probabilistic rule-selection behavior, their perception of the exchange rate's fundamental value and their actual trading rules.Simulations reveal that our agent-based model setup is able to produce bubbles and crashes, excess volatility, fat-tailed return distributions, serially uncorrelated returns and volatility clustering.
A stability and bifurcation analysis of the deterministic skeleton of our agentbased model setup helps us to understand why this is the case.As it turns out, the exchange rate of the deterministic skeleton of our agent-based model setup is due to a three-dimensional nonlinear map, which, in turn, possesses a unique steady state at which the exchange rate is equal to its fundamental value.The local stability of this steady state depends, amongst other things, on how aggressively speculators rely on their trading rules.Simulations furthermore reveal that the map's nonlinearities may produce chaotic exchange rate dynamics, similar to those observed in Paul de Grauwe's chaotic exchange rate model.Essentially, we observe that the exchange rate runs away from (towards) its fundamental value when chartists (fundamentalists) dominate the foreign exchange market.
Activating the three agent-specific random elements of our agent-based model setup, simulated exchange rates start to mimic the behavior of actual exchange rates much more closely.The key functioning of our agent-based model remains as just described.Due to speculators' probabilistic rule-selection behavior, their perception of the exchange rate's fundamental value and their reliance on trading rules that contain random elements, however, the path of the exchange rate now resembles a random walk.Nevertheless, distinct bubbles may emerge when the majority of speculators opt for technical analysis.During these periods, we typically witness volatility outbreaks, occasionally associated with extreme changes in the exchange rate.The latter require that speculators receive similar trading signals.When fundamentalists regain control over the foreign exchange market, bubbles disappear and the volatility of the exchange rate decreases.As in the deterministic skeleton of our agent-based model setup, speculators eventually return to technical analysis.Investigating the trading activity of individual speculators reveals that their inventory management behavior has a stabilizing impact on the dynamics of the foreign exchange market.
Against this backdrop, we are tempted to draw the following general conclusions.
While the modeling of realistic exchange rate dynamics apparently requires the acknowledgement of some kind of stochastic influence factors, the main forces accountable for the dynamics of the exchange rate are deeply rooted in the nonlinear interplay between chartists and fundamentalists.In this sense, we argue that it is important to develop stylized chartist-fundamentalist models that offer new perspectives on the emergence of endogenous exchange rate dynamics.Of course, it is also necessary to check whether stochastic versions of these models have the power to explain the dynamics of the exchange rate in greater detail.
We continue as follows.In Section 2, we present a number of stylized facts of foreign exchange markets.In Section 3, we propose a simple agent-based version of Paul de Grauwe's chaotic exchange rate model.In Section 4, we study the behavior of this model's deterministic skeleton.In Section 5, we demonstrate that our agent-based model setup is able to mimic the behavior of actual exchange rates.Section 6 concludes our paper.Appendix A contains a number of robustness checks.

Stylized facts of foreign exchange markets
In this section, we recall five important stylized facts of foreign exchange markets.
As we will see, actual exchange rates give rise to (i) bubbles and crashes, (ii) excess volatility, (iii) fat-tailed return distributions, (iv) serially uncorrelated returns and (v) volatility clustering.Our attention focuses on the behavior of three major exchange rates, namely the US dollar versus the euro, the US dollar versus the British pound and the Japanese yen versus the US dollar, downloaded from the FRED database of the Federal Reserve Bank of St. Louis.All three time series run from January 1999 to September 2022 and comprise 5,959 daily observations.For more background on the statistical properties of actual exchange rates and tools to quantify them, we refer the reader to de Vries (1994), Guillaume (1997), de Grauwe andGrimaldi (2006b) and Westerhoff (2009).percent confidence intervals (thin gray lines), reflecting the random-walk-like nature of the USD/EUR exchange rate path.In contrast, the autocorrelation coefficients of absolute returns are significant for more than 100 lags, a clear sign of volatility clustering.Of course, the fact that periods of low volatility alternate with periods of high volatility is already visible from the second panel of Figure 1.
Figures 2 and 3 show the same statistical properties for the USD/GBP and the JPY/USD exchange rate, respectively.Note that these time series display bubbles and crashes, excess volatility, fat-tailed return distributions, serially uncorrelated returns and volatility clustering, too.Besides the visual evidence witnessed so far, we report in

A simple agent-based exchange rate model
In this section, we propose a simple agent-based model of the foreign exchange market that is consistent with the key assumptions of Paul de Grauwe's chaotic exchange rate model.However, we deviate from that model as follows.First, our starting point for modeling the foreign exchange market is that a market maker adjusts the exchange rate with respect to speculators' excess demand. 3Second, our agent-based model contains a discrete number of heterogeneous speculators.Third, each speculator places orders based on his own technical and fundamental trading rule.Fourth, a speculator's choice between these two trading philosophies depends on his individual assessment of current market circumstances.Fifth, each speculator has his own view about the true fundamental value of the exchange rate.Sixth, in order to prevent speculators' buying and selling activity from causing unreasonably large speculative investment positions in the foreign exchange market, we also consider their inventory management behavior.As we will see in Section 4, however, the dynamics of the deterministic skeleton of our stochastic agent-based model setup is very close to the original dynamics.
Let us turn to the details of our agent-based model setup.As already mentioned, we consider two types of market participants -a market maker and  heterogeneous speculators.The market maker mediates speculators' orders out of equilibrium and adjusts the exchange rate in response to their excess demand.
We denote the order placed by speculator  in period  by    .Then, the market 3 Such a modeling scenario is in line with the empirical evidence provided by Evans and Lyons (2002), according to which the order flow is the dominant driver of the exchange rate.A marketmaker scenario is also used in the exchange rate models by Manzan and Westerhoff (2007), de Grauwe and Kaltwasser (2012) and Gardini et al. (2022).In de Grauwe et al. (1993), the exchange rate depends directly on speculators' exchange rate expectations.
maker quotes the log exchange rate for period  + 1 as where parameter  > 0 indicates how strongly the market maker changes the exchange rate with respect to speculators' order imbalances.Obviously, the market maker increases the exchange rate when speculators' buying orders exceed their selling orders, and vice versa.
Although the log fundamental value  of the exchange rate is constant, speculators have heterogeneous views about it.Within Paul de Grauwe's chaotic exchange rate model, these views are normally distributed around the true fundamental value of the exchange rate.We formalize speculator 's perception of the log fundamental value in period  as where    ~(0,1).Parameter   > 0 regulates the dimension of speculators' perception errors.However, speculators display no systematic prediction error.
In a given period, speculator  uses either a technical or a fundamental trading rule.The probability that speculator  will pick the technical trading rule is equal to where  0 and  1 are positive switching parameters.Naturally, the probability that speculator  will opt for fundamental analysis is then Let us discuss the rationale behind (3) and ( 4).If the exchange rate is near its fundamental value, speculator  chooses the technical trading rule with a relatively high probability, hoping to benefit from exchange rate trends.As mispricing of the foreign exchange market increases, however, speculator  is more and more convinced that a fundamental market correction is about to set in.In such an environment, speculator  selects the fundamental trading rule with a relatively high probability. 4Parameters  0 and  1 influence the bell-shaped function of   , as follows.Parameter  0 marks the maximum probability with which speculator  will rely on technical analysis.For  0 = 0.05 and  �   =   , for instance, we obtain   , ≈ 0.95.In contrast, larger values of parameter  1 make it more likely that speculator  will switch to fundamental analysis as the misalignment in the foreign exchange market increases.
The actual order placed by speculator  in period  depends on two components -a speculative component and an inventory control component.Let   , and   , stand for speculator 's speculative order component, as suggested by his technical and fundamental trading rule, and    for his inventory control operations.
We formalize speculator 's order placement in period  as follows Two aspects deserve attention here.First, speculators' probabilistic ruleselection behavior adds a random element to the dynamics of the exchange rate.
Second, probabilities   , and   , depend on the perceived fundamental value  �   , which, in turn, is subject to normally distributed random shocks.
Speculators' fundamental trading rules presume that the exchange rate will return to its fundamental value.Hence, we formulate speculator 's fundamental exchange rate forecast for period  + 1 in period  as Parameter 0 < ′ < 1 denotes speculators' expected mean reversion speed.
Since the fundamental trading rule suggests submitting buying (selling) orders when the fundamental forecasting rule indicates that the exchange rate increases (decreases), we express the speculative order component triggered by speculator 's fundamental trading rule as where  ′′ > 0 and  =  ′  ′′ > 0. Due to speculator 's perception of the exchange rate's fundamental value, his fundamental trading rule entails a random element.
Technical trading rules rely on past movements of the exchange rate as an indicator of market sentiment, which are extrapolated into the future.Although de Grauwe et al. (1993) discuss several technical trading rules, their main attention focuses on a rule that bets on an increase (decrease) in the exchange rate when a short-term moving average of the exchange rate crosses a long-term moving average of the exchange rate from below (above).Following their lead, we formalize the exchange rate's short-term moving average by   = (  −  −1 ) and the exchange rate's long-term moving average by   = 0.5(  −  −2 ).
Over time, speculators' fundamental and technical trading behavior may lead to the build-up of larger speculative investment positions in the foreign exchange market.In fact, speculator 's position in the foreign exchange market evolves as Due to the strong variability of the exchange rate, such positions may entail a substantial level of risk, which is why speculators may seek to limit their speculative investment positions.We formalize speculators' inventory management behavior as follows.Let  �  stand for speculator 's desired (longrun) speculative investment position in the foreign exchange market.To manage his inventory, speculator  engages in inventory control orders where parameter 0 <  < 1 marks the strength of speculator 's inventory management.For instance, speculator  submits inventory control buying orders in addition to his speculative buying or selling orders if his current speculative investment position in the foreign exchange market falls short of his desired position.While speculators are obviously risk-averse, our agent-based model setup implies that the market maker is risk-neutral.Since the market maker absorbs speculators' excess demand, his position is the opposite of speculators' aggregate speculative investment positions, say As we will see in Section 5, one consequence of speculators' inventory management is that the market maker's position remains bounded, too.For this reason, we abstain from modeling the market maker's inventory management.
Instead, we assume that the market maker is risk-neutral, which makes his exchange rate quotation economically consistent. 6  Before we continue, we note that our simple agent-based version of Paul de Grauwe's chaotic exchange rate model has -besides the exchange rate's log fundamental value , the total number of speculators  and speculators' desired inventory positions  �  -eight additional parameters that need to be set to simulate its dynamics.These are  > 0,  > 0, 0 <  < 1,  > 0,  0 > 0,  1 > 0,   > 0 and   > 0.Moreover, the model features three agent-specific sources of randomness, associated with speculators' perception of the true fundamental value, their probabilistic switching between technical and fundamental analysis and their actual trading rules.
6 Unfortunately, market participants' inventory management is not yet well understood and, consequently, deserves more attention in the future.See Westerhoff (2003b), Franke and Asada (2008), Zhu et al. (2009), Carraro and Ricchiuti (2015) and Bargigli (2021) for some preliminary work in this direction.

Properties of the deterministic skeleton
To facilitate the understanding of the functioning of our simple agent-based model setup, we first explore the behavior of its deterministic skeleton.Setting   =   = 0 implies that (1) speculators correctly perceive the exchange rate's true fundamental value, i.e.
�   =  (13) and that (2) speculators' technical and fundamental trading rules lose their agentspecific stochastic elements.For analytical tractability, we furthermore do not keep track of the behavior of individual speculators, an aspect that also precludes modeling their inventory management behavior.Hence, a speculator's technical and fundamental trading rules reduce to and respectively.Assuming that there is a continuum of speculators with mass , we can express the market shares of speculators relying on technical and fundamental analysis as and respectively.Consequently, the equation that describes the market maker's exchange rate adjustment simplifies to which completes the description of the model setup.
Accordingly, the exchange rate corresponds to its fundamental value when the dynamics is at rest.The Jacobian matrix of map  at the steady state  reads From ( 21), we obtain the characteristic polynomial where . Using the stability and bifurcation results by Lines et al. (2020) and Gardini et al. (2021), we can conclude that the steady state  of map  loses its local stability if one of the following three stability conditions becomes broken: (i) Moreover, a separate violation of stability condition (i), (ii) or (iii), while the other two stability conditions hold, is associated with the emergence of a fold, a flip and a Neimark-Sacker bifurcation, respectively.Stability condition (i) is always satisfied, as can easily be checked.Stability condition (ii) results in If this inequality becomes violated, the steady state  of map  loses its local stability via a flip bifurcation, giving rise to zigzag exchange rate dynamics.In contrast, stability condition (iii) requires that If this inequality becomes violated, the steady state  of map  loses its local stability via a (supercritical) Neimark-Sacker bifurcation, giving rise to quasiperiodic exchange rate dynamics.Hence, the exchange rate becomes unstable when speculators rely too heavily on their technical or fundamental trading signal. 7Stability conditions (i) to (iii) determine when a steady state of a three-dimensional map loses its local stability.To derive necessary and sufficient conditions for such a steady state to be locally stable, it is relevant to check a fourth stability condition, namely (iv) | 3 | < 1.Since the latter condition is automatically met when (24) holds, ( 23) and ( 24) constitute necessary and sufficient conditions for the steady state  to be locally stable.
The following proposition summarizes our analytical results.A few comments are in order: • Simulations indicate that parameter  merely controls the level around which exchange rate fluctuations occur.For ease of exposition, we assume that the log fundamental value is equal to  = 0.
• It is clear from our analysis in Section 4 that parameter  is a scaling parameter, which is why we set  = 1.
• We also assume that speculators prefer a net position of zero in the foreign exchange market.Hence, we fix  �  = 0 for all speculators.
• Moreover,  = 0.005 reflects a half-life of speculators' inventory position of about 138 trading periods, roughly equivalent to 6 months.
• Since questionnaire evidence by Menkhoff and Taylor (2007) reveals that a small fraction of speculators always rely on fundamental analysis, we decided to set  0 = 0.05.
• To reduce the computational burden of our simulations, we focus on  = 100 speculators, representing, for instance, large institutional players in the foreign exchange market.Keeping track of all the quantities captured by building blocks (1) to ( 11) requires simulating 1,001 model equations for  = 100 speculators.Doubling the number of speculators would increase the number of model equations to 2,001 equations, and so on.However, Appendix A contains a number of robustness checks that suggest that our agent-based model setup may also yield reasonable exchange rate dynamics when the number of speculators increases to  = 1,000 and  = 2,500.9 • We identified the remaining five model parameters, i.e. , ,  1 ,   and   , via a cumbersome trial and error process with the aim of matching the behavior of actual exchange rates.
• The simulated exchange rate depicted in Figure 6 oscillates within a rather static band that is centered around its constant fundamental value.We conduct two further experiments to address this issue.In Figure 7, we model the evolution of the log fundamental value of the exchange rate in the form of a random walk, i.e.
with   ~(0,1).In our simulations, we set   = 0.0015.Clearly, the term     reflects a random fundamental (news) shock.The path of the fundamental value of the exchange rate is shown by the gray line in the first panel of Figure 7.
Moreover, we assume that the market maker takes into account the fundamental (news) shock when adjusting the log exchange rate, resulting in Since the standard deviation of simulated changes in the log exchange rate, equal to 0.00622, is about four times higher than   , the simulated exchange rate is still excessively volatile.In Figure 8, the log fundamental value of the exchange rate follows an AR(1) process, represented by with   ~(0,1).Again, the market maker takes into account the change in the log fundamental value when adjusting the log exchange rate, yielding For   = 0.0015 and  = 0.999, the standard deviation of simulated changes in the log exchange rate, equal to 0.00620, is again about four times higher than   .Note that both experiments lend the simulated exchange rate a less static appearance, without interfering with its ability to mimic the statistical properties of actual exchange rates.
In fact, Figures 6 to 8 highlight that our calibrated agent-based model setup is capable of producing bubbles and crashes, excess volatility, fat-tailed returns distribution, serially uncorrelated returns and volatility clustering.According to the first panel of Figure 9, the exchange rate is below its fundamental value between periods 4,000 and 4,200.As a result, the clear majority of speculators decide in favor of fundamental analysis and, not surprisingly, their trading behavior pushes the exchange rate slowly upwards, reducing mispricing in the foreign exchange market.Around period 4,300, the market impact of chartists starts to increase.Speculators are now convinced that the current exchange rate trend will persist for a while, which is why they seek to exploit it.Their behavior sparks a self-fulfilling prophecy.Chartists' extrapolative trading behavior drives the exchange rate higher and higher, and a bubble process materializes.Since the exchange rate is a relative price, we may refer to this as a "positive bubble".Note that chartists' trading behavior also increases the volatility of the exchange rate.As can be seen, the volatility outburst contains a number of more pronounced changes in the exchange rate.Extreme changes in the exchange rate occur when sufficiently many chartists receive similar trading signals.Their orders then result in greater excess demand, prompting the market maker to adjust the exchange rate more significantly.
Overall, the exchange rate evolves quite erratically during this bubble episode.
For instance, there are brief periods when fundamental analysis is the dominant trading strategy, pulling the exchange rate temporarily back towards its fundamental value.In addition, technical analysis may also initiate downward movements of the exchange rate.Ultimately, the collapse of the bubble originates from both technical and fundamental trading. 10Around period 4,500, chartists' trading behavior creates a negative bubble, pushing the exchange rate far below its fundamental value.Consequently, the majority of speculators start to return towards fundamental analysis, resulting in rather calm exchange rate movements between periods 4,500 and 4,700.As fundamental orders eventually reduce mispricing of the exchange rate, a new market phase occurs.Many speculators now opt for technical analysis, thereby initiating the next bubble process, associated with another volatility outburst and extreme changes in the exchange rate.Once again, the exchange rate behaves quite erratically during the bubble process.This has to do with the fact that speculators' rule-selection behavior is probabilistic, and that their perception of the exchange rate's fundamental value and their trading rules are subject to random influence factors.11 The bottom panel of Figure 9  exchange rate, as quoted by the market maker.Moreover, the position of the market maker in the foreign exchange market is the mirror image of those of speculators, as is also clear from ( 12).This suggests that as long as the path of the exchange rate remains bounded -which is always the case in our simulations -the positions of the market maker in the foreign exchange market as well as those of speculators remain bounded, too.Naturally, this relationship works in both directions.Speculators' inventory control keeps the market maker's position in check and limits mispricing in the foreign exchange market.
Our A regime change occurs between period 4,300 and 4,500.All three speculators now pick their technical trading rules with a relatively high probability.Although orders stemming from technical trading rules have a larger random element (see the second panel of Figure 10), the three speculators tend to place buy orders.
This drives up the exchange rate and their speculative investment position in the foreign exchange market.In the long run, however, speculators' investment positions in the foreign exchange market circle around their desired target levels, i.e. around zero in our simulations.Similarly, the exchange rate oscillates around its fundamental value in the long run.Once again, we note that the exchange rate's random-walk-like evolution originates from agent-specific aspects of speculators' trading behavior, as visible from the quantities plotted in Figure 10.

Concluding remarks
De Grauwe andDewachter (1992, 1993) and de Grauwe et al. (1993) proposed one of the first behavioral exchange rate models featuring nonlinear deterministic interactions between chartists and fundamentalists.Their ingenious work tremendously fostered our understanding of the behavior of foreign exchange markets.Simply speaking, there are two dominant regimes in their model.In the first regime, chartists reign the foreign exchange market.This is the case when the exchange rate is near its fundamental value.Since chartists' behavior is destabilizing, the exchange rate disconnects from its fundamental value.In the second regime, fundamentalists govern the foreign exchange market.This is the case when the exchange rate is far from its fundamental value.Since fundamentalists' behavior is stabilizing, the exchange rate eventually returns to its fundamental value.Via an everlasting competition between these two regimes, i.e. between chartists and fundamentalists, their model may produce chaotic exchange rate dynamics.
In this paper, we sought to show that the explanatory power of Paul de Grauwe's chaotic exchange rate model is richer than previously appreciated.In particular, we proposed a simple agent-based version of Paul de Grauwe's chaotic exchange rate model that is capable of explaining a whole battery of stylized facts of foreign exchange markets.Most importantly, we assumed that each speculator places orders based on his own technical and fundamental trading rule.
Moreover, a speculator's choice between these two trading philosophies is probabilistic and depends on his individual assessment of current market circumstances.The latter aspect follows from the assumption that each speculator has his own view about the true fundamental value of the exchange rate.Speculators also monitor their speculative investment position in the foreign exchange market and adjust their order placement such that their speculative investment positions remain bounded.Based on our calibrated agent-based model setup, we documented that simulated exchange rates gave rise to bubbles and crashes, were excessively volatile, repeatedly displayed extreme movements, were hardly predictable and were subject to lasting volatility outbursts.
On a more general level, we dare to argue that speculators' switching between destabilizing technical trading rules and stabilizing fundamental trading rules is the main driver of the dynamics of the exchange rate.While the modeling of realistic exchange rate dynamics apparently requires the consideration of some kind of stochastic influence factors, the main force accountable for the dynamics of the exchange rate seems to us to be deeply rooted in the nonlinear interplay between chartists and fundamentalists.Using analytical and numerical tools from the research field of nonlinear dynamical systems to investigate chartistfundamentalist models lends us the opportunity to better understand the endogenous component of the dynamics of the exchange rate.
Since we kept our agent-based version of Paul de Grauwe's chaotic exchange rate model relatively simple, we conclude our paper by pointing out five avenues for future research.First, while speculators have different views about the exchange rate's fundamental value, their views are free from systematic perception errors.It may be interesting to add some kind of persistent optimism and pessimism in this respect.For instance, speculators may believe in a higher (lower) fundamental value when the exchange rate increases (decreases).
Second, we have not yet considered social interactions between speculators, although there is evidence of herding behavior in foreign exchange markets.It may be worth placing speculators on a network and letting their switches between technical and fundamental trading rules also depend on their neighbors' behavior.
Third, the parameters that characterize the behavior of all speculators are identical.We could allow for more heterogeneity among speculators by relaxing this assumption, i.e. by drawing these parameters from certain distributions.
Fourth, we added a random variable to the expectation rule of chartists to capture part of the variety of existing technical expectation rules.While this keeps the deterministic skeleton of our agent-based model setup analytically tractable, it adds an exogenous component to our approach.We may reduce the relevance of this exogenous component by considering more than one technical expectation rule.A speculator's technical trading rules may even evolve over time.Fifth, we calibrated our agent-based model setup such that it mimics a number of important statistical properties of exchange rates.Future work may seek to estimate our agent-based model setup, i.e. by applying tools such as the method of simulated moments.In this respect, it would be desirable to account also for characteristics that capture the trading behavior of individual speculators, e.g.their order placement and inventory management behavior.
To sum up, we hope that our paper serves others as a playground to shed further light on the true potential of Paul de Grauwe's chaotic exchange rate model.In general, we believe that empirically based chartist-fundamentalist models offer reasonable descriptions of what is going on in foreign exchange markets.
Needless to say, much more can and needs to be done to understand the captivating behavior of exchange rates.Free access to all publications at: www.uni-bamberg.

Figure 1
Figure 1 illustrates the behavior of the USD/EUR exchange rate.The black line in the first panel of Figure 1 presents the evolution of the USD/EUR exchange rate in the time domain; the gray line marks its mean.The boom-bust behavior of the USD/EUR exchange rate is truly remarkable.Between 1999 and 2003, for instance, the USD/EUR exchange rate decreased by around 30 percent.Over the next five years, the USD/EUR exchange rate not only recovered from this sharp decline, but also increased by nearly 100 percent.The second panel of Figure 1 reports the corresponding returns, defined as changes in log exchange rates in percent.The average absolute return of the USD/EUR exchange rate is about 0.44 percent, i.e. the USD/EUR exchange rate changed by 0.44 percent per trading day over this period.The largest and smallest returns for this time series are equal to 4.62 percent and -3.00 percent, respectively.Most economists regard such exchange rate fluctuations as excessive.The black dots in the third panel of Figure 1 visualize the log probability density function of normalized returns of the USD/EUR exchange rate; the gray line depicts what we would expect to see from standard normally distributed returns.Obviously, the returns of the USD/EUR exchange rate are not normally distributed.In particular, their distribution displays fat tails.The fourth panel of Figure 1 shows autocorrelation functions of raw returns (gray line) and absolute returns (black line) for the first 100 lags.Almost all autocorrelation coefficients of raw returns are within their 95 Combining (13) to (18) yields the deterministic skeleton of our agent-based model setup.Using the auxiliary variables  +1 =   and  +1 =   , we obtain the threedetermines the behavior of the exchange rate.Parameters , , , ,  0 and  1 are positive; parameter  is unrestricted.In the following, we explore map .Straightforward computations reveal that map  possesses the unique (fundamental) steady state  = ( ̅ ,  � ,  � ) = (, , ).

Proposition 1 :
Figure5presents the dynamics of the deterministic skeleton of our agent-based model setup for  = 0,  = 1,  = 1,  = 10,  = 0.3,  0 = 0.05 and  1 = 2,500.Note that this parameter setting corresponds to the uttermost right scenarios depicted in Figure4in which  = 10.The first two panels of Figure5show the development of the log exchange rate and the corresponding weights of chartists in the time domain.These two panels are useful to understand what is going on in the foreign exchange market.Note that the majority of speculators opt for the technical trading rule when the log exchange rate is near its log fundamental value.Since the trading behavior of chartists is destabilizing, their orders push the log exchange rate away from its log fundamental value.However, when the log exchange rate is far away from the log fundamental value, speculators favor the fundamental trading rule.The orders placed by fundamentalists have a stabilizing effect on the dynamics of the foreign exchange market and drive the log exchange rate closer towards its log fundamental value.As the log exchange rate returns to its log fundamental value, chartists regain control over the foreign exchange market and the above pattern repeats itself, albeit in an intricate manner.Indeed, the dynamics of the exchange rate is chaotic.We can conclude this from the fact that a strange attractor appears when we plot the log exchange rate in period  + 1 against the log exchange rate in period .See the third panel of Figure5.8 Initial conditions for the log exchange rate and speculators' positions are equal to zero, i.e. identical to their steady-state values.Exchange rate fluctuations are set in motion via the random elements of our agent-based model setup.Let us start with Figure6.Its first panel shows that the exchange rate (black line) circles in a complex fashion around its fundamental value (gray line).Note that the exchange rate's boom-bust behavior may span several years, although such behavior can also be rather short-lived.The second panel of Figure6reports the corresponding return dynamics.Since the fundamental value is constant, changes in the exchange rate are excessive.The third panel of Figure 6 reveals that the distribution of the returns possesses fat tails.Indeed, extreme exchange rate movements occur more frequently than warranted by a comparable normal distribution.The gray line in the fourth panel of Figure 6 depicts the autocorrelation coefficients of raw returns.Since the autocorrelation coefficients of raw returns are not significant, the evolution of the exchange rate resembles a random walk.The black line in the fourth panel portrays the autocorrelation function of absolute returns.Obviously, there is significant evidence of volatility clustering.*** Figures 6 to 8 about here *** shed light on the internal functioning of our agent-based model setup, focusing on an excerpt of simulation run #1 that extends from period 4,000 to period 5,000 (see Figure6for the whole simulation run).Since we calibrated our agent-based model setup to daily data, 1,000 observations reflect a time span of four years.The four panels of Figure9depict the evolution of the exchange rate, the corresponding returns, speculators' average probability of selecting the technical trading rule and their aggregate speculative investment position in the foreign exchange market, respectively.The four panels of Figure10show the probabilities of selecting the technical trading rule, the speculative investment positions, the speculative orders and the inventory control operations of three speculators, marked purple, pink and cyan, respectively.*** Figures 9 and 10 about here *** presents speculators' aggregate investment position in the foreign exchange market.As can be seen, speculators' aggregate investment position in the foreign exchange market evolves proportionally to the 10 An interesting feature of the deterministic element of speculators' technical trading rules, as proposed byde Grauwe et al. (1993), is that it may already generate a sell signal when the exchange rate's upward movement starts to slow down.Of course, sell signals may also originate from the technical trading rules' random elements.
agent-based model setup allows us to keep track of the behavior of individual speculators.According to the third panel of Figure10, the three speculators that we track here have a negative speculative investment position in the foreign exchange market between periods 4,000 and 4,200.Consequently, their inventory management operations result in buy orders, as witnessed by the fourth panel of Figure10.Furthermore, all three speculators select the fundamental trading rule with a relatively high probability.Since the exchange rate is below its fundamental value, speculators opting for the fundamental trading rule tend to place speculative buy orders, which further reduces their speculative investment position in the foreign exchange market.Together, the fundamentally motivated speculative orders and the inventory control transactions reduce mispricing of the exchange rate.

Figure 1 :
Figure 1: The USD/EUR exchange rate.The first panel shows the evolution of the USD/EUR exchange rate from January 1999 to September 2022, containing 5,959 daily observations.The second panel shows the corresponding return dynamics.The third panel shows the log probability density function of normalized returns.The fourth panel shows autocorrelation functions of raw returns (gray line) and absolute returns (black line).

Figure 2 :
Figure 2: The USD/GBP exchange rate.The first panel shows the evolution of the USD/EUR exchange rate from January 1999 to September 2022, containing 5,959 daily observations.The second panel shows the corresponding return dynamics.The third panel shows the log probability density function of normalized returns.The fourth panel shows autocorrelation functions of raw returns (gray line) and absolute returns (black line).

Figure 3 :
Figure 3: The JPY/USD exchange rate.The first panel shows the evolution of the USD/EUR exchange rate from January 1999 to September 2022, containing 5,959 daily observations.The second panel shows the corresponding return dynamics.The third panel shows the log probability density function of normalized returns.The fourth panel shows autocorrelation functions of raw returns (gray line) and absolute returns (black line).

Figure 5 :
Figure 5: Deterministic dynamics.The first two panels present the log exchange rate and the weight of chartists in the time domain.The third panel shows the log exchange rate in period  + 1 versus the log exchange rate in period .Parameter setting:  = 0,  = 1,  = 1,  = 10,  = 0.3 and  = 2,500.

Figure 6 :
Figure 6: Simulation run #1.The first panel shows the evolution of simulated exchange rates (black line) and their fundamental values (gray line) for 6,000 observations.The second panel shows the corresponding return dynamics.The third panel shows the log probability density function of normalized returns.The fourth panel shows autocorrelation functions of raw returns (gray line) and absolute returns (black line).

Figure 7 :
Figure 7: Simulation run #2.The first panel shows the evolution of simulated exchange rates (black line) and their fundamental values (gray line) for 6,000 observations.The second panel shows the corresponding return dynamics.The third panel shows the log probability density function of normalized returns.The fourth panel shows autocorrelation functions of raw returns (gray line) and absolute returns (black line).

Figure 8 :
Figure 8: Simulation run #3.The first panel shows the evolution of simulated exchange rates (black line) and their fundamental values (gray line) for 6,000 observations.The second panel shows the corresponding return dynamics.The third panel shows the log probability density function of normalized returns.The fourth panel shows autocorrelation functions of raw returns (gray line) and absolute returns (black line).

Figure 9 :
Figure 9: Excerpt of simulation run #1.The panels show the evolution of the exchange the corresponding returns, speculators' average weight of selecting the technical trading rule and their total speculative investment position, respectively.

Figure 10 :
Figure 10: Behavior of three individual speculators.The show the probability of selecting the technical trading rule, the speculative orders, the speculative investment position and the inventory control operations of three individual speculators, marked purple, pink and cyan, respectively.The dynamics corresponds to the simulations depicted in Figure 9.
Table 1 estimates of key summary statistics for our exchange rate data.The first block of Table 1 contains the smallest return, the largest return and the first four moments of the distribution of the returns.The second and third blocks of Table 1 present selected autocorrelation coefficients for raw returns and absolute returns, respectively.In Section 5, we explore the extent to which our simple agent-based version of Paul de Grauwe's chaotic exchange rate model is able to replicate these statistical properties.
survey on technical analysis in financial markets, there is a myriad of different technical forecasting rules.To capture at least part of the variety of the technical predictors applied in foreign exchange markets, we add a random element to speculator 's technical forecasting rule.Together, this results in

Table 2
supports this finding.Estimates of the summary statistics for actual exchange rate data, reported in Table1, and simulated exchange rate data, reported in Table2, are quite similar.Extreme returns may be larger than 3 percent.The level of the volatility of simulated and actual exchange rates is comparable.Estimates of the mean and skewness indicate that the distribution of returns is symmetric.In addition, there is clear evidence of excess kurtosis.While returns are serially uncorrelated, autocorrelation coefficients of absolute returns indicate significant volatility clustering.However, the autocorrelation coefficients for absolute returns seem to us to be slightly too high at shorter lags and slightly too low at larger lags.**Table2abouthere *** Having established that the behavior of simulated exchange rate data closely resembles the behavior of actual exchange rate data, let us now turn to the question why this is the case.Figures 9 and 10 * 173 Jan Schulz and Daniel M. Mayerhoffer, A Network Approach to Consumption 174 Roberto Dieci, Sarah Mignot and Frank Westerhoff, Production delays, technology choice and cyclical cobweb dynamics 175 Marco Sahm, Optimal Accuracy of Unbiased Tullock Contests with Two Heterogeneous Players 176 Arne Lauber, Christoph March and Marco Sahm, Optimal and Fair Prizing in Sequential Round-Robin Tournaments: Experimental Evidence 177 Roberto Dieci, Noemi Schmitt and Frank Westerhoff, Boom-bust cycles and asset market participation waves: momentum, value, risk and herding 178 Stefanie Y. Schmitt and Dominik Bruckner, Unaware consumers and disclosure of deficiencies 179 Philipp Mundt and Ivan Savin, Drivers of productivity change in global value chains: The Impact of Macroeconomic Activity and Yield Valuation on Mergers and Acquisitions in Europe 186 Daniel M. Mayerhoffer and Jan Schulz, Social Segregation, Misperceptions, and Emergent Cyclical Choice Patterns 187 Sarah Mignot, Fabio Tramontana and Frank Westerhoff, Complex dynamics in a nonlinear duopoly model with heuristic expectation formation and learning behavior 188 Leonhard Ipsen, Armin Aminian and Jan Schulz, Stress-testing Inflation Exposure: Systemically Significant Prices and Asymmetric Shock Propagation in the EU28 189 Sarah Mignot and Frank Westerhoff, Explaining the stylized facts of foreign exchange markets with a simple agent-based version of Paul de Grauwe's chaotic exchange rate model de/en/economics/research/wp/ Working Paper Series (most recent publications) reallocation vs. innovation 180 Thomas Daske and Christoph March, Efficient Incentives with Social Preferences 181 Alexander Hempfing and Philipp Mundt, Tie formation in global production chains 182 Roberto Dieci, Sarah Mignot, Noemi Schmitt and Frank Westerhoff, Production delays, supply distortions and endogenous price dynamics 183 Stefan Dürmeier, A Model of Quantitative Easing at the Zero Lower Bound 184 Stefanie Y. Schmitt, Competition with limited attention to quality differences 185 Fabio E.G. Röhrer, Christian Proaño and Lebogang Mateane,