Supplement 4.  The IS-LM and AS-AD models
To make the connection between theory and observation, spreadsheets can be used to explore macroeconomic models more extensively.  Specifically, by using Excel’s simultaneous equation solving capability, models can be set up, solved, and changed relatively easily.  Further, data can be generated for graphical or statistical analysis.
For example, consider the AS-AD model.  In some intermediate macroeconomics textbooks (e.g., Hall and Taylor (1997)), a macroeconomic model is built up by starting with a Keynesian cross model, adding in an interest rate and money market to get the IS and LM curves, adding in prices to get an AD curve, then constructing an AS curve and/or dynamic price response function to characterize the macroeconomic equilibrium.  When even simple assumptions are made, the algebraic form is very complex for undergraduates, and time consuming to solve from start to finish.  In fact, many intermediate textbooks relegate the algebraic solution to an appendix or eliminate it altogether.  Further, the algebraic complexity makes comparative static and dynamic analyses very time-consuming; it is often not practical to use more than a few numerical examples.  However, detailed analyses are relatively easy if the model is entered into a spreadsheet.  Numerical examples (and associated graphs) of comparative static results are facilitated by changing parameter values, and dynamic analysis is eased with the ability to copy the model across many columns (or rows) to simulate years.
There are several routes the instructor may take in introducing this type of spreadsheet application into class.  As the model is being derived algebraically in class, students can be required to construct the spreadsheet version.  Or, the instructor can distribute copies of completed or partially completed spreadsheets and build assignments around them.  Even when completed sheets are distributed, the spreadsheet approach has some advantages over prepackaged software, because spreadsheets show the interrelationships between the equations.  An assignment calling for students to modify some of the assumptions of a model requires the students to understand how the entire model works.
Consider the short run model in Hall and Taylor (1997).  This is an aggregate demand/price adjustment model that consists of an aggregate demand curve built from the IS-LM model, and an expression that defines how the economy’s prices react to market conditions (essentially an aggregate supply curve).  This price adjustment function assures that the economy returns to potential GDP in the long run.
The Hall and Taylor IS-LM Model
The fundamental spending equations defining real aggregate consumption (C), investment (I), government purchases (G) and net exports (X) are displayed below:
(Consumption function)			C = a + b(Y - T)						(S4.1)
(Investment function)			I = e - dR						(S4.2)
(Government spending)			G = G							(S4.3)
(Net exports function)			X = g - mY - nR						(S4.4)
(Tax function)				T = T_f + tY						(S4.5)
The endogenous and policy variables include total taxes collected from households (T), government purchases (G) real income (Y) and the interest rate (R).  The parameters are the exogenous portions of consumption (a), investment (e), and net exports (g); the marginal propensity to consume (b) and import (m); and the interest sensitivity of investment (d) and net exports (n).  The tax function consists of fixed (lump sum) taxes (T_f) and an income tax (at rate t).
	These spending equations form the IS curve when the “spending balance” assumption of the clearing of the goods market is invoked:
(Spending balance, IS curve)			Y = C + I + G + X .				(S4.6)
By substituting expressions (S4.1) – (S4.5) into (S4.6) and solving for Y as a function of R and parameters, the standard form of the IS curve is found.  However, we will use Excel’s simultaneous equation solving feature to implicitly make these substitutions.  Recall that the IS curve describes all the combinations of interest rates (R) and levels of real GDP (Y) such that spending balance holds.  Specifically, it shows the level of real spending and production (Y) that is undertaken for every interest rate (R).
The financial side of the economy is defined by real money demand (M^d/P) and real money supply (M^s/P):
(Real money demand)			M^d/P = kY - hR						(S4.7)
(Real money supply)			M^s/P = M/P						(S4.8)
The price level is denoted as P, M is the nominal quantity of money in the economy, k is the sensitivity of real money demand to real income, and h is the interest sensitivity of real money demand to the interest rate.
	When the money market equilibrium condition (M^s/P = M^d/P) is invoked, and the resulting expression is solved for R as a function of Y, the LM curve is obtained.
