Code Monkey home page Code Monkey logo

ogcourse_f17's Introduction

MACS 40000: Economic Policy Analysis with Overlapping Generations Models (Autumn 2017)

Dr. Richard Evans
Email [email protected]
Office 250 Saieh Hall
Office Hours W 10:00am-noon
GitHub rickecon
  • Meeting day/time: M,W 1:30-2:50pm, Swift Hall, Room 208
  • Office hours also available by appointment

Prerequisites

Advanced undergraduate or first-year graduate microeconomic theory, linear algebra, multivariable calculus, recommended coding experience.

Texts

  • Evans, Richard W. and Jason DeBacker, Overlapping Generations Models for Policy Analysis: Theory and Computation, unpublished draft (2017).

Course description

This course will study economic policy questions ideally addressed by the overlapping generations (OG) dynamic general equilibrium framework. OG models represent a rich class of macroeconomic general equilibrium model that is extremely useful for answering questions in which inequality, demographics, and individual heterogeneity are important. OG models are used extensively by the Joint Committee on Taxation, Congressional Budget Office, Department of the Treasury, and Federal Reserve System for policy analysis in the United States as well as in other developed nations.

This course will train students how to set up and solve OG models. The standard nonlinear global solution method for these models--time path iteration--is a fixed point method that is similar to but significantly different from value function iteration and policy function iteration. This course will take students through progressively richer versions of the model, which will include endogenous labor supply, nontrivial demographics, bequests, stochastic income, multiple industries, non-balanced government budget constraint, and household tax structure.

We will be focusing on computational strategies, modularity of code, sensitivity and robustness to assumptions, and policy questions that can be answered with this framework. Students can use whatever programming language they want, but I highly recommend you use Python 3.x (Anaconda distribution). I will be most helpful with code debugging and suggestions in Python. We will also study results and uses from recent papers listed in the "References" section below. The dates on which we will be covering those references are listed in the "Daily Course Outline" section below.

Course Objectives and Learning Outcomes

  • You will know how to augment the standard overlapping generations model framework to answer policy questions.
  • You will know the computational methods to solve for the steady-state and transition path equilibria of the model.
  • You will learn computational tools such as:
    • Constrained minimization
    • Multi-equation root finder with occasionally binding constraints
    • Interpolation
    • Curve fitting
    • Parametric and nonparametric estimation
  • You will learn coding and collaboration techniques such as:
    • Best practices for Python coding (PEP 8)
    • Writing modular code with functions and objects
    • Creating clear docstrings for functions
    • Collaboration tools for writing code using Git and GitHub.com.

Grades

Grades will be based on the four categories listed below with the corresponding weights.

Assignment Points Percent
Homework 100 50%
Midterm 50 25%
Final Exam 50 25%
Total points 200 100%
  • Homework: I will assign 8 problem sets throughout the term, and I will drop your one lowest problem set score.
    • You must write and submit your own computer code, although I encourage you to collaborate with your fellow students. I DO NOT want to see a bunch of copies of identical code. I DO want to see each of you learning how to code these problems so that you could do it on your own.
    • Problem set solutions, both written and code portions, will be turned in via a pull request from your private GitHub.com repository which is a fork of the class master repository on my account. (You will need to set up a GitHub account if you do not already have one.)
    • Problem sets will be due on the day listed in the Daily Course Outline section of this syllabus (see below) unless otherwise specified. Late homework will not be graded.
  • Midterm: The midterm will be given on Wednesday, October 25, during class and will cover the material up to that point in the course.
  • Final Exam: The final exam will be comprehensive and will be given on Wednesday, Dec. 6, from 1:30 to 3:30p.m. in our classroom (Swift 208).

Daily Course Schedule

