next up previous
Next: The Lunar Landing: Hoax Up: No Title Previous: Lake modeling

Subsections

Macroeconomic Model Simulation

Eric Kostrowski

Introduction

During the time of the Great Depression John Keynes developed the greatest breakthrough in the field of macroeconomics, a model of the economy that logically explained the causal relationships between the major macro-variables. The basic model explains the workings of the goods and services market using GDP. It also describes the relationship between the financial markets and the goods market. Many economists have worked to extend the new Keynesian model to further detail. The extensions often occurred in order to explain recent economic activity that wasn't fully modeled in the Keynesian model.

This project will encompass the development of simulation for the new Keynesian model of the macroeconomy. The project will have the unique aspect of being able to accept extensions to the basic model in the form of "plug-ins." These "plug-ins," written by advanced users, will enable the application to handle more complex models. The application will use the basic model, and the addition of the option "plug-ins" to provide a GUI to the common user, by which they may simulate the economy.

The Basic Model

Major Variables:

Goods and Services Market:

Z :
Demand for Goods and Services
C :
Personal Consumption Expenditures
I :
Gross Private Investment
G :
Government Expenditures
T :
Taxes
Y :
Production (= Income)

Financial Markets:

H :
Monetary Base
CU :
Currency
R :
Reserves Held by Banks
D :
Checkable Deposits
i :
Interest Rate
P :
Price Level
M :
Supply of Money

The basic will not deal with a dynamics of the model, i.e. it will assume that all reactions within the model occur instantaneously, and thus no inventories are held by firms. Also note that the basic economy is assumed to be closed, no imports or exports occur. These assumptions will be laxed within the model with through the use of "plug-ins."

Data Source

All variables above, and hundreds of other related ones, are available from the Bureau of Economic Analysis in their report, "Survey of Current Business." They are online, and provide this report and others at http://www.bea.doc.gov/

The Main Application

The main application will use a GUI to present the common user with a convenient interface to the model simulation. The user will first set up the model. They will do this by selecting the optional "plug-ins" that they wish to have in order to provide a level of detail specific to their purpose. Next they will select the starting data for the project. They will have the option of choosing from a number of historical data or of entering values in on their own.

Once the model is set up the user may put the simulation into action. The simulation will increment on a user defined time period (typically one quarter), calculating all aspects of the model at each step. The user can view any number of graphs from a selection of popular graphs (defined in the "plug-ins") or choose a custom graph. The application will have the capability of displaying a variety of different graph forms, including line, bar, and pie graphs.

The user can examine how the economy reacts to certain events by introducing certain scenarios into the simulation. These scenarios are defined within the "plug-in" system. The simulation sets a start point for each scenario as initiated by the user. The results of the scenario, the effect on every variable or aspect of the model can be examined on a dynamic basis.

The Plug-in System

The plug-in system represents the heart of the application. It enables the nearly limitless extension of the model. A plugin is written in a pseudo-subset of C. The script language will have the nearly the same syntax as C, however the language is extended with definitions of equations as specific types. The actually syntax and semantics of the script language are not fully developed as of yet. However, the main purpose of a plug-in script will be to: 1) define extensions of the model; 2) define pregenerated scenarios; 3) to define base graphs (those which need not be user defined).

The scripts will be based on an inheritance system. Each script must inherit from a more generally defined (definition of model is less detailed) script. The child script will have the ability to override certain definitions and functions. All scripts must eventually be inherited from the base model definition script.

The definition of resources (bitmaps, fonts, etc.) will be able to be done within the script. The resources could be used for any number of enhancements within the GUI. For instance a bitmap attached to a variable may be used label buttons referring to the variable. In order to manage files better, datafiles that contain multiple resources will be able to be created using a simple utility.

Scripts are read at run-time (as called upon by the user) and compiled to an internal representation of the model. Script files are not locked during operation of the main app. This enables the helper app to modify scripts during operation of the model. Scripts will not be recompiled once the model is in operation, the user will have to specify when recompilation of the scripts should be done.

Helper application

In order to ease the development of plugins, a helper application will be developed. It will use a simple GUI that will enable the more advanced user to visually develop extensions to the model. The program will enable the drag-and-drop creation of resource datafiles, as well as aid in the creation of the script files.

Possible capabilities

The development of an output system may be built into the program. It would enable the data resulting from the simulation of the model to be exported to specific file formats, such as an excel worksheet.

The ability to print graphs and charts may be added. This option will depend upon the constraints of time.

The fetching of script files from locations other than the local machine may also be added. External scripts could then be loaded over the network or internet.


next up previous
Next: The Lunar Landing: Hoax Up: No Title Previous: Lake modeling
Allen B. Downey
1999-03-04