(Money market equilibrium condition, LM curve)	R = (k/h)Y - (1/h)(M/P).			(S4.9)
The LM curve describes all the combinations of interest rates and levels of GDP for which the money market is in equilibrium.  Specifically, it defines each interest rate for which the money market is in equilibrium for every level of GDP.
For Excel to solve the IS-LM model, parameter values are entered into a column of cells in a spreadsheet.  Then, the right-hand side of equations (S4.1) - (S4.6) and (S4.9) are entered into separate cells in the same column using the appropriate cell address for the parameters variables in each formula.  This defines one cell each for variables C, I, G, X, Y  and R respectively, and uses circular references (e.g., the equation for C (S4.1) should refer to the cell for Y (S4.6), and vice versa).  Once the iteration option is checked (under Tools/Options/Calculation), the Excel will solve the system for any set of parameter values.  Figure S4.1 below shows an example of such a spreadsheet.
Figure S4.1:  Solving the IS-LM Model
| A | B | | | A | B
1 | IS/LM Model | | | 12 | Policy variables |
2 | Parameters | | | 13 | G | 1200
3 | a | 220 | | 14 | T_f | 0
4 | b | 0.9 | | 15 | t | 0.3
5 | e | 1000 | | 16 | M | 900.0
6 | d | 2000 | | 17 | Price level |
7 | g | 525 | | 18 | P | 1.0
8 | m | 0.1 | | 19 | Solution |
9 | n | 500 | | 20 | T | 1800.2
10 | k | 0.1583 | | 21 | C | 4000.4
11 | h | 1000 | | 22 | I | 900.2
| | | | 23 | G | 1200.0
| | | | 24 | X | -100.0
| | | | 25 | Y (IS) | 6000.6
| | | | 26 | R (LM) | 5.0%

With a modification to the spreadsheet in Figure S4.1, the IS and LM curves can be plotted.  Specifically, an independent series of R values is needed from which to generate IS and LM data.  Copy the column that defines the IS-LM model (column B) to several adjacent columns, and then insert a row between the IS and LM rows (25 and 26).  In this new row (now row 26), place convenient R values for each column.  Change the IS equation (row 25) to refer to this new R row (the new row 26) rather than the original LM (R) row (now in row 27).  This forces the IS (Y) row (26) to calculate a level of GDP for each of the several different interest rates in the new R row.  The LM row (27) continues to calculate the interest rate implied by the LM curve for the levels of GDP defined by the IS equation.  This provides three rows of data to plot:  the first (25) is a Y series, the second (26) is the IS curve interest rate associated with the level of Y for each column, and the third is the LM curve interest rate associated with the Y values.  Because the Y values are not scaled evenly, an XY-Scatter Plot must be used to plot the data.  A sample graph is shown as Figure S4.2 below.
Figure S4.2:  IS-LM Model