Date Day Topic Readings Homework
Sep. 25 M Python, Git, OG Models Ch. 1, tutorials
Weil (2008)
N&S (2007)
Sep. 27 W 3-period-lived model: theory Ch. 5 PS 1
Oct. 2 M 3-period-lived model: theory Ch. 5
Oct. 4 W 3-period-lived model: computation Ch. 5
Oct. 9 M S-period-lived model Ch. 6
Oct. 11 W Endogenous labor supply Ch. 7 PS 2
P (2016)
E&P (2016)
Oct. 16 M Endogenous labor supply Ch. 7 PS 3
Oct. 18 W Endogenous labor supply Ch. 7
Oct. 23 M Endogenous labor supply Ch. 7
Oct. 25 W Midterm 1 (Chs. 1-7) PS 4
Oct. 30 M Bequests: simple Ch. 11
D (2015)
DEMPRS (2016)
Nov. 1 W Bequests: simple Ch. 11
Nov. 6 M Bequests: calibrated from SCF Ch. 11 PS5
N (2015)
Nov. 8 W Population demographics Ch. 10 PS6
Nov. 13 M Population demographics Ch. 10
Nov. 15 W Population demographics Ch. 10 PS7
DEP (2016)
Nov. 20 M Tax functions in OG model Ch. 14
Nov. 22 W Tax functions from microsimulation Ch. 14 PS 8
Nov. 27 M Tax functions from microsimulation Ch. 14
Nov. 29 W Multiple industry model Ch. 17 PS9
Exam preparation (reading) days, Nov. 30-Dec. 1
Dec. 6 W Final Exam (comprehensive)
1:30-3:30p.m. in Swift 208

References

  • De Nardi, Mariacristina, "Quantitative Models of Wealth Inequality: A Survey," National Bureau of Economic Research, NBER Working Paper 21106 (April 2015).
  • DeBacker, Jason, Richard W. Evans, Evan Magnusson, Kerk L. Phillips, Shanthi Ramnath, and Isaac Swift, "The Distributional Effects of Redistributional Tax Policy," under review at Quantitative Economics (August 2016).
  • DeBacker, Jason, Richard W. Evans, and Kerk L. Phillips, "Integrating Microsimulation Tax Functions into a DGE Macroeconomic Model: A Canonical Example," mimeo (August 2016).
  • Evans, Richard W. and Jason DeBacker, Overlapping Generations Models for Policy Analysis: Theory and Computation, unpublished draft (2017).
  • Evans, Richard W. and Kerk L. Phillips, "Advantages of an Ellipse when Modeling Leisure Utility," Computational Economics, (forthcoming, 2016).
  • Furman, Jason, "Can Tax Reform Get Us to 3 Percent Growth?" [Slides], Talk at New York Association for Business Economics (November 3, 2017).
  • Nishiyama, Shinichi, "Fiscal Policy Effects in a Heterogeneous-agent OLG economy with an Aging Population," Journal of Economic Dynamics & Control, 61, pp. 114-132 (December 2015).
  • Nishiyama, Shinichi and Kent Smetters, "Does Social Security Privatization Produce Efficiency Gains?," Quarterly Journal of Economics, 122:4, pp. 1677-1719 (November 2007).
  • Peterman, William, "Reconciling Micro and Macro Estimates of the Frisch Labor Supply Elasticity," Economic Inquiry, 54:1, pp. 100-120 (January 2016).
  • Weil, Philippe, "Overlapping Generations: The First Jubilee," Journal of Economic Perspectives, 22(4), 115-134 (Fall 2008).

Disability services

If you need any special accommodations, please provide us with a copy of your Accommodation Determination Letter (provided to you by the Student Disability Services office) as soon as possible so that you may discuss with me how your accommodations may be implemented in this course.

ogcourse_f17's People

Contributors

jfan3 avatar rickecon avatar sophiamo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

ogcourse_f17's Issues

Plotting code

This issue gives some example code for making basic line plots in Python using (primarily) the matplotlib.pyplot library, as well as some nice flexible ways to decorate those plots and save them to memory.

First import the following four libraries.

# Import libraries
import matplotlib.pyplot as plt
from matplotlib.ticker import MultipleLocator
import os
import numpy as np

The matplotlib.ticker.MultipleLocator library places grid lines on your plots in nice places. The os library gives you a list of directory functions that work across platforms (e.g., Windows, OSX, Linux). The numpy import is just for convenience in the big block of plotting code below.

Then I use some code that names the current directory in which you are working, cur_path and creates a folder in that directory called images if that folder doesn't already exist.

# Create directory if images directory does not already exist
cur_path = os.path.split(os.path.abspath(__file__))[0]
output_fldr = 'images'
output_dir = os.path.join(cur_path, output_fldr)
if not os.access(output_dir, os.F_OK):
    os.makedirs(output_dir)

Lastly, I use a block of code like the following to make a line plot of multiple series with a title, legend, grid lines, tick marks, axis labels, and titles. You can explore lots of other options with the matplotlib library.

