Nominal exchange rate determination and dynamics in an OLG framework

The empirical evidence on nominal exchange rate dynamics shows a long-run relationship of this variable with the fundamentals of the economy, although such relationship disappears at shorter horizons. This apparently contrasting behaviour of the nominal exchange rate can be explained in an overlapping generations model where the currencies are not perfect substitutes. In this framework, we show that the nominal exchange rate is pinned down by the fundamentals at the monetary steady state. We study the local dynamics and show that when the monetary steady state is locally indeterminate, then fluctuations of the nominal exchange rate around its long-run value can emerge. In particular, we prove the existence of stationary sunspot equilibria, where random fluctuations of the nominal exchange rate arise as a result of self-fulfilling beliefs.


Introduction
famously argued that "a flexible exchange rate need not be an unstable exchange rate. If it is, it is primarily because there is underlying instability in the economic conditions governing international trade". In other words, Friedman's view was that the exchange rate volatility that we observe between any two currencies is just a symptom of the volatility of the fundamentals of the underlying economies. However, the notion that there is a strong correlation between exchange rates and fundamentals has been widely questioned over the years. More precisely, two empirical regularities have emerged from the literature. On the one hand, there is evidence that the long-run value of the exchange rate is somewhat tied to fundamentals. 1 On the other hand, it is very difficult to understand and predict its behaviour at shorter horizons. 2 Any macroeconomic model that wishes to capture these puzzling dynamics of the nominal exchange rate should therefore have two main properties: on the one hand, the nominal exchange rate should be a function of the fundamentals at the steady state of the economy; at the same time, there should exist equilibria where the nominal exchange rate fluctuates around its long-run value but not as a result of randomness in the fundamentals of the economy. However, in existing monetary open economy models the nominal exchange rate is either always pinned down by the fundamentals (e.g. Lucas 1982;Obstfeld and Rogoff 1995) or always indeterminate (e.g. Kareken and Wallace 1981).
The aim of this paper is then to propose a simple model which possesses both the above-mentioned empirical regularities. In a two-country, two-currency OLG model where the two currencies are not perfect substitutes, we show that while the nominal exchange rate is pinned down by the fundamentals of the economies at the monetary steady state, fluctuations of the nominal exchange rate around its long-run value can arise even in the absence of shocks to economic fundamentals. We also establish conditions for the existence of stationary sunspot equilibria, where self-fulfilling beliefs are the driving force of nominal exchange rate fluctuations.
For this purpose, we study a two-country overlapping generations model with two consumption goods and two currencies. In this economy, agents live for two periods and they are endowed with a country-specific good. 3 They are also subject to cashin-advance constraints, in the sense that they need the domestic (foreign) currency 1 3 Nominal exchange rate determination and dynamics in an OLG… to buy the domestic (foreign good). The timing works as follows. At the beginning of the first period, agents sell their endowment to buy a portfolio of domestic and foreign currency. Next, they spend part of their money holdings to acquire the consumption goods in the current period while keeping the remaining balances to fund consumption next period. Therefore, both currencies can be used as stores of value. In the second period, the old do not have access to currency markets so they simply spend the currencies acquired when young in the respective goods' markets. The lack of participation of old people in currency markets is motivated by empirical evidence showing that investors' behaviour is characterised by considerable inertia, which is even more acute during old age. 4 Once a portfolio is chosen, investors seem not to readjust their portfolio even if market conditions change. A common explanation for this empirical finding is that the costs associated with actively managing a portfolio (which typically involve collecting and processing information) are simply too high. When that is the case, e.g. Bacchetta and Van Wincoop (2010) and Kim et al. (2016) show that it is indeed optimal for agents' not to readjust their portfolio. 5 This friction, combined with the cash-in-advance constraints, implies that young agents choose their portfolio of currencies taking into account their future demand for the two goods. As a consequence, the relative value of the two currencies today (i.e. the nominal exchange rate) is linked to the old's marginal utility for the two goods and their expected prices. For instance, if the domestic good is expected to be more expensive in the following period, the domestic currency has a lower purchasing power. This leads to a lower demand for the domestic currency, hence to an exchange rate depreciation in the current period.
Our model differs significantly from the standard OLG model with one good and one currency which has been extensively studied in the literature. 6 To start with, we need to track the dynamic behaviour of three endogenous variables (instead of one): the prices of the two consumption goods and the nominal exchange rate. Moreover, we have two dynamic inequality constraints in the price of both goods and the nominal exchange rate, which require that the demand for the domestic currency is always positive. 7 For a CES utility function which is additively separable across the two goods (as well as intertemporally separable), we show that the model is analytically tractable as the dynamics of each of the two goods' prices can be studied independently from one another. More specifically, we show that the dynamic behaviour of the world economy can be fully characterised by: (1) two difference equations in the two prices; (2) an equation for the nominal exchange rate, which is pinned down by the expected prices of the two goods, and finally (3) the two dynamic inequality constraints.
In this context, we prove that the nominal exchange rate is determined by the fundamentals of the economy at the monetary steady state. Two among the determinants of the exchange rate, relative money supplies and aggregate endowments, are common to other monetary models of exchange rate determinacy (e.g . Frankel 1979;Lucas 1982). 8 In our setting, the nominal exchange rate also depends on how much of each good is saved by the young, as currencies serve the function of stores of value. In particular, higher savings of the domestic good are associated with an appreciation of the domestic currency. As the young's excess supply of a good increases, its price falls and hence the purchasing power of the domestic currency in units of the domestic good increases. As the domestic currency is worth more, then its demand increases, hence the appreciation in equilibrium. Therefore, our model is consistent with empirical evidence showing that fundamentals such as relative money supply and output drive the behaviour of the nominal exchange rate at long horizons (see, e.g. Cerra and Saxena 2010;Rapach and Wohar 2012).
Next, we demonstrate why econometricians struggle to find a strong correlation between the exchange rate and the fundamentals of the economy at shorter horizons. Firstly, we study the local dynamics around the monetary steady state and prove that the monetary steady state is indeterminate under some parameter conditions. This implies that there are multiple paths of the nominal exchange rate converging to the monetary steady state. Therefore, randomness in the fundamentals is not required to generate exchange rate fluctuations around the monetary steady state.
Secondly, we investigate whether fluctuations of the nominal exchange rate around the monetary steady state can emerge as a result of self-fulfilling beliefs. In particular, we study the conditions under which stationary sunspot equilibria exist. As Azariadis and Guesnerie (1986) argued, focusing on stationarity sunspot equilibria is important for two reasons: firstly, because stable beliefs can be the asymptotic outcome of learning processes; secondly, this is a first step towards understanding dynamical sunspot behaviour. In a one-currency one-good economy, Azariadis (1981) showed that sufficient conditions for the existence of stationary sunspot equilibria are the complementarity between consumption and leisure and the local stability (indeterminacy) of the monetary steady state. In our framework, we prove that if similar conditions hold, then stationary sunspot equilibria exist. In particular, we show that self-fulfilling beliefs that prices are stochastic can generate random fluctuations of the nominal exchange rate. For instance, suppose that agents believe that the price of good 1 goes down. This implies that the real interest rate in country 1 (measured as the change over time in the purchasing power of the domestic currency in units of the domestic good) goes up. We show that this leads to an immediate appreciation of currency 1. Hence, the nominal exchange rate follows a stochastic process merely dictated by agents' beliefs.
Nominal exchange rate determination and dynamics in an OLG… This paper shows that it is then possible to construct equilibria which replicate the two main features of the dynamics of the nominal exchange rates: while our model can easily rationalise the weak relationship between the exchange rate and fundamentals in the short-run, empirical evidence which points at the higher predictability of the nominal exchange rate in the long run can also be reconciled within this framework. In our main model set-up, we assume that there is no consumption home bias for tractability reasons. This implies that the purchasing power parity (PPP) condition holds by assumption. 9 However, it is well known that PPP does not actually hold empirically (see, e.g. Obstfeld and Rogoff 2001;Rogoff 1996). As Itskhoki and Mukhin (2017) argue, this is one of the main aspects of the "exchange rate disconnect puzzle". In fact, the nominal exchange rate does not seem to be disconnected just from the fundamentals but also from other macroeconomic variables such as inflation differentials. This is corroborated by the fact that there seems to be a strong correlation between the real and the nominal exchange rate in the data (see also Burstein and Gopinath 2014).
We then introduce home bias in consumption to depart from the PPP condition. In this framework, we show that there is comovement between the nominal and the real exchange rate consistently with the data.
Finally, we show that our main results are not sensitive to the friction in currency markets. We change the timing of the model allowing old agents to choose the portfolio of currencies that they require to buy the consumption goods. At the same time, we impose that the young can only use the domestic currency as a store of value, to avoid that the nominal exchange rate is always constant and indeterminate as in Kareken and Wallace (1981). As in our main setup, the steady-state nominal exchange rate depends on fundamentals and it can be locally indeterminate, giving rise to the possibility of fluctuations unrelated to shocks to the fundamentals. 10 Our paper significantly contributes to the theoretical debate on the (in) determinacy of the nominal exchange rate. In particular, our framework provides a solution to the well-known indeterminacy problem arising in Kareken and Wallace's (KW) overlapping generations model (1981), which is documented in many textbooks such as Ljungqvist and Sargent (2004) and Champ et al. (2016). This can be briefly explained as follows. When agents have more than one currency to use as store of value, then agents would regard the two currencies as perfect substitutes. There are infinitely many portfolios which are consistent with agents' consumption choices, and each real variables' equilibrium path is associated with any arbitrary constant value of the nominal exchange rate. Differently from our paper, there is no equation that pins down the relative demand for the two currencies, and hence their relative price.
Our paper is also related to the following contributions on sunspot equilibria in open economy: Manuelli and Peck (1990), King et al. (1992), Russell (2003), Li (2014), Pietra and Salto (2013) and Platonov (2019). Although these contributions are able to explain why it is difficult to predict the exchange rate at short horizons, they fall short in capturing the empirical evidence on the long-run relationship between the exchange rate and fundamentals. The main reason is that, in their papers, the nominal exchange rate is always indeterminate.
The paper is structured as follows. In Sect. 2, we describe the model and show how the dynamic equilibrium system can be simplified. We characterise the monetary steady state in Sect. 3 and the local dynamics around it in Sect. 4. In Sect. 5, we investigate the conditions under which stationary sunspot equilibria exist. In Sect. 6, we explore some extensions and do some robustness exercises. Section 7 concludes. The derivations can be found in "Appendix 1", while the proofs in "Appendix 2".