Comparative static analysis can be conducted by changing the parameter values and seeing the change in the worksheet and IS-LM graph.  One way to do this is to copy the worksheet, make the appropriate change, then add the new data to the graph.  This is accomplished by utilizing the Chart/Add Data command.  Care must be taken when adding in a new IS curve.  Specifically, both the GDP and interest rate data must be added, and the “Categories in First Row” box must be checked.
The Hall and Taylor AD/PA model
The aggregate demand (AD) curve defines all the combinations of the price level (P) and real GDP (Y) such that both the spending (IS) and financial (LM) sectors of the economy are simultaneously in equilibrium.  The AD curve is derived algebraically by solving both the IS and LM curves for the interest rate, setting the IS and LM curves equal to one another, and solving the resulting expression for Y as a function of P.  Through the IS and LM curves, a particular point on the AD curve implies a particular interest rate.
Thus, conceptually (and on the spreadsheet), the IS-LM model represents a point on the AD curve.  A full AD schedule can be derived by copying the IS-LM model to several columns, and changing the price level in each column. Use the original IS-LM model (in Figure S4.1), where the IS and LM curves refer to one another – not the version used to obtain the IS-LM graph.  The resulting P and Y data can be plotted using a scatter plot.  This illustrates to students that the IS-LM equilibrium and AD curve are really the same function, the only difference being that the price level is held constant in the IS-LM model.  The worksheet labeled Figure S4.3 below shows an example of an AD curve.  The rows are identical to Figure S4.1 above, except the price row has been moved to the bottom.  (Ellipses denote rows that are the same as in Figure S4.1.)
Figure S4.3:  The AD curve
| A | B | C | D | E | F
1 | AD Curve | | | | |
2 | Parameters | | | | |
3 | a | 220 | 220 | 220 | 220 | 220
4 | b | 0.9 | 0.9 | 0.9 | 0.9 | 0.9
5-14 | … | … | … | … | … | …
15 | t | 0.3 | 0.3 | 0.3 | 0.3 | 0.3
16 | M | 900.0 | 900.0 | 900.0 | 900.0 | 900.0
17 | Solution | | | | |
18 | T | 1692.6 | 1698.5 | 1704.4 | 1710.5 | 1716.6
19 | C | 3774.5 | 3786.8 | 3799.3 | 3812.0 | 3824.9
20 | I | 765.4 | 772.8 | 780.2 | 787.8 | 795.5
21 | G | 1200.0 | 1200.0 | 1200.0 | 1200.0 | 1200.0
22 | X | -97.9 | -98.0 | -98.1 | -98.2 | -98.3
23 | Y | 5642.1 | 5661.6 | 5681.4 | 5701.6 | 5722.1
24 | R | 11.7% | 11.4% | 11.0% | 10.6% | 10.2%
25 | P | 1.16 | 1.15 | 1.14 | 1.13 | 1.12

	The aggregate supply (AS) curve defines the price level set by firms at a particular point in time for given market conditions – specifically, for the particular level of GDP, relative to potential GDP.  To make the price level endogenous, an equation must be used to describe P.  Rather than use a static AS curve, we adopt the approach of Hall and Taylor (1997) of a price adjustment model which defines how the price level changes over time.  It is assumed that the market reacts to market conditions with a one quarter lag; thus, this approach is equivalent to assuming a flat short run AS curve that begins shifting towards the long run equilibrium after one quarter.  The simplest of these price adjustment models is an adaptive expectations framework.  Suppose that the inflation rate () in period t is defined by:
(Price adjustment)			_t = s_t-1 + f(Y_t-1 - Y_t-1^P)/ Y_t-1^P.				(S4.10)
That is, the current inflation rate is equal to some fixed proportion (s) of last year’s inflation rate (i.e., the expected inflation rate) plus a parameter (f >0) that causes inflation to react to market conditions:  when GDP is above potential (Y^P), inflation increases and when GDP is below potential, inflation decreases.  The price level for any given time period t is P_t = (1+_t)P_t-1.
	This price adjustment mechanism can be incorporated into the IS-LM/AD spreadsheet by adding several additional rows (defining potential GDP, s, f, and the price adjustment equation (S4.10)) and copying the model to several adjacent columns to represent different time periods.  In the first column, an initial (exogenous) value for inflation, potential GDP and the price level must be entered; in succeeding columns, the price adjustment equation will refer to previous columns.  Figure S4.4 is an example of such a spreadsheet.  A value was chosen for potential GDP such that the economy is at potential in the initial quarter.
