Huacachina Oasis-Ica-Peru
Macroeconomics and Economic Growth
This document reviews the theoretical aspects of fluctuations in economic aggregates (business cycles) and analytically and numerically solves the linearized logarithmic version—around its steady state—of a prototype model of real business cycles (RBC) based on Stadler (1994) and Torres (2016).
From the perspective of a social planner, the reduced and log-linearized version of the model is solved analytically using the method of Blanchard and Kahn (1980) and numerically using Microsoft Excel, Dynare, and the Python “linearsolve” module developed by Jenkins (2024).
Finally, using the aforementioned software, the response of the artificial economy is numerically simulated to: (i) a single-period productivity shock, (ii) a succession of random technological shocks.
From the perspective of a benevolent social planner, the reduced and log-linearized version of Hartley et al.'s (1998) real business cycle (RBC) model is solved analytically using the Blanchard and Kahn (1980) method and numerically using Microsoft Excel, Dynare, and Python's “linearsolve” module. (1998) is solved analytically using the method of Blanchard and Kahn (1980) and numerically using Microsoft Excel, Dynare, and the Python “linearsolve” module developed by Jenkins (2024).
Similarly, the response of the artificial economy to the following is simulated numerically: (i) a single-period productivity shock, (ii) a succession of random technological shocks. In addition, the responses of endogenous variables to the single-period productivity shock (impulse) are determined matricially using the recursive equilibrium law of motion of the theoretical economy.
Finally, the second-order moments of the sample (variances/standard deviations, covariances, correlations, and dynamic correlations) that characterize the theoretical economy (model) are calculated with the Dynare software after artificially generating 100,000 data points through stochastic simulations (150,000 data points are generated, but the first 50,000 are discarded). Similarly, the second-order moments of the population are calculated from the recursive equilibrium law of the model using mathematical statistics and linear algebra.
Following Walsh (2017), in this document, I analyse a Cash-in-advance (CIA) model as a means to study the role of money in a Dynamic Stochastic General Equilibrium Model (DSGE) in which the cycles of economic aggregates are generated by both real productivity shocks and shocks to the growth rate of money.
Furthermore, using the linearised version of the model ˗around its non-stochastic steady state˗ the dynamic responses of the main macroeconomic aggregates (output, capital, employment, consumption, real money supply, real and nominal interest rates, inflation rate, and investment) to exogenous productivity and money growth rate shocks are numerically simulated using Dynare.
In this document, using the Python programming language (from the Visual Studio Code source code editor platform), a basic dynamic stochastic general equilibrium (DSGE) model of the real business cycle (RBC) type is solved numerically. The model presented in this document follows Costa (2016), and the numerical solution of the log-linearized version of that model—around its non-stochastic steady state—is based on the codes of the simulated models in the Python “linearsolve” module developed by Jenkins (2024).
The objective is to numerically simulate the effects of a temporary productivity shock that disrupts the economy in a single period. It also numerically simulates the effects of a series of stochastic productivity shocks that disrupt the economy in each of the periods analyzed, on certain variables in the model (capital stock, consumption, and total factor productivity).
In this teaching material, a dynamic stochastic general equilibrium (DSGE) model of the real business cycle (RBC) is solved analytically using the undetermined coefficients and Blanchard and Kahn (1980) methods, and numerically using Microsoft Excel, Dynare, and Matlab.
The objective is to demonstrate that Microsoft Excel can numerically simulate the effects of a transitory stochastic productivity shock that disrupts the economy in a single period, without the need for programming, for example, in Dynare or Matlab. In particular, and for comparison, the impulse-response functions of the model's endogenous variables to the productivity shock will be simulated in Microsoft Excel, Dynare, and Matlab.
Finally, the effects of a succession of stochastic productivity shocks on the model's endogenous variables, which disrupt the economy in each of the analysis periods, are numerically simulated in Excel, Dynare, and Matlab.
In this teaching material, with the aim of explaining short-term fluctuations in the main aggregates of a closed economy subject to external shocks, I analyze a New Keynesian Dynamic Stochastic General Equilibrium Model (DSGE NK Model), developed by Walsh (2017). This model incorporates money into the utility function, considers price stickiness (as Calvo, 1983) and monopolistic competition (as Dixit and Stiglitz, 1977) in the goods market, but does not consider physical capital (investment), taxes, transfers, or public spending.
After obtaining the optimality conditions for the nonlinear model, the dynamic IS curve and the Phillips curve are derived for the reduced and linearized model around its steady state. Likewise, following Galí (2015), the local singularity of the economy's equilibrium is demonstrated and, using Dynare in Matlab, the impulse-response functions of the endogenous variables to exogenous productivity (technological) and monetary policy shocks are simulated for a specific monetary policy rule (the Taylor rule).
Finally, for a variant of the model simulated by Posada and Villca (2017), the dynamic responses of the main macroeconomic aggregates to exogenous demand shocks (characterized by an exogenous increase in the output gap) and supply shocks (characterized by an exogenous increase in the inflation rate) are numerically simulated using the Solver tool in Microsoft Excel.
This teaching material analyzes the Tobin's "q" model. Using optimal control theory, the system of ODEs that govern the model's dynamics is deduced. Numerical simulations using Matlab complement the model analysis.
This teaching material presents the theoretical [qualitative (using phase diagrams) and quantitative (using optimal control and systems of ordinary differential equations)] and numerical (using Java and Excel) analysis of Pissarides' frictional unemployment model (a search and match model).
This teaching material, based on Jiménez (2006) and Larraín (1986), analyzes the dynamics of the Mundell-Fleming model in an open economy framework, with perfect capital mobility, international arbitrage ensuring uncovered interest rate parity, economic agents with deterministic rational expectations (perfect foresight) regarding the nominal exchange rate, sticky prices in the domestic economy, a fluctuating nominal exchange rate, fixed output in the short term (although it adjusts slowly to excess demand in the domestic market), and the money market adjusting instantly to any exogenous shock.
The effect of a sudden and permanent increase in the money supply on the domestic economy will also be analyzed. Finally, the theoretical analysis will be complemented by numerical simulations in Microsoft Excel and Matlab.
In this document, based on the Sethi (2019) model, a dynamic analysis will be performed to determine the optimal production rate and inventory level for a manufacturing company. The objective is to balance the benefits of smoothing production (reducing production peaks and troughs caused by demand fluctuations) with the costs of holding inventory. This analysis will be carried out using a continuous-time dynamic optimization process under uncertainty, applying optimal control theory to determine the optimal paths of the control variable (the production rate) and the state variable (the inventory level) during a finite intertemporal planning period, “T”.
In this context, the manufacturing company seeks to determine the production rate “Q(t)” and the inventory level “I(t)” that minimize, during a planning period “T”, the sum of the costs generated by producing a homogeneous good and the costs of holding inventory.
In this teaching material, based on [Barro, R., Sala-i-Martin, X. (2004), Romer (2019), among others], the neoclassical Solow-Swan growth model is theoretically analyzed [quantitatively (using ODEs) and qualitatively (using phase diagrams)] and numerically simulated (with Microsoft Excel).
This teaching material presents a dynamic analysis of optimal policy choices to stabilize a closed economy (multiplier-accelerator type), ensuring its convergence to long-run equilibrium, and using optimal control theory to determine optimal policy instrument trajectories over an infinite intertemporal planning period and in a deterministic framework.
The problem facing policymakers is to minimize the social cost of implementing fiscal policy (using public spending "G(t)" as a policy instrument or control variable) to bring the economy to a long-term full-employment output level "Y*" (policy objective), ensuring economic stability and achieving rapid convergence to equilibrium.
In this teaching material I theoretically analyze (with calculus of variations) and numerically simulate (with Excel) a inflation-unemployment trade-off model between inflation and unemployment, adapted by Chiang (1992) from the article by Taylor (1989).
This material analyzes some dynamic aspects of the theory of the firm by applying a numerical simulation model developed by Shone (2003) that considers two key scenarios in the sales of a monopolistic firm.
First, a discrete-time dynamic analysis of the sales of a single-product monopolistic firm that does not invest in advertising is performed. Next, a dynamic analysis of the impact of advertising on the monopolistic firm's sales is carried out.
The analysis of both cases is complemented by numerical simulations performed in Microsoft Excel.
This document examines the stability of a linear dynamic version of the IS-LM model from a Keynesian perspective, assuming that prices are rigid.
The theoretical analysis is complemented by a numerical simulation of a specific case (spiral dynamics with complex conjugate eigenvalues), in which the model converges dynamically and asymptotically to a stationary equilibrium point in an oscillatory manner.
Furthermore, assuming the economy is initially at its steady state, the effect of a sudden and permanent increase in the nominal money stock on the aggregate economic variables is analyzed.
This teaching material solves the Lucas Imperfect Information Model by assuming perfect information about price changes, and then by assuming imperfect information about those changes.
The key insight of the Lucas model is that an unexpected or unforeseen deviation in aggregate demand (due to an unanticipated monetary shock) can have real effects on output and prices and, consequently, predicts a positive relationship between output and inflation (Romer, 2018).
This teaching material presentates the derivation of the optimal monetary policy rule (Taylor rule) proposed by Piergallini & Rodano (2016), using a non-micro-grounded macroeconomic model in which the monetary authority is assumed to minimize its loss function (preferences) under a discretionary monetary policy regime with the aim of ensuring dynamic stability in the economy.
These authors' proposal presents an intuitive and simple approach to provide a theoretical justification for the use of the Taylor rule by central banks in real economies without resorting to complex dynamic stochastic optimization problems that arise in dynamic stochastic general equilibrium (DSGE) models in New Keynesian macroeconomics.
In this teaching material, using a dynamic AO-DA model, macroeconomic fluctuations in output, true inflation, and expected inflation in the face of economic shocks (fiscal policy, supply-side, and monetary policy) are analyzed.
In particular, a linear AO-DA model is analyzed from a dynamic perspective, assuming that inflation expectations are formed under an adaptive expectations framework and within a closed-economy framework. To this end, using Matlab and Excel, a numerical simulation is performed of one of three possible cases in which the stationary equilibrium point of the system of differential equations governing the dynamic behavior of the model is stable (a spiral, an improper node, or a center). Finally, for the case of a convergent spiral, an analysis of unanticipated external disturbances is performed (permanent variations in public spending or the exogenous tax rate, changes in potential output due to exogenous technological shocks, and variations in the growth rate of the money supply).
SLIDES
Microeconomics and Economic Regulation
This document analyzes the peak demand pricing model, which, with a fixed-coefficient production technology, establishes different prices over time to control demand and promote the efficient use of a company's limited capacity, especially in sectors such as electricity, natural gas, and transportation. With this approach, production is based on inputs combined in fixed proportions. The objective is to choose prices that cover the higher cost of providing the service during peak hours (when capacity is scarce), while incentivizing consumers to shift some of their consumption to off-peak hours, when prices are lower.
This document reviews the regulatory scheme of the rate-of-return, analyzing in particular the Averch-Johnson effect in a single-product company.
This document reviews the definitions of relevant markets, product markets, and geographic markets. It also analyzes different measures of concentration and market power.
Furthermore, it relates measures of concentration and market power. Concentration is then analyzed using conjectural Variation models. Finally, techniques for measuring and identifying market power are studied.
Macroeconomics and Economic Growth
In this document, with the aim of shedding light on the short-run fluctuations of key aggregates—inflation, the output gap, the nominal interest rate, among others—of a closed economy exposed to real external shocks (such as technological productivity disturbances and variations in the output gap) and monetary shocks (stemming from adjustments in the policy interest rate), I examine a New Keynesian Dynamic Stochastic General Equilibrium (NK-DSGE) model developed by Walsh (2017). The framework features money in the utility function, price stickiness à la Calvo (1983), and monopolistic competition à la Dixit & Stiglitz (1977) in the goods market, while abstracting from physical capital (investment), taxes, transfers, and government spending.
After deriving the optimality conditions of the nonlinear model, the dynamic IS curve and the Phillips curve for the reduced, log-linearized version around its steady state are obtained. Following Galí (2015), the local uniqueness of the equilibrium is also demonstrated. Using Dynare in Matlab, impulse-response functions of the endogenous variables are simulated in response to exogenous productivity (technological) shocks and monetary policy shocks under a specific monetary policy rule (the Taylor rule).
Finally, for a variant of the model simulated by Posada and Villca (2017), numerical simulations of the dynamic responses of the main macroeconomic aggregates are carried out under exogenous demand shocks (modeled as an exogenous increase in the output gap) and supply shocks (modeled as an exogenous increase in the inflation rate), employing Microsoft Excel’s Solver tool.
The Real Business Cycle (RBC) theory seeks to use the neoclassical growth framework to study fluctuations in economic cycles. In doing so, the theory focuses on the effects of two particular types of shocks: a technological productivity shock, which affects the production function from one period to the next, and a public expenditure shock, which changes the quantity of goods available to the private sector given a certain level of output. Since both types of shocks are real rather than nominal or monetary in nature, the resulting models are referred to as real business cycle models.
This document develops a standard real business cycle model based on the stochastic and discrete version of the Ramsey optimal growth model, incorporating randomness in technological progress. This allows for an analysis of the effects of technological shocks on the economy through numerical simulation using Microsoft Excel.
This document examines the foundations of consumption and physical capital accumulation within a non-monetary dynamic equilibrium framework—the deterministic optimal economic growth model of Ramsey, Cass, and Koopmans, as presented in Blanchard & Fischer (1989). The model is solved using optimal control theory.
Solow (1956) and Swan (1956) aim to demonstrate that balanced full-employment growth in an economy is achievable if the assumption used in the Harrod–Domar model—namely, a production function with fixed technical coefficients that does not allow substitution between production factors—is replaced with a neoclassical production function. This neoclassical function allows factor substitution, exhibits constant returns to scale, features positive but diminishing marginal products for each input, and satisfies the so-called Inada conditions (1963).
This document examines the Solow–Swan neoclassical growth model, with and without technological progress, in continuous time, addressing both its qualitative aspects (using phase diagrams) and its quantitative features. The theoretical discussion is complemented by numerical simulations carried out in Microsoft Excel.
This model, drawing on Shone (2002, 2003) and Gaspar (2015, 2018), makes it possible to examine macroeconomic fluctuations in output, actual inflation, and expected inflation in response to various economic shocks (fiscal policy shocks, supply shocks, and monetary policy shocks). This document studies a linear version of the model from a dynamic perspective, assuming that inflation expectations follow an adaptive expectations scheme within a closed-economy setting. To do so, numerical simulations are carried out using Polking’s (2003) “pplane.8” software for Matlab, considering three scenarios in which the steady-state equilibrium point of the system of differential equations governing the model’s dynamics is stable (a spiral, an improper node, or a center). Finally, for the first two scenarios, the analysis explores the effects of unanticipated external disturbances—permanent changes in government spending or in the exogenous tax rate, shifts in potential output driven by exogenous technological shocks, and changes in the growth rate of the money supply.
This document examines a dynamic inflation model in a closed economy with only two markets: a goods-and-services market and a money market. The model offers a simple way to study how endogenous variables adjust over time toward their long-run equilibrium. Using Holong’s (2021) Phase Plane App for Matlab, numerical simulations are conducted for three scenarios in which the steady-state equilibrium of the system of differential equations governing the model’s dynamics is stable—specifically, when it behaves as a spiral, an improper node, or a center. For the first two cases, the analysis also considers nominal disturbances, such as sudden and permanent increases in the nominal money supply. Finally, the document explores and numerically simulates the occurrence of a degenerate Hopf bifurcation.
Rudiger Dornbusch was among the first economists to analyze the implications of rational expectations in macroeconomic models. In 1976, he published a paper examining a standard open-economy IS-LM-BP (goods-market equilibrium, financial-market equilibrium, and balance of payments) or Mundell–Fleming model built on deterministic rational expectations—that is, assuming perfect foresight and perfect information. In his framework, the price level in the goods market adjusts only gradually toward its steady-state equilibrium, which is why the model is known as the “sticky-price monetary model of exchange rate determination.” In contrast, the financial asset market adjusts instantaneously: Dornbusch assumes that both the interest rate and the nominal exchange rate respond with infinite speed. The central result of the Dornbusch model is that, even under perfect foresight, the nominal exchange rate can temporarily overshoot its long-run equilibrium value.
The static version of the IS (Investment-Saving) – LM (Liquidity preference-Money) model, which integrates financial markets (bonds and money) and goods and services markets, was proposed by Hicks (1937) to summarize the analytical content of Keynes’s General Theory. In its static form, the IS curve represents the set of combinations of the interest rate and real income that lead to equilibrium in the goods and services market (where investment equals savings), while the LM curve represents the set of combinations of the interest rate and real income that lead to equilibrium in the money market (where liquidity preferences equal the money supply).
Overall equilibrium in these markets occurs when both the goods and services market and the money market are simultaneously in balance (i.e., at the intersection of the IS and LM curves). This document analyzes the model from a Keynesian perspective and considers a closed economy. Under this approach, prices are assumed to be fixed, or equivalently, the aggregate supply is perfectly elastic at the given price level. Using Polking’s (2003) “pplane.8” software for Matlab and Microsoft Excel, numerical simulations of a linear version of the model are performed. Finally, the document examines the dynamic stability of the model in the context of an expansionary monetary policy.
The growth theory (long-term analysis) of Harrod (1939) and Domar (1946) is a dynamic extension of the simpler short-term real Keynesian model. Harrod and Domar developed their models independently, examining the conditions for balanced growth—where all variables, including capital, labor, and GDP, grow at the same rate—while analyzing the requirements to maintain full employment of productive factors over time. However, since their assumptions and results are essentially the same, the literature typically presents these two models together as a single framework known as the Harrod-Domar growth model.
This document conducts a dynamic analysis of the deterministic, continuous-time version of the Harrod-Domar economic growth model, both qualitatively (using phase diagrams) and quantitatively (by solving the model analytically). Additionally, numerical simulations are performed in Microsoft Excel to study the dynamic behavior of capital, GDP, consumption, and savings (investment).
This document examines six macroeconomic models of general functions, covering both closed and open economies, typically studied in an intermediate macroeconomics course. In particular, using the implicit function theorem, it analyzes the comparative statics of the impact of changes in one of the exogenous variables and/or in certain parameters—representing policymakers’ economic policy instruments (fiscal, monetary, or trade)—on the endogenous variables of each theoretical model. The deterministic and static models presented in these study notes are based on Casparri and Tarullo (2014), De Gregorio (2007), Jiménez (2006), Chiang & Wainwright (2005), and Malaspina (1994). The closed-economy models analyzed include: (i) the national income model, (ii) the IS-LM model, and (iii) the neoclassical synthesis model. The open-economy models analyzed are: (i) the IS-LM model with trade flows with the rest of the world, (ii) the IS-LM model with a floating exchange rate and both trade and financial flows in the balance of payments, and (iii) the Mundell-Fleming model with perfect and imperfect financial capital mobility, under both fixed and flexible exchange rates.
This document uses Microsoft Excel's "Solver" tool to: (i) determine the optimal portfolio that minimizes risk (measured by variance) for the annual return, achieving an average annual return of r*; (ii) given that V* is the minimum variance found in (i), identify the portfolio that maximizes the average return while maintaining an annual return variance of V*; (iii) construct the efficient frontier for the case in (i); and (iv) solve case (a) under the assumption that short selling is not allowed, ensuring the investor’s wealth does not become negative in period T.
LECTURE NOTES
Microeconomics and Economic Regulation
This brief note examines the relationship between returns to scale associated with a homogeneous production function and economies of scale linked to the minimum cost function, which is derived from the production function analyzed. It also shows that the link between returns and economies of scale is the degree of homogeneity of the production function. Finally, this relationship is analyzed for the case of a Cobb-Douglas production function.
This document analyzes how producers decide (in the long term) on the optimal combination of production factors (inputs) that maximizes the profits they obtain from the production and sale of a single product. To this end, three cases are analyzed: i) the producer maximizes profits while facing a restriction on the level of production, ii) the producer maximizes profits while facing a restriction on the level of costs, and iii) the producer maximizes profits without cost restrictions and without restrictions on the level of production. The analysis shows that: case i) is equivalent to minimizing costs subject to a given level of production, and case ii) is equivalent to maximizing production subject to a given level of costs. Furthermore, case iii) is resolved using two equivalent methodologies: I) focused on choosing the optimal quantities of inputs (in a single stage), and II) focused on choosing the optimal level of production (in two stages: in the first stage, production costs are minimized for a fixed level of production; and in the second stage, once the minimum costs for each level of production are known, the optimal level of production that maximizes profits is decided). In all cases, it is assumed that the technology is given and fixed (represented by the functional form of production), and that both the unit price of the product and the prices of the inputs are given and fixed (i.e., the producer is a price taker in the product market and in the inputs market). As a result of this analysis, case i) yields the demands for inputs conditioned by the level of production and the minimum long-term costs, case ii) yields the demands for inputs conditioned by the level of costs and the optimal level of production conditioned by the level of costs, and case iii) yields the demands for inputs (unconditioned), the supply function, and the optimal profit function. Likewise, the duality relationships between case i) and case ii), and between case i) and case iii) are examined.
This document examines the model developed by Laffont and Tirole (2000), in which they determine the set of optimal prices—those that maximize unweighted social welfare—that a benevolent regulator should set in three final markets: the incumbent’s local network services, the incumbent’s long-distance network services, and the entrant’s long-distance network services. In these markets, marginal-cost pricing is not feasible because the presence of fixed costs cannot be subsidized externally by the government, and because the incumbent must be allowed to earn normal economic profits.
The document also analyzes the calculation of the optimal access charge that an entrant to the long-distance network services market (which is in the process of being liberalized) should pay the incumbent. To provide long-distance calling services to its end users, the entrant must not only deploy its own long-distance facilities but also obtain “access” to the incumbent’s local network facilities at both the originating and terminating ends. The incumbent holds an exclusive concession over local network facilities and is vertically integrated into the provision of both local and long-distance calls.
This document analyzes the Ramsey-Boiteux pricing strategy, a second-best-quality pricing approach for a multi-product public monopoly. Its objective is to maximize social welfare by setting prices that vary inversely with the elasticity of demand, subject to achieving non-negative but lower profits than those that an unregulated monopolist would obtain.
This document analyzes consumer theory. First, it examines how consumers decide on the optimal combination of quantities of goods they wish to consume so that this combination maximizes their utility (a function that reflects consumer preferences and measures the degree of satisfaction they obtain from consuming certain quantities of two consumer goods), subject to a budget constraint (primal problem). Second, it analyzes the problem of minimizing consumer expenditure subject to a certain level of utility (dual problem). In both cases, it is assumed that consumer preferences (the utility function) are known and that consumer income and the prices of consumer goods are given and fixed. As a result of this analysis, the primal problem yields uncompensated (Marshallian) demands for consumer goods, while the dual problem yields compensated (Hicksian) demands for consumer goods.
Macroeconomics
Python
In this document, using the Python programming language, a basic Dynamic Stochastic General Equilibrium (DSGE) model of the real business cycle (REC) type is solved numerically. The model presented in this document follows Costa (2016), and the numerical solution of the log-linearised version of this model ˗around its non-stochastic steady state˗ is based on the codes of the models simulated in the Python ‘linearsolve’ module developed by Brian C. Jenkins.
In this document, from the perspective of a benevolent social planner, I show the numerical solution of the log-linear version of the real business cycle (RBC) model of Hartley, J.; Hoover, K. and Salyer, K. (1998). Using the “Linearsolve” module developed by Brian C. Jenkins, I numerically simulate the response of the artificial economy to: (i) a single-period productivity shock, (ii) a succession of random technology shocks.
This docuement numerically solves the log-linearized version of a prototypical Real Business Cycle (RBC) model, linearized around its steady state, based on Stadler (1994) and Torres (2016). From the perspective of a social planner, the reduced and log-linearized model is solved numerically using the Python module "linearsolve," developed by Brian C. Jenkins. Specifically, the document numerically simulates the artificial economy's response to (i) a single-period productivity shock and (ii) a sequence of random technological shocks.
In this document, the continuous version of a dynamic model of inflation in a closed economy, where there are only two markets (one for goods and services and one for money), is analysed. In particular, the presence of a degenerate Hopf bifurcation is analysed and numerically simulated using Matlab and Python.
This document is based on section 1.3.1. of Argandoña et al. (1996) and Torres (2012). Other inflation models can be found in Shone (2002) and (2003).
Matlab
This document analyses a linear dynamyc IS-LM model from the Keynesian approach and for a closed economy. Under this approach it will be assumed that prices are fixed or equivalently that aggregate supply has infinite elasticity at that given price level. For this purpose, using the software Matlab, numerical simulations of a linear version of the model are carried out.
In this document, following Romer (2018), a continuous-time version of Tobin's q model is solved analytically and numerically. To do so, we use optimal control theory and Matlab software.
Dynare
Following Walsh (2017), this document employs a Cash-in-Advance (CIA) model to investigate the role of money within a Dynamic Stochastic General Equilibrium (DSGE) framework, where economic fluctuations are driven by both real productivity shocks and money growth shocks. After linearizing the model around its non-stochastic steady state, the dynamic responses of key macroeconomic variables—including output, capital, employment, consumption, real money balances, interest rates, inflation, and investment—to these exogenous shocks are simulated numerically using Dynare.
This document studies a standard dynamic general equilibrium model of a small open endowment economy with incomplete financial markets (Lubik, 2007; Uribe & Schmitt-Grohé, 2017). The economy features a one-period risk-free bond that residents can trade freely, defining a “small” economy unable to affect world prices (McCandless, 2008). With only this bond available, the stochastic model is nonstationary, as equilibrium dynamics follow a random walk. The goals are to solve the linearized SOE system analytically, show that variances of debt, consumption, and the trade balance diverge, and simulate the economy’s response to i.i.d. and AR(1) endowment shocks using Dynare.
In this notebook, I replicate the numerical results and simulations of the External Debt-Elastic Interest Rate (EDEIR) model developed by Uribe and Schmitt-Grohé (2003, 2017). Although Uribe and Schmitt-Grohé (2003, 2017) provide Matlab-based implementations of several small open economy real business cycle (SOE-RBC) models-including versions with endogenous interest-rate premia-I focus here exclusively on the specific EDEIR configuration used in their quantitative exercises.
The goal of this notebook is to produce a transparent Dynare-based implementation of the EDEIR model and to reproduce its steady state, impulse responses, and stochastic simulations. Unlike the Matlab implementations by Uribe and Schmitt-Grohé (2003, 2017)-which specify the equilibrium conditions in nonlinear levels and then obtain the linear approximation numerically-my Dynare code inputs the analytically log-linearized model directly. I also compare my Dynare implementation with the influential Dynare code developed by Pfeifer, who writes the SOE-RBC model in nonlinear form and relies on Dynare's internal linearization routines.
Despite methodological differences-analytical versus automatic linearization-both approaches generate results consistent with the benchmark findings in Uribe and Schmitt-Grohé (2003, 2017). This confirms the robustness of the EDEIR framework and highlights Dynare's reliability for replicating canonical models in international macroeconomics.