The model
We study the following two-country pure exchange overlapping generations economy. Time is discrete, and a generic date is indicated with t. At each t, an agent is born in each country with a two-period lifetime, where a = 1, 2 refers to age. We indicate with h = 1, 2 the agent living in country h while = 1, 2 refers to the good or the currency. For instance, c ah,t is the consumption of good of the agent born in country h in period of life a at time t. Agents are endowed with a country-specific good in both periods of life: agents born in country 1 (2) are endowed with good 1 (2). Since our objective is to show that there exist fluctuations in the nominal exchange rate not related to fluctuations in the fundamentals, we assume that endowments are stationary. Hence, (y 1 a1 , y 2 a1 ) = (y 1 a , 0) and (y 1 a2 , y 2 a2 ) = (0, y 2 a ) for every a. There also exists a generation that lives only in period 0. These agents are "the old" at time 0 and are endowed with some units of the domestic currency and the domestic good. The total endowment of the two currencies is indicated with M 1 and M 2 and the monetary authorities are inactive in the following periods.
The main features of our model are the following. Firstly, the two currencies are not perfect substitutes, in the sense that each of them cannot be used to buy any good. In fact, we assume that currency 1 (2) can only buy good 1 (2) in a cashin-advance fashion. In addition, the old are not allowed to change their portfolio before spending the currencies in the respective goods' markets. As we stressed in the introduction, the lack of participation to currency markets of the old is consistent with empirical evidence showing that investors are characterised by considerable inertia, especially during old age. 11 Previous literature argues that this behaviour can be explained by the high costs that agents need to incur to actively manage a portfolio. If the costs are sufficiently high, investors' inertia is then entirely consistent with rational behaviour. 12

