key: cord-0469181-pyyvn9c4 authors: Dominguez-Moran, Juan; Geismar, Rouven title: Teaching Economics with Interactive Browser-Based Models date: 2020-08-06 journal: nan DOI: nan sha: 3b90f37b5f6b03c4d5e6d0ded83bec6b4ef94ecc doc_id: 469181 cord_uid: pyyvn9c4 Interactive simulation toolkits come in handy when teaching macroeconomic models by facilitating an easy understanding of underlying economic concepts and offering an intuitive approach to the models' comparative statics. Based on the example of the IS-LM model, this paper demonstrates innovative browser-based features well-suited for the shift in education to online platforms accelerated by COVID-19. The free and open-source code can be found alongside the standalone HTML files for the AD-AS and the Solow growth model at https://gitlab.tu-berlin.de/chair-of-macroeconomics/. This paper is a companion paper to the browser-based simulation toolkits of the IS-LM, AD-AS and the Solow growth model. The tools are written by Dominguez-Moran and Geismar (2020) and can be found on GitLab (https://gitlab.tubit.tu-berlin.de/ chair-of-macroeconomics). 1 The paper describes how the simulation toolkits can be used to study and teach macroeconomic models and get an intuition for their comparative statics. They facilitate an easy understanding of the underlying economic concepts and the mechanics of the IS-LM, AD-AS and the Solow growth model which are commonly used in academic teaching. Based on the example of the IS-LM model, this paper demonstrates the functionalities and the innovative features of the toolkits. 2 In addition, the structure of the IS-LM program code, which is distributed under the open source software license GNU AGPLv3, is presented. 3 The software is implemented using Python and the interactive visualization library bokeh. 4 If you use the simulation tools for teaching, we would be grateful for your feedback or a picture of you utilizing the toolkits in class. If you find inspiration in this project for building your own interactive model, we would very much appreciate if you could let us know about your project by mail (r.geismar@outlook.com) or twitter (@osyphys). The basic version of the IS-LM model explains how output Y and interest rate i are determined in the short-run. Its simplicity and intuititve appeal are reasons for why it is still used in accademic teaching. It captures essential economic phenomena and hence provides a good starting point for teaching economics. The model describes equilibria on the goods (IS-curve) and the financial (LM-curve) markets. The intersection of both curves determines the short-run equilibrium of the economy. To study the labor market, wage and price developments in the medium-and long-run, one has to use a different model, e.g. AD-AS model. 5 For more details and discussion of the IS-LM framework see Blanchard, 2017 . Aggregate consumption in the economy is given by C = A + c(Y − T ) where A denotes autonomous consumption, c is the marginal propensity to consume, Y denotes aggregate production ( = aggregate income) and T are lump-sum taxes. Aggregate investment is defined as I = B − br. B denotes autonomous investment, b is the responsiveness of investment to interest rates and r denotes the real interest rate. The Fisher equation is given by r = i − π e where i is the nominal interest rate and π e is expected inflation. The aggregate demand for goods is given by ZZ = C + I + G + N X where G is government spending and N X are net exports. In the short-run equilibrium the demand for goods has to equal production, ZZ = Y . Using the previous definitions and rearranging the equation yields the negatively sloped IS-equation The economic intuition is that an increase in the interest rate leads to a decrease in investment, and hence output. Since output corresponds to aggregate income, people cut back their consumption. This reduction in aggregate demand depresses economic activity further and creates a 'multiplier effect'. The aggregate real money demand is given by L(Y, i) = h 1 Y −h 2 i where h 1 and h 2 are the responsiveness of income to money demand and the responsiveness of money demand to interest rates, respectively. The real money supply is denoted by M/P where P denotes the price level. When money supply equals money demand, M/P = L(Y, i), the financial markets are in equilibrium. Because the nominal interest rate is assumed to be greater or equal to zero, the LM-curve exhibits a kink at the zero lower bound: The intuition for the positive slope of the LM-curve is that an increase in income leads to an increase in money demand (e.g. transaction motive). If the central bank decides to hold the money supply fixed ('money supply control') the interest rate has to rise to equilibrate money supply and money demand. If the central bank decides to hold the interest rate fixed ('interest rate control') the money supply has to adjust endogenously. An aggregate macroeconomic equilibrium is defined as a state where the goods market and the financial markets are simultaneously in equilibrium. This is the case where the IS and the LM curves intersect. The user interface (UI) of the program is divided into two major sections. In Section 1 the model's parameter values (inputs) are chosen. Section 2 represents the analysis and description section. To conduct counterfactual analysis, three models (tabs Model 1 to Model 3 ) will serve as a 'playground'. We will now analyze what happens to the short run equilibrium if the economy experiences an increase in aggregate demand (e.g. an increase in government spending G). We will start with the default values given by model 1. In this case, the equilibrium values of the output and interest rate of the economy are given by 1050 currency units (CU) and 5%, respectively. 6 Now we use the Model 2 tab to simulate an exogenous government spending shock. First, we copy the starting values of Model 1 to Model 2 by pressing the 'Assign Values of Model 1' button on top of Section 1. To see changes to the model happen in real time, we turn on the plots for Model 2 by pressing the 'Model 2' buttons on top of each graph. Now, we increase government spending G to 310 CU by using the slider. This shifts the IS-curve to the right and the deficit increases to -110 CU. If the central bank decides to keep the money supply fixed ('money supply control') the interest rate rises to offset the rise in money demand. This leads to crowding out of private investment. Now, suppose the central bank wants to accommodate the increase in the nominal interest rate by increasing the money supply. To implement this policy response, first copy the parameter values of Model 2 to Model 3. 7 Then increase the money supply M by moving the slider as long as the interest rate is back on its starting value of Model 1. Alternatively, implement the target interest rate directly by moving the slider 'Interest Rate Control'. In the latter case, the money supply will adjust endogenously to the interest rate set by the central bank. 8 As a result, the LM-curve moves to the right until it crosses the new IS-curve at the old interest rate. This defines the economy's new short-run equilibrium with higher output and private consumption. Now students can compare the effects of the original shock in Model 2 with the effects of the policy response in Model 3. The program has no object-orientation. In ./demo there is a version that can run offline since the scripts that are usually loaded from the bokeh server have been downloaded and their paths specified in the standalone html. The file in config/build_config.py is an optional tool for creating the config files. Since the whole program makes generalized use of dictionary unpacking when invoking functions, it is possible for example to not only change arguments destined for plot style, but to add new parameters by looking up their names in the bokeh docs. Prerequisites can be installed using pip as follows: pip install -r requirements.txt The command to create the standalone html at html/IS-LM.html is python3 main.py Macroeconomics: A European Perspective Bokeh: Python library for interactive visualization Python 3 Reference Manual