# Make a plot of two lines
x_vals_1 = np.arange(1, 10)
x_vals_2 = np.arange(1, 10)
y_vals_1 = -0.5 * np.linspace(0, 9, 9) + 38.0
y_vals_2 = 2 * np.linspace(-1, 8, 9)
fig, ax = plt.subplots()
plt.plot(x_vals_1, y_vals_1, marker='D', label='Series 1')
plt.plot(x_vals_2, y_vals_2, marker='o', label='Series 2')
# for the minor ticks, use no labels; default NullFormatter
minorLocator = MultipleLocator(1)
ax.xaxis.set_minor_locator(minorLocator)
plt.grid(b=True, which='major', color='0.65', linestyle='-')
plt.title('Example plot of Series 1 and Series 2', fontsize=20)
plt.xlabel(r'$x$-values')
plt.ylabel(r'$y$-values')
plt.xlim((0.0, 10.0))
plt.ylim((-3.0, 20))
plt.legend(loc='upper left')
output_path = os.path.join(output_dir, 'plot_title')
plt.savefig(output_path)
# plt.show()
plt.close()

Two notes.

  1. The second-to-last line has the plt.show() command commented out. If you uncomment this, your program will stop and render the plot on your screen. The drawback to doing this is that your program will not move forward past that plt.show() command until you close the plot on your screen.
  2. The last line is the plt.close() command. If you don't put this command in your script, the plots you create will pile up in your computer's memory, which can eventually freeze your machine. Including the plt.close() command solves this problem.

@jfan3 @SophiaMo

link to survey?

Hi Professor Evans,

Could you send me the survey link again? Maybe I missed it but I couldn't find it in the email...

Thanks!

Best,
Fiona

Generalized Method of Moments (GMM) estimation

In order to estimate the parameters to fit the tax functions in Problem Set 9 and to do weighted least squares, you will need to use generalized method of moments. I have a notebook for doing GMM in Python.

Let your error vector be eps_i and let your vector of population weights be w_i, and let theta be your vector of parameters to estimate. The GMM estimation problem, stated as a minimization problem is the following. Choose the vector of parameters to minimize the weighted sum of squared errors.

sum_i [ w_i *(eps_i ** 2) ]

You can substitute in the expression for eps_i in terms of paramters theta and data TotInc. In the linear case in Exercise 1a, the objective function being minimized is:

sum_i [ w_i * ( {ETR_i - beta_0 - beta_1 * TotInc_i} ** 2)]

You can write a criterion function that takes as arguments the values of the parameters and the data and returns the value of the criterion function at those values.

def criterion_lin(beta_vec, *args):
    '''
    --------------------------------------------------------
    Criterion function as a function of parameters and data
    --------------------------------------------------------
    INPUTS:
    beta_vec = (2,) vector, parameters to be estimated
    args     = length 3 tuple, (ETR, TotInc, weights)

    OBJECTS CREATED IN THIS FUNCTION:
    beta_0   = scalar, intercept value of linear function
    beta_1   = scalar, slope value of linear function
    ETR      = (N,) vector, effective tax rate data vector
    TotInc   = (N,) vector, total income data vector
    weights  = (N,) vector, population weights vector
    err_vec  = (N,) vector, epsilon errors vector
    crit_val = scalar, criterion value

    RETURNS: crit_val
    '''
    beta_0, beta_1 = beta_vec
    ETR, TotInc, weights = args
    err_vec = ETR - beta_0 - beta_1 * TotInc
    crit_val = (weights * (err_vec ** 2)).sum()

    return crit_val

You can then use scipy.optimize.minimize() to choose values of beta_0 and beta_1 that minimize that criterion function. @SophiaMo @jfan3

Question about Chi_s

EDIT: Sorry I just saw in the lecture note that Chi_s is 1...

Hi Professor Evans! (Sorry for posting this on a Sunday...)

I am a bit confused about what numbers to use for '$\Chi_s^n$'. Should it be a calibrated array or just number?

Thanks!

Best,
Fiona

Added Furman slides on demographics and dynamic analysis

@jfan3 and @SophiaMo . I just added to this repository the slides from a presentation that Jason Furman gave last week at the New York Association of Business Economists meeting on tax reform. The slides highlight two key components of this OG course:

  1. The importance of demographics in correctly predicting the macroeconomy.
  2. The 7 deadly sins of overly optimistic dynamic scoring.

Enjoy.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.