3
Nominal exchange rate determination and dynamics in an OLG… The budget constraints of an agent born in country h at date t are therefore the following: At the beginning of the period, the young are endowed with some wealth w 1h,t . Since agents are only endowed with a country-specific good, the wealth of the two agents when young is respectively w 11,t ∶= p 1 t y 1 1 and w 12,t ∶= p 2 t e t y 2 1 . We indicate with p t the price of good in units of the domestic currency and with e t the nominal exchange rate or the price of currency 2 in units of currency 1, where the latter is the numéraire currency. Firstly, young agents sell their initial endowment (to the old) to buy the two currencies (Eq. 1). m h,t are the money purchases of agent h of currency at the beginning of the period, while m h,t denotes the money holdings at the end of the period. In fact, m h,t will partly be spent to buy the country-specific good in the current period (Eqs. 2, 3), while the rest will be saved to buy the consumption good in the next period. In other words, Eqs. (2) and (3) are the cash-in-advance constraints of the young.
When old, agents use the money saved in the previous period to buy the consumption goods in the respective markets (Eqs. 4,5). 13 It can be observed that the constraints of the young can be consolidated into the following constraint: Therefore, the problem of an agent born in country h is to choose consumption allocations 1h,t ∶= (c 1 1h,t , c 2 1h,t ) , 2h,t+1 ∶= (c 1 2h,t+1 , c 2 2h,t+1 ) and a portfolio allocation where > 0 is the elasticity of substitution and ∈ (0, 1] is the discount factor. 14 The Lagrangian as well as the (necessary and sufficient) first-order conditions of the agents' maximisation problem can be found in "Appendix 1".
Combining Eqs. (51)-(54), it can be shown that the nominal exchange rate is pinned down by the following equation: Firstly, the nominal exchange rate depends on the old's marginal utility for the two goods. For instance, if the marginal utility of good 2 goes up, then the agent demands more currency 2 which leads to a currency appreciation ( e t increases). Secondly, it is linked to the two currencies' expected return, as measured by their purchasing power. An appreciation of currency 2 can also occur if the price of good 2 falls relatively more than the price of good 1. Since currency 2's purchasing power would increase in relative terms, then agents' demand for currency 2 would rise.
Differently from Kareken and Wallace (1981), we have an Eq. (8) which pins down the path of the nominal exchange rate. Since agents cannot readjust their portfolios when old, they make their portfolio decision at t looking only at the future prices of the two goods without taking into account the relative value of the two currencies at t + 1 . On the contrary, if old agents were allowed to participate to currency markets, agents would take into account e t+1 when making their decision. However, the two currencies would be seen as perfect substitutes as stores of value. Hence, there would be no equation to pin down the value of the nominal exchange rate, as in Kareken and Wallace (1981). Each real allocation can be supported by any constant value of e. 15 Rearranging the first-order conditions, we find agents' portfolios by calculating the optimal demand for the two currencies 16 : Nominal exchange rate determination and dynamics in an OLG… It can be noticed that agents' demand for the foreign currency is always positive, since they are not endowed with the foreign good. The holdings of the domestic currency are instead positive as long as the numerators of (9) and (12) are strictly positive. In particular, we have that Since the right-hand side of both equations is greater than one, it follows that a necessary (but not sufficient) condition for money holdings of the domestic currency to be positive in each country, is: The value of the endowment when old must be sufficiently small as compared to the value of the endowment when young, i.e. the economy must be Samuelsonian (Gale 1973). However, Eqs. (13) and (14) are more stringent than the standard Samuelsonian condition. In fact, the demand for the domestic currency will also depend on the price of the foreign good in the two periods. In particular, a higher price of the foreign good leads to a higher (lower) demand for the domestic good (and hence for the domestic currency) if the elasticity of substitution is higher (lower) than one.
Next, we plug (9)-(12) into the budget constraints and derive the optimal demands for the goods: Finally, the maximisation problem of the initial old and its solution can be found in "Appendix 1".

Monetary equilibrium
We are now ready to give a definition of monetary equilibrium.
Definition 1 A monetary equilibrium is any sequence of strictly positive nominal prices and exchange rates, for every a, h, and a strictly positive portfolio allocation, for every h, such that: 1. Each agent h maximises her utility function subject to her constraints at any t.

Goods' markets clear
In "Appendix 1", we derive the system of equations which characterises the dynamics of the economy. These are: where p 1 t > 0 , p 2 t > 0 for any t ≥ 0 , plus the inequality constraints (13) and (14), which guarantee strictly positive money demands.
The first observation is that the dynamics of the prices of the two goods can be studied independently from each other. The fact that the dynamics take such a simple form is due to the timing assumption. Since agents cannot readjust their portfolio when old, the consumption of the old in the two countries of good 1 (2) is strictly related to their savings in currency 1 (2). In fact, aggregating the budget constraints of the old across agents and assuming that money markets clear, we get that: c 2,t = M p t + y 2 for = 1, 2 . The goods' market clearing equations then imply that the excess supply of the young for good 1 (2) is equal to the real money balances of currency 1 (2): y 1 − c 1,t = M p t . In "Appendix 1", we show that the aggregate consumption of the young of good 1 (2) is strictly related to their own purchases of currency 1 (2), which depend on the current and the future price of good 1 (2) and not on the prices of the other good. Hence, we obtain two separate difference equations. 17 In Sect. 6.2, we will consider an alternative version of the model where the young can only use the domestic currency as saving vehicle. Since the savings of each currency would then be linked to the purchase of both goods, we will not be able to solve the dynamic system in blocks as in this case. However, notice that the system does not dichotomises completely. The dynamic inequality constraints (13) and (14), which have to be respected, depend on both prices as well as the nominal exchange rate. Equation (20) shows instead that, in equilibrium, the nominal exchange rate is pinned down by the expected prices of the two goods. This illustrates further how our model is capable of solving the indeterminacy problem in KW (1981). While the nominal exchange rate can be any arbitrary constant in KW, we have an equation that disciplines the behaviour of the nominal exchange rate in equilibrium.
In the analysis of the dynamics of the economy, we will then proceed as follows. First, we study the price sequences emerging from the system (18) and (19). We then derive the path of the nominal exchange rate using (20) and finally verify numerically that the inequality constraints hold for any t.

Long-run determinants of the exchange rate
In this section, we characterise the monetary steady state of the economy. Firstly, let us provide a definition.
Definition 2 A monetary steady state is any monetary equilibrium with strictly positive and constant consumption allocations (c 1 * ah , c 2 * ah ) for every a, h.
Because money supplies are constant, it can be shown that stationarity in consumption implies that the goods' prices and the nominal exchange rate are also constant. In fact, let us consider the budget constraint of the old for good 1 (Eq. 4) at the steady state: Aggregating and using the market clearing conditions, we have that: Since the old's excess demand is constant, it then follows that p 1 t = p 1 * for every t. Looking at Eq. (5), we can derive the same conclusion for the price of good 2: Finally,(20) shows that the nominal exchange rate is also constant: e t = e * . Let us then impose p t = p * and e t = e * in Eqs. (18)-(20). This leads us to the first result of the paper.

Result 1 A monetary steady state exists and is unique. The long-run values of the two prices and the nominal exchange rate are:
while the two inequality constraints (13) and (14) become where * are the terms of trade of the economy: At the steady state of the economy, we have shown that the nominal exchange rate is determinate and a function of the fundamentals of the economy. Our model is then consistent with the strand of empirical literature which has found that there is a strong long-run relationship between the nominal exchange rate and a simple set of monetary fundamentals. 18 The fact that the nominal exchange rate is determined in a OLG setting is a novel result in the literature. The well-known result concerning nominal exchange rates in OLG models is Kareken and Wallace's indeterminacy proposition. However, as Sargent (1987) correctly argued, this result is not due to the demographic structure of the model but rather to the assumption that there is room for only one outside asset in the model. In our framework, the cash-in-advance constraints plus the lack of participation of old agents to currency markets (so that the portfolio of the old is determined in advance) imply that the two currencies are not perfect substitutes as stores of value, differently from KW (1981). Hence, the level of the nominal exchange rate is pinned down by the fundamentals at the monetary steady state.

3
Nominal exchange rate determination and dynamics in an OLG… For instance, let us explore what are the circumstances under which currency 1 depreciates (e increases): (1) an increase in the domestic money supply; (2) a fall in savings in good 1; (3) an increase in the domestic aggregate endowment. The first channel does not probably need an explanation. The second channel involves the relative savings by the young in the two goods. In fact, aggregating the budget constraint of the old across agents, we obtain an equation for the savings of good 1: where p 1 * is known from Result 1. It can be observed that a fall in the supply of savings of good 1 implies a higher price for the good. Since currency 1 in units of the domestic good is worth less in terms of purchasing power, then it depreciates. 19 Finally, an increase in the aggregate endowment of good 1 implies a depreciation of the domestic currency as the relative price of good 1 falls (i.e. the terms of trade worsens).
It is worth observing that the second channel is specific to our OLG model. In cash-in-advance infinite horizon models à la Lucas (1982), with a CES utility function, the equilibrium exchange rate is instead equal to: which can be seen as a specific case of our equation when y 2 = 0 . In this case, the young hold all the aggregate output of the economy and an increase in the endowment unambiguously leads to a currency appreciation (depreciation) whenever the elasticity of substitution is higher (lower) than 1.
More generally, the level of the nominal exchange rate in the steady state depends on the distribution of the aggregate endowment across cohorts. It is therefore useful to compute the partial derivatives of e * with respect to y 2 1 and y 2 2 and investigate their sign. It is immediate to see that: Firstly, let us consider the effect of an increase in the endowment of the young on the exchange rate. It can be seen that there are two effects at play. On the one hand, an increase in the endowment of the young increases savings. Hence, there is a higher demand for the domestic currency which leads to a currency appreciation. On the always.
other hand, an increase in the endowment of the young causes a deterioration of the terms of trade, which instead leads the currency to depreciate. It can be seen that the first effect always dominates whenever the domestic and the foreign good are substitutes ( > 1 ). The sign of the derivative is also positive when = 1 . When the goods are complements, the sign is instead ambiguous. On the other hand, an increase in the endowment of the old always causes a currency depreciation. In fact, this leads to lower savings (hence, to a lower demand for the domestic currency) as well as to a deterioration of the terms of trade.

Local dynamics
In this section, we study the dynamics of the economy around the monetary steady state. Equation (20) shows that the nominal exchange rate is pinned down by next period's price levels. Hence, it suffices to study the dynamics of the two prices in order to pin down the equilibrium path of the nominal exchange rate and the quantity variables.
As it emerges clearly from Eqs. (18) and (19), this means to study the scalar difference equation: and more specifically the local stability of its unique steady state: with p * > 0 as long as y 1 > − y 2 ≡ȳ . The superscripts have been dropped to make the notation less cumbersome. 20 Before proceeding, we define the following concepts.
Definition 3 (Local (In)Determinacy) A steady state p * is said to be locally determinate if there exists a unique solution of F(p t , p t+1 ) = 0 , converging to it. On the other hand, a steady state p * is locally indeterminate if there is a continuum of solutions of F(p t , p t+1 ) = 0 , converging to it.
It is worth noting that in our framework the price level is a non-predetermined (jump) variable. Therefore, p * is locally determinate only if it is locally unstable. In fact, there exists only one choice of the initial price, p 0 = p * , consistent with a longrun value of the price level equal to p * . In other words, the economy jumps at date 0 to its steady-state value and remains there forever. On the other hand, p * is locally Nominal exchange rate determination and dynamics in an OLG… indeterminate if it is locally stable. In fact, there are a continuum of solutions converging to it.
On the other hand, p * is locally indeterminate if the following conditions hold: while p * is non-hyperbolic when y 1 = y • . 22 The thresholds of y 1 are equal to Proposition 1 shows the conditions under which the steady-state price of each good is either determinate or indeterminate, since the dynamics of the two prices are independent. However, the determinacy or indeterminacy of the stationary monetary equilibrium will be the consequence of the behaviour of both price levels. Following Proposition 1, it is straightforward to identify situations in which the stationary monetary equilibrium is locally indeterminate.
We acknowledge that Eq. (24) has been investigated in a closed-economy framework before (e.g. Blanchard and Fisher 1989; Benassy 2011 for a review). However, our results differs from previous contributions for three reasons. First, previous studies analysed Eq. (24) using an offer curve. Therefore, they looked at the dynamics in a different variable, namely real money balances. Secondly, we have found no contributions where the parameters' conditions for the emergence of local determinacy or indeterminacy have been given in such details as we do in Proposition 1. Finally, the prices' dynamics have also to respect the inequality constraints (13) and (14), which are different than in previous studies. 22 A steady state x * of a scalar difference equation x t+1 = F(x t ) is non-hyperbolic if |F � (x * )| = 1 . If a steady state is non-hyperbolic, then the local stable manifold theorem (e.g. Kuznetsov 1998, Theorem 2.3, p. 50) does not hold, i.e. the local dynamics around x * is no more a "good approximation" of the global dynamics.

3
First of all, the indeterminacy of the monetary steady state depends on the existence of a sufficiently strong income effect, as known in the literature. In the onegood, one-currency OLG model, this requires that the intertemporal elasticity of substitution, the discount factor and the endowment when old are all relatively low. 23 In our two-good, two-currency economy, it is also the case that we need a relatively low intertemporal elasticy of substitution and discount factor. The novelty of this paper is that the indeterminacy of the monetary steady state is tied to the relative endowments of the two countries. In fact, this is the main source of heterogeneity in the model, as preferences are identical across countries. For indeterminacy to emerge, the endowment of the young must be higher than the bifurcation point y • for at least one country. Therefore, indeterminacy can occur even if the endowment of the old in one of the two countries is relatively high. 24 If we considered such country in a closed economy context, where agents only gain utility from the domestic good, then the same values of and would imply the determinacy of the monetary steady state. But in an open economy context, the monetary steady state is indeterminate if the old in the other country have a sufficiently low endowment.
For instance, let us consider the following example where the two agents have the same endowment when old. This implies that the two countries have the same y • as a threshold. Suppose that country 1 has an endowment when young below the threshold and country 2 above the threshold. We can then construct an equilibrium around the monetary steady state where p 1 0 = p 1 * (see left side of Fig. 1) while any arbitrary p 2 0 sufficiently close to p 2 * will converge to p 2 * according to Proposition 1 (see right side of Fig. 1). To draw the picture, we have chosen parameter values as follows: = 0.25 , = 0.4729 , M 1 = M 2 = 1 , y 1 2 = y 2 2 = 1 , which implies that y • = 14 . Assume that the young of country 1 is endowed with y 1 1 = 13 < y • , while the young of country 2 with y 2 1 = 19 > y • . Since there is local indeterminacy in the price p 2 t , we have also arbitrarily chosen the initial price level so that it is 1% higher than the steady state value. We need also to check that money demands are strictly positive, i.e. the inequality constraints (13) and (14) hold. Observe that these two inequality constraints can be represented as regions in the space (p 2 t , p 2 t+1 ) given the path of the other price ( p 1 t = p 1 * for every t) and the path of the nominal exchange rate which can be derived from (20) once the paths for the two prices are known. Therefore, we check numerically that the price sequence {p 2 t } T t=0 lies within the region where both money demands are positive, i.e. not in the grey regions of Fig. 1.
We can now comment on the dynamics of the exchange rate. As explained before, Eq. (20) pins down the path of the nominal exchange rate once the paths of the two prices are known:

3
Nominal exchange rate determination and dynamics in an OLG… For any given p 2 0 , Eq. (24) will pin down a value for p 2 1 , which will then determine the nominal exchange rate at time 0 through Eq. (26). Any given p 2 0 will give rise to a different path for the price of good 2 and hence a different path for the nominal exchange rate. Once p 2 t converges to p 2 * , so will the nominal exchange converge to its long-run value.

Stationary sunspot equilibria
The aim of this section is to show that, although the nominal exchange rate is pinned down by the fundamentals of the economy at the monetary steady state, persistent fluctuations of the nominal exchange rate around its long-run value can arise in the absence of shocks to the fundamentals of the economy. Hence, our model can help to explain why there seems to be a disconnect between the exchange rate and fundamentals, especially at shorter horizons.
In particular, we will investigate whether fluctuations of the nominal exchange rate around the monetary steady state can be generated by agents' beliefs that prices are stochastic. More precisely, we will provide conditions for the existence of stationary sunspot equilibria. 25 Following the literature (e.g. Azariadis 1981), we assume that beliefs (and, since they are self-fulfilling, equilibrium prices) follow a simple two-state Markov process: S = {a, b} . Since we have two agents born in each period, beliefs can potentially be different across agents. Let h be a stationary transition probability matrix, where the element h (ij) is the probability that agent h assigns to state j tomorrow when today's state is i: p (s) and use the definition of the terms of trade of the economy ( (s) ≡ p 2 (s)e(s) p 1 (s) ) to rewrite the above budget constraints as follows: where w 1 (s) = y 1 1 and w 2 (s) = (s)y 2

3
Nominal exchange rate determination and dynamics in an OLG… In "Appendix 1", we derive the first-order conditions of the maximisation problem and show that it involves solving for m 1 h (s) and m 2 h (s) which satisfy the following two equations: Next, let us define m (s) ≡ M p (s) . We can now introduce a definition of stationary sunspot equilibrium.

3.
∑ hm h (s) =m (s) ∀s, 4. at least one of the following holds: Our definition excludes the degenerate cases where the economy either ends up in one state of nature ( h (aa) = 1 or h (bb) = 1 ) or in a two-period cycle (when h (ab) = 1 and h (ba) = 1). 27 In our two-country world, three prices can potentially fluctuate: the nominal prices of the two goods p 1 (s) and p 2 (s) and the terms of trade (s) . Since e(s) ≡ (s)p 1 (s) p 2 (s) , then the nominal exchange rate can also fluctuate as a consequence.
The general case where all prices fluctuate is quite cumbersome to deal with. Therefore, we make the following simplifying assumptions on agents' beliefs: 27 See Azariadis and Guesnerie (1986) for a discussion and for an investigation of the connections between stationary sunspot equilibria and two-period cycles.
Assumption 1 Agents' beliefs are specified as follows: where z, n and x are nonzero numbers.
In other words, agents believe that only the price of good 1 is subject to random fluctuations while the other prices are those prevailing at the monetary steady state. In fact, Assumption 1 implies that the price of good 1 fluctuates as follows: It is also easy to see that fluctuations in the price of one good is sufficient to generate fluctuations of the nominal exchange rate: Finally, we assume that agents share the same beliefs about the uncertainty affecting the world economy.
In the following Proposition, we prove that stationary sunspot equilibria exist. Our strategy is to adapt the proof used by Woodford (1984) in a one-good, one-currency and one-agent OLG economy to our open economy setting. The idea behind is to show that there exists a set of beliefs which supports an equilibrium allocation where prices are different across states of nature. The proof relies on a continuity argument, i.e. it assumes that prices are extremely close to the steady-state value ( z → 0).

Proposition 2 Under Assumption 1, stationary sunspot equilibria exist as long as p 1 * is locally indeterminate.
Proposition 2 shows that, in our open economy setting, it is possible to construct stationary sunspot equilibria in the neighbourhood of the monetary steady state. When p 1 * is locally indeterminate, there is nothing that guarantees that the initial price level is equal to the steady-state value: p 1 0 = p 1 * . Since a whole range of values for p 1 0 are possible and consistent with rational expectations, the multiplicity of equilibria (which occurs under the conditions shown in Proposition 1) can give rise m 1 (a) =m 1 * + zñ to sunspot behaviour. 28 In particular, we show that if agents believe that the price of good 1 follows a first-order Markov process, then stationary sunspot equilibria exist. Importantly, this leads to self-fulfilling fluctuations of the nominal exchange rate. When the price of good 1 goes up (down), currency 1's purchasing power falls (increases); hence, it depreciates (appreciates). Fluctuations of the nominal exchange rate are purely driven by agents' beliefs that the real interest rate in one country changes over time. To show this clearly, we have assumed that the fundamentals of the economy remain constant. 29 It is important to stress that the type of sunspot equilibria that we construct are different from other contributions in the OLG literature such as Manuelli and Peck (1990) and King et al. (1992). In these papers, the nominal exchange rate is always indeterminate: since (at least a subset of) agents have unrestricted access to currency markets, then the two currencies have the same rate of return. Since the nominal exchange rate cannot be pinned down, it follows that it is possible to construct paths for the nominal exchange rate which are unrelated to fundamentals. In this paper, currencies are not perfect substitutes because of the cash-in-advance constraints and the lack of access of the old to currency markets. Agents' demand for the two currencies depends on the expected purchasing power of the two goods as well as agents' marginal utilities, which implies that we have an equation that disciplines the behaviour of the nominal exchange rate (Eq. 20). Therefore, the existence of sunspot equilibria in the nominal exchange rate is not obvious in our setting. Proposition 2 then studies the conditions under which stationary sunspot equilibria exist.
The result in Proposition 2 also relates to the literature on stationary sunspot equilibria in closed economy. In the one-good, one-currency and one-agent per generation OLG economy, Azariadis (1981) showed that conditions for stationary sunspot equilibria to arise are the following: (1) gross complementarity between the goods and (2) local stability (indeterminacy) of the monetary steady state. Proposition 2 shows that this result holds even in a two-good, two-currency and two-agent per generation OLG economy. 30

Robustness and extensions
In this section, we investigate whether our results are robust to changes in the assumptions of the model. For simplicity of exposition, we assume from now onwards that the old have no endowments: y 2 = 0. 28 See also Peck (1988) on how the multiplicity of equilibria in OLG models leads to existence of sunspot equilibria more generally. See Benhabib and Farmer (1999) on the link between indeterminacy and sunspots in other classes of models. 29 We have constructed sunspot equilibria in the case where the price of good 1 fluctuates, but the same could be done for good 2. 30 More precisely, notice that in our setting as well as in Azariadis (1981), gross complementarity actually implies local indeterminacy (see Proposition 1). As Woodford (1984) puts it, what is really necessary for the existence of stationary sunspot equilibria that remain within an arbitrarily small neighbourhood of a deterministic steady state in an OLG setting is indeed the indeterminacy of the steady state.

Home bias
We now extend the model to allow for the presence of consumption home bias. In the absence of home bias, it is well known that the real exchange rate is equal to 1. In other words, the price of a consumption basket when converted into the same currency is identical across countries. However, one of the most established facts in the literature is that the purchasing-power parity (PPP) does not hold (Rogoff 1996). Moreover, the empirical literature has found that there is a comovement between the nominal and the real exchange rate (see, e.g. Burstein and Gopinath 2014). While the introduction of home bias into the model takes care of PPP deviations, it remains to be seen whether the model can replicate the strong positive correlation between the nominal and the real exchange rate. Therefore, the main purpose of this section is to look into other aspects surrounding the behaviour of the exchange rate, in particular those concerning the relationship between the nominal and the real exchange rate.
Let us introduce the following utility function: where is the inverse of the intertemporal elasticity of substitution and C 1h,t and C 2h,t+1 are the consumption indices of the young and the old, respectively: and = 1 . Under this parameter restriction, this utility function is then exactly the same as (7). This different formulation is useful to introduce in order to calculate the consumption-based price index as standard in the literature. For simplicity, let us also assume that a 1 1 = a 2 2 ≡ a H , which means that the degree of home bias is the same across countries.
In the Supplementary Material (Section D), we show that the consumption-based price indices of the two countries are: This leads us to define the real exchange rate Q t :

Nominal exchange rate determination and dynamics in an OLG…
It is then straightforward to see that in the absence of home bias ( a H = 1 2 ), then Q t = 1 . On the other hand, when a H > 1 2 the PPP condition does not hold. In the Supplementary Material, we also show that the dynamic system dichotomises even in the presence of home bias (as in Sect. 2), so that Eqs. (18) and (19) still characterise the dynamic behaviour of p 1 and p 2 . 31 Hence, in the long-run, two prices satisfy the same equations as under the absence of home bias (see Result 1).
On the other hand, Eq. (20) is replaced by the following expression: where It is easy to see that we cannot express the nominal exchange rate as an explicit function of future prices as in Sect. 2 [see Eq. (20)].
In the presence of home bias, generically we cannot find a closed-form solution for the nominal exchange rate even at the steady state of the economy. An analytical solution can be found when countries are symmetric, in the sense that they have the same money supplies and endowments: M 1 = M 2 = M and y 1 = y 2 = y . In that case, it can be checked that e * = 1.
In order to look at the dynamics of the real and the nominal exchange rate, let us consider the case where the monetary steady state is locally indeterminate. Without loss of generality, let us assume that agents believe that the price of good 1 is at the steady-state level ( p 1 0 = p 1 * ) while agents coordinate on an initial value for the price of good 2 different than the steady state one p 2 0 ≠ p 2 * . As for Fig. 1, let us set = 0.4729 , = 0.25 and M 1 = M 2 = 1 . When y 2 = 0 , notice that y • = 0 (see Proposition 1). This implies that local indeterminacy does not depend anymore on the level of endowments in the two countries. Without loss of generality, we also set y 1 = y 2 = 1.
We then compute the equilibrium paths of the nominal and the real exchange rate for the following range of the home bias parameter: a H = {0.6, 0.7, 0.8, 0.9} . We find that there is comovement of the nominal and the real exchange rate for all these values, consistently with the empirical evidence.
1− 31 Additionally, this property holds even when the degree of home bias differs across countries.
In particular, Figs. 2 and 3 show, respectively, the dynamics for relatively open economies and more closed economies. When the two countries are relatively more close, the dynamics of the real exchange rate tracks very closely the dynamics of the nominal exchange rate. When the two countries are relatively more open, there is still comovement but the amplitude of fluctuations of the real exchange rate is smaller. This is intuitive, since the real exchange rate would be