Figure S4.4:  AS-AD Model
| A | B | C | D | E | | | A | B | C | D | E
1 | AS-AD Model | | | | | | 20 | Solution | | | |
2 | Parameters | | | | | | 21 | Yp | 6000.6 | 6000.6 | 6000.6 | 6000.6
3 | a | 220 | 220 | 220 | 220 | | 22 | infl | 0.0% | 0.0% | 4.6% | 0.0%
4 | b | 0.9 | 0.9 | 0.9 | 0.9 | | 23 | T | 1800.2 | 1869.5 | 1765.7 | 1765.6
5 | e | 1000 | 1000 | 1000 | 1000 | | 24 | C | 4000.4 | 4145.9 | 3928.1 | 3927.8
6 | d | 2000 | 2000 | 2000 | 2000 | | 25 | I | 900.2 | 827.1 | 857.1 | 856.9
7 | g | 525 | 525 | 525 | 525 | | 26 | G | 1200.0 | 1400.0 | 1200.0 | 1200.0
8 | m | 0.1 | 0.1 | 0.1 | 0.1 | | 27 | X | -100.0 | -141.4 | -99.3 | -99.3
9 | n | 500 | 500 | 500 | 500 | | 28 | Y | 6000.6 | 6231.6 | 5885.8 | 5885.4
10 | k | 0.1583 | 0.1583 | 0.1583 | 0.1583 | | 29 | R | 5.0% | 8.6% | 7.1% | 7.2%
11 | h | 1000 | 1000 | 1000 | 1000 | | 30 | P | 1.00 | 1.00 | 1.05 | 1.05
12 | s | 0.5 | 0.5 | 0.5 | 0.5 | | 31 | Time | 0 | 1 | 2 | 3
13 | f | 1.2 | 1.2 | 1.2 | 1.2 | | | | | | |
14 | Policy variables | | | | | | | | | | |
15 | G | 1200 | 1400 | 1200 | 1200 | | | | | | |
16 | Tf | 0 | 0 | 0 | 0 | | | | | | |
17 | t | 0.3 | 0.3 | 0.3 | 0.3 | | | | | | |
18 | mgth | 0 | 0 | 0 | 0 | | | | | | |
19 | M | 900.0 | 900.0 | 900.0 | 900.0 | | | | | | |
 
	Aside from those mentioned, a few additional rows have been added to Figure S4.4.  Specifically, row 18 gives the money supply growth rate, which defines the money supply in row 19.  This is to allow monetary policy to be expressed as growth rates, as they are in the real world.  In addition, a time index (row 31) has been added to keep track of quarters.  It may be desirable to create rows to track other descriptive data, including the percent GDP gap, unemployment rate (from Okun’s Law), and other series.
	A useful application of the spreadsheet model is to examine how the economy returns to the long run equilibrium after a shock.  In fact, Figure S4.4 above shows the effect of a one time increase of government purchases of 200 in quarter 1 (see row 26).  It should be noted that where only 4 quarters are shown in the sheet above, it is often necessary for several more to be added to display an economy converging back to the long run equilibrium after a shock.  The spreadsheet available on this web page that corresponds to Figure S4.4 contains twenty-five quarters.  When the model is tracked for several quarters, graphs can be constructed to display the dynamic price adjustment process, and are easy to build from the sheets using Excel’s Chart Wizard (Use Insert/Chart to start the Chart Wizard).  Figures S4.5 and S4.6 below display twenty-five quarters of data corresponding to the one-time shock to government spending.  Figure S4.5 is the expectations augmented Phillips curve, and Figure S4.6 is the percent GDP gap and inflation rate.  The Phillips Curve exhibits the familiar clockwise swirl towards the natural rate of unemployment, assumed here to be 4.5%.  This pattern matches actual U. S. (and other countries) data.  In the GDP gap-inflation graph, inflation reacts to the GDP gap with a lag.  However, the rising inflation then drives GDP down towards, and then past potential (this “overshooting” leads to stagflation).  The economy recovers from the negative GDP gap with falling prices, and after overshooting again, settles on its initial equilibrium of zero inflation and a zero GDP gap.  Inflation is zero because money growth is zero.
Figure S4.5:  The expectations augmented Phillips Curve response to a spending shock

Figure S4.6:  Inflation and GDP gap reactions to a spending shock

	Aside from shocks, the behavior of the economy under different assumptions may be explored.  For example, rational expectations may be incorporated by assuming that the inflation rate is the growth rate of the money supply.  The permanent income hypothesis can be studied by changing the consumption equation (S4.1) to:
(Permanent Income Hypothesis Consumption function)	C = a + b(Y^P - T^P).			(S4.1)
where Y^P is potential (long run) GDP, and T^P are the taxes that would be collected if income were equal to potential.  Fully accommodated price shocks can be studied by setting the growth rate of the money supply to the inflation rate and subjecting the price level to shocks.  Monetized debt can be studied by setting the growth in the money supply to the government deficit.  The economy under growth can be studied by allowing potential GDP to grow.  The usefulness of the equation of exchange to predict changes in inflation or real GDP can be examined under shocks to money demand.  In summary, the spreadsheet may be used throughout the semester to explore many different topics.  In each case, the changes in assumptions can be compared to the baseline model in graphs by first copying the baseline model sheet to a new sheet, then making the desired change, then using the Chart/Add Data command in the graph to insert data from the new sheet.
Reference
Hall, Robert E. and John B. Taylor, 1997.  Macroeconomics, 5^th edition.  New York:  W. W. Norton and Company.