Timing of portfolio choice
In Sect. 2, we have assumed that the portfolio of currencies that the old need to buy the consumption goods is determined when young. We will now investigate whether our results still hold when we relax this assumption.
In particular, we consider a setting where the agents are instead subject to the following budget constraints: Notice that Eqs. (41)-(43) are the same as Eqs. (1)-(3). 32 The key difference is that we allow the old to determine their portfolio in the current period (Eq. 44). We also impose that only the domestic currency serves as store of value (Eq. 47). In fact, recall that the currencies would be perfect substitutes if both can be used as store of value leading to a constant and indeterminate exchange rate as in Kareken and Wallace (1981) (see Supplementary Material, Section A).
We provide the first-order conditions and the derivation of the model in the Supplementary Material (Section E). As in Sect. 2, the equilibrium allocation can be (47) m 1 2,t = m 2 1,t = 0 32 The only difference is that we need to use an additional index to distinguish the money purchased at the beginning of the period by the young ( m 1h,t ) from the money purchased at the beginning of the period by the old ( m 2h,t+1 ). We have also dropped the age subscript in the endowment of the young and her wealth, since the old have no endowment.

3
Nominal exchange rate determination and dynamics in an OLG… found by solving a dynamic system of three equations in three unknowns ( p 1 , p 2 , e ). In particular, the equilibrium equations are the following 33 : where The long-run solution for the prices and the exchange rate can be obtained by imposing p t = p * and e t = e * in the above system of equations. It is then immediate to show that the unique stationary monetary equilibrium is: Notice that these expressions are identical to those found in Sect. 3 for y 2 = 0 . It can also be verified that the consumption allocations are the same under these two alternative specifications of the model. This shows that the result that the nominal exchange rate is a function of the fundamentals at the steady state of the economy does not depend on the timing of the portfolio choice. The presence of the cash-inadvance constraints is enough to pin down the nominal exchange rate in the long-run. Differently from Sect. 2, the dynamic system when the portfolios of the old are determined in the current period is much more complicated and cannot be solved analytically in blocks.
To investigate whether the monetary steady state can be locally indeterminate, we can use the implicit function theorem in the following way. Firstly, observe that the system of equations describing the dynamics of the economy are three implicit nonlinear difference equations in the variables (p 1 t , p 2 t , e t , p 1 t+1 , p 2 t+1 , e t+1 ) . Let us call these three equations t , e t , p 1 t+1 , p 2 t+1 , e t+1 = 0 with i = 1, 2, 3.

3
Nominal exchange rate determination and dynamics in an OLG… Clearly, we have that f i (p * , e * ) = 0 with i = 1, 2, 3 . The Jacobian of this system evaluated at the steady state, i.e. (Df )(p * , e * ) , is: Let us call with D L and D R the 3 × 3 matrices at the left and at the right side of the vertical line, respectively. Suppose also that D R is invertible. Then, there exists I ⊂ ℝ 3 ++ containing (p * , e * ) and a function g ∶ I → I such that In addition, g is continuous and differentiable in I with the Jacobian matrix (evaluated at the steady state) equals to Then, local (in)determinacy of the steady state can be checked looking at the eigenvalues of this Jacobian matrix. Since all the three variables are non-predetermined, local determinacy emerges if and only if all the eigenvalues are outside the unit circle. In this case, the unique equilibrium path is the steady state itself and this can be obtained by ruling out all the explosive paths by setting all the initial conditions of the three variables at their steady state value. Numerical computations show that local indeterminacy emerges for the same setting of the parameters used to draw Fig. 1. Similarly to the previous model, we have also observed that local determinacy can be restored by increasing . 34 The analysis then shows that the assumption that old agents cannot participate to currency markets is not crucial to obtain our results. In this alternative version of the model where old agents can participate to currency markets, we find that the nominal exchange rate is still pinned down by the same fundametals in the long run. The monetary steady state is also locally indeterminate under similar conditions, implying that there exists paths of the nominal exchange rate around its long-run value which are not driven by the fundamentals of the economy. However, we have shown that the local dynamics cannot be studied analytically in this particular setting.
The advantage of our friction in currency markets is then that it provides a tractable way to explain the puzzling behaviour of the nominal exchange rate, while not being responsible for driving the main results. In our view, the robustness analysis indicates that similar results could be obtained in OLG models with richer portfolio choices or alternative assumptions, as long as the currencies are not modelled to be perfect substitutes.

Conclusion
We have provided a theory of exchange rate determination where the value of the nominal exchange rate at any given period is pinned down by the expected purchasing power of the two currencies in units of the respective domestic goods. At the monetary steady state, the prices of the two goods are a function of the fundamentals of the respective economies; hence, the nominal exchange rate is itself a function of the fundamentals. Empirical evidence indeed suggests that the link between exchange rates and fundamentals is stronger at longer horizons.
Under some conditions on agents' preferences and endowments, the two prices can be locally indeterminate around the monetary steady state. It is enough that one of the two prices is indeterminate for the existence of a continuum of equilibrium paths of the nominal exchange rate which all converge to the monetary steady state. The path that will prevail depends on the initial prices of the two goods and this gives rise to a different equilibrium allocation. On the other hand, the fundamentals of the economy are assumed to be constant. Our framework can then explain why the econometrician struggles to find a correlation between exchange rates and fundamentals at shorter horizons.
We also show that persistent fluctuations of the nominal exchange rate can emerge around its long-run value. In particular, we prove that as long as the monetary steady state is locally indeterminate, then stationary sunspot equilibria exist. Therefore, random fluctuations of the nominal exchange rate arise purely as a result of self-fulfilling beliefs. If, e.g. we observe that a currency appreciates but the fundamentals of the underlying economy have not changed, our model suggests that this could be because agents believe that the purchasing power of the currency goes up. According to our model, the weak link between the exchange rate and fundamentals at shorter horizons can be a consequence of people's "animal spirits". In previous OLG models in open economy, there is no room for two stores of value (currencies); hence, the nominal exchange rate is always indeterminate. This implies that the nominal exchange rate follows sunspot behaviour because of the lack of an equation that disciplines the behaviour of the nominal exchange rate. In our paper, there are conditions under which the nominal exchange rate is determinate, while conditions under which fluctuations unrelated to fundamentals can exist. Therefore, this paper provides a theory which can reconcile two apparently contrasting strands of empirical evidence.

Deterministic economy: the initial old
The initial old is endowed with some units of the domestic currency and of the domestic good. To simplify the problem, we assume that the initial old gain utility only from the domestic good. 36 In country 1: subject to: The solution is straightforward: The maximisation problem of the initial old in country 2 is similar. Its solution requires that the old agent in country 2 consumes its domestic endowment plus the real money balances: (58) max If we assumed that the initial old gained utility from both goods, we would need to assume that he is endowed with some units of the foreign good (given our utility function). We avoid this to ensure consistency with the pattern of endowments of future generations. Assuming that every generation is endowed with some units of the foreign good would considerably complicate the notation but not change our results.
In a similar way, we can derive the equation describing the dynamics of good 2. Following the same steps as for good 1, the money market clearing equation for currency 2 at t can be written as: Plugging the latter equation at t and t − 1 into the market clearing equations for good 2, we can derive Eq. (19).
Finally, the expression for the nominal exchange rate (20) can be found by combining (65) and (67). Once the paths of the nominal price levels are known, Eq. (20) will pin down the path of nominal exchange rate. Hence, the consumption and the portfolio allocations can be calculated using (16), (17) and (9)-(12).

Stochastic economy: first-order conditions
In the sunspot economy, the first-order conditions of the maximisation problem are: Under the restriction y 1 >ȳ , it is easy to show that the numerator is always negative. On the other hand, the denominator is positive if one of the following conditions is satisfied: ≥ 1 or < 1 and y 1 <ỹ . On the other hand, if < 1 and y 1 >ỹ the denominator is positive. Observe also that ỹ >ȳ when < 1 . Taking into account this information, we are now ready to investigate whether |m| is lower, equal or greater than one. We need to distinguish two cases: Case 1: ≥ 1 OR < 1 and y 1 ∈ (ȳ,ỹ) : in this case, the steady state is locally unstable because m > 1 always. In fact which is always satisfied from what said above. Case 2: < 1 and y 2 ∈ (ỹ, ∞) : in this case m < 0 since both the denominator and numerator of (79) are negative. Therefore, to establish the local determinacy of p * , we need to check whether m < −1 . Doing that leads to the following: Now, 1 is always negative. It is straightforward to see that it is so when 1 − 2 < 0 . It continues to be the case when 1 − 2 > 0 because a positive sign would require > 1 1−2 > 1. Looking now at 2 , it is clear that 2 > 0 always if 2 − 1 ≥ 0 . In addition, 2 > 0 if 2 − 1 < 0 and > 1 − 2 while 2 < 0 if 2 − 1 < 0 and < 1 − 2 .
Nominal exchange rate determination and dynamics in an OLG…

Proof of Proposition 2
We proceed in a number of steps, but the main idea is to adapt the strategy followed by Woodford (1984) to analyse a one-currency, one-good and one-agent economy to our framework.
Step 1. Firstly, we explore the implications of Assumption 1.
To start with, consider that preferences are homothetic (see Eq. (28)). This implies that consumption is a constant fraction of wealth. Therefore, we can write the consumption of the old as follows: where f h (ss � ) is a function of current and future prices. Since preferences, as specified by the discount factor, the elasticity of substitution and the beliefs (i.e. the transition probabilities) are the same across individuals, this must imply that: Hence, the aggregate consumption of the old can be rewritten as follows: Let us now define agent h's share of aggregate consumption as: Using the above reasoning, it is easy to show that the share of consumption only depends on an agent's share of aggregate wealth: As a consequence, it is independent of the future state and it is also the same across goods (hence the superscript can be dropped).
We have also assumed that agents believe that the terms of trade are constant. Therefore, agents' wealth does not fluctuate across states which means that each agent's share of aggregate consumption is constant and equal to the steady-state value: Using the budget constraint of the old, we can rewrite h as follows: The additional requirement that p 2 (a) = p 2 (b) has another implication: which shows that the consumption of good 1 when young of agent h is nothing but a share of the savings of good 1. Secondly, the share of consumption of agent 1 can be rewritten as: Plugging (91) and (92) into S * h , we get that: This confirms that beliefs across the two agents born in state a must be the same for stationary sunspot equilibria to exist: Next, substituting (90) into (93) we obtain: Following the same procedure for the agents born in state b, we obtain: Notice that, when → 1 , we have that S * → m , which is the slope of the difference equation for good 1 at the monetary steady state. 37 In fact, when y 2 = 0 , m becomes: We can now link the existence of sunspot equilibria to the local stability of p 1 * and hence the monetary steady state. Firstly, we should note that the conditions for the indeterminacy of p 1 * are slightly different when y 2 = 0 . To start with, let us check the conditions under which 0 < m < 1 . m > 0 only if > 1 . However, when > 1 , m < 1 is impossible since that would require that 1 + < 0 . Let us now consider the case − 1 < m < 0 . If Nominal exchange rate determination and dynamics in an OLG… < 1 , then m < 0 always holds. It is easy to check that m > −1 when < 1 − 2 . Since > 0 , we would also require that < 1 2 . Therefore, for indeterminacy to occur the conditions on agents' preferences remain the same when y 2 = 0 . However, we do not have any condition on y 1 .
Finally, it can be verified that for 1 → 0 , then − 1 < S * < 0 when < 1 2 . Since S * is monotonically decreasing in * 1 , then − 1 < S * < 0 for any * 1 . It is then possible to find a continuum of n and x such that the two ratios of probabilities are positive.
Step 3. To conclude, note that as z → 0 the first-order condition for currency 2 (83) becomes: which is the first-order condition for currency 2 at the monetary steady state.