Applications of Mathematical Economics

Similar documents
Chapter 1. Introduction. 1.1 Background

Solution Methods. Jesús Fernández-Villaverde. University of Pennsylvania. March 16, 2016

Macroeconomics Theory II

Chapter 6. Maximum Likelihood Analysis of Dynamic Stochastic General Equilibrium (DSGE) Models

History of Scientific Computing!

Perturbation Methods I: Basic Results

Bayesian Estimation of DSGE Models: Lessons from Second-order Approximations

High-Performance Scientific Computing

Monetary and Exchange Rate Policy Under Remittance Fluctuations. Technical Appendix and Additional Results

INTENSIVE COMPUTATION. Annalisa Massini

Introduction to numerical computations on the GPU

Parallel Performance Theory - 1

Parallel Performance Theory

Bayesian Inference for DSGE Models. Lawrence J. Christiano

Volume 30, Issue 3. A note on Kalman filter approach to solution of rational expectations models

MA Advanced Macroeconomics: Solving Models with Rational Expectations

DSGE-Models. Limited Information Estimation General Method of Moments and Indirect Inference

DSGE MODELS WITH STUDENT-t ERRORS

Model Order Reduction via Matlab Parallel Computing Toolbox. Istanbul Technical University

Applications for solving DSGE models. October 25th, 2011

Decentralised economies I

Real Business Cycle Model (RBC)

DSGE-Models. Calibration and Introduction to Dynare. Institute of Econometrics and Economic Statistics

BEAR 4.2. Introducing Stochastic Volatility, Time Varying Parameters and Time Varying Trends. A. Dieppe R. Legrand B. van Roye ECB.

Lagrangian Data Assimilation and Manifold Detection for a Point-Vortex Model. David Darmon, AMSC Kayo Ide, AOSC, IPST, CSCAMM, ESSIC

Advanced Econometrics III, Lecture 5, Dynamic General Equilibrium Models Example 1: A simple RBC model... 2

Dynamic Models with Serial Correlation: Particle Filter Based Estimation

Welcome to MCS 572. content and organization expectations of the course. definition and classification

Research Division Federal Reserve Bank of St. Louis Working Paper Series

Macroeconometric modelling

DSGE Methods. Estimation of DSGE models: GMM and Indirect Inference. Willi Mutschler, M.Sc.

Cactus Tools for Petascale Computing

Nuclear Physics and Computing: Exascale Partnerships. Juan Meza Senior Scientist Lawrence Berkeley National Laboratory

Introduction to Macroeconomics

Economics 701 Advanced Macroeconomics I Project 1 Professor Sanjay Chugh Fall 2011

Paul Karapanagiotidis ECO4060

Solving Linear Rational Expectation Models

Solving a Dynamic (Stochastic) General Equilibrium Model under the Discrete Time Framework

Formulating, Estimating, and Solving Dynamic Equilibrium Models: an Introduction. Jesús Fernández-Villaverde University of Pennsylvania

An Introduction to Perturbation Methods in Macroeconomics. Jesús Fernández-Villaverde University of Pennsylvania

CS 188: Artificial Intelligence Spring 2009

Ambiguous Business Cycles: Online Appendix

Real Business Cycle Theory

Fundamentals of Computational Science

Estimating Macroeconomic Models: A Likelihood Approach

SOLVING LINEAR RATIONAL EXPECTATIONS MODELS. Three ways to solve a linear model

Computing first and second order approximations of DSGE models with DYNARE

DSGE models: problems and some personal solutions. Fabio Canova EUI and CEPR. March 2014

Introduction to Rational Expectations

1 Computing the Invariant Distribution

The Particle Filter. PD Dr. Rudolph Triebel Computer Vision Group. Machine Learning for Computer Vision

Shortest Lattice Vector Enumeration on Graphics Cards

Bonn Summer School Advances in Empirical Macroeconomics

Bayesian Methods for DSGE models Lecture 1 Macro models as data generating processes

A Parallel Implementation of the. Yuan-Jye Jason Wu y. September 2, Abstract. The GTH algorithm is a very accurate direct method for nding

Master 2 Macro I. Lecture notes #12 : Solving Dynamic Rational Expectations Models

Universität Dortmund UCHPC. Performance. Computing for Finite Element Simulations

DSGE Models in a Liquidity Trap and Japan s Lost Decade

Indeterminacy and Sunspots in Macroeconomics

Asset pricing in DSGE models comparison of different approximation methods

Federal Reserve Bank of Chicago

Study of Causal Relationships in Macroeconomics

Machine Learning. Bayes Basics. Marc Toussaint U Stuttgart. Bayes, probabilities, Bayes theorem & examples

MA Advanced Macroeconomics: 6. Solving Models with Rational Expectations

VCMC: Variational Consensus Monte Carlo

DSGE (3): BASIC NEOCLASSICAL MODELS (2): APPROACHES OF SOLUTIONS

The Kalman Filter ImPr Talk

First order approximation of stochastic models

MSc Time Series Econometrics

CPSC 540: Machine Learning

1 The Basic RBC Model

Chapter 1 Theory and Econometrics

27 : Distributed Monte Carlo Markov Chain. 1 Recap of MCMC and Naive Parallel Gibbs Sampling

Time Series Analysis. James D. Hamilton PRINCETON UNIVERSITY PRESS PRINCETON, NEW JERSEY

On Bayesian Computation

Endogenous Information Choice

Reducing the Run-time of MCMC Programs by Multithreading on SMP Architectures

Are Policy Counterfactuals Based on Structural VARs Reliable?

Previously Monte Carlo Integration

Linearization. (Lectures on Solution Methods for Economists V: Appendix) Jesús Fernández-Villaverde 1 and Pablo Guerrón 2 February 21, 2018

Introduction to Numerical Methods

Introduction to Coding DSGE Models with Dynare

Matlab Programming and Quantitative Economic Theory

Macroeconomics Theory II

Overview: Parallelisation via Pipelining

Perm State University Research-Education Center Parallel and Distributed Computing

Approximate Bayesian Computation: a simulation based approach to inference

SMOOTHIES: A Toolbox for the Exact Nonlinear and Non-Gaussian Kalman Smoother *

arxiv: v1 [hep-lat] 7 Oct 2010

High-dimensional Problems in Finance and Economics. Thomas M. Mertens

Matlab Toolkit for Solving Macroeconomic Models using Value Function Iteration

Approximate Inference Part 1 of 2

CS187 - Science Gateway Seminar for CS and Math

The Metropolis-Hastings Algorithm. June 8, 2012

Dense Arithmetic over Finite Fields with CUMODP

Part 1: Expectation Propagation

Bias-Variance Error Bounds for Temporal Difference Updates

Approximate Inference Part 1 of 2

Supercomputing: Why, What, and Where (are we)?

Linear Models with Rational Expectations

Transcription:

Applications of Mathematical Economics Michael Curran Trinity College Dublin

Overview Introduction. Data Preparation Filters. Dynamic Stochastic General Equilibrium Models: Sunspots and Blanchard-Kahn Conditions. Solving and Estimating DSGE Models. Other Quantitative Tools (Bayesian Econometrics, Non-Linear Models). Computers in Economics (Graphical Programming, Parallel Programming, Comparison of Computer Languages in Economics).

Introduction Why should we care about macroeconomics and macroeconometrics? Why take the formal approach in Economics? It is not from the benevolence of the butcher, the brewer, or the baker that we expect our dinner, but from their regard to their own interest. (Wealth of Nations I, ii,2:26-27) Ranges are for cattle. Give me a number.

Introduction Context Lucas Critique Given that the structure of an econometric model consists of optimal decision rules of economic agents, and that optimal decision rules vary systematically with changes in the structure of series relevant to the decision maker, it follows that any change in policy will systematically alter the structure of econometric models. http://www.nobelprize.org/mediaplayer/index.php? id=1743

Data Preparation Why should we study the frequency domain? Data can be thought of as weighted sum of cosine waves. Filters.

Data Preparation Filters Figure: Hodrick-Prescott Filter

DSGE Models Introduction Dynamic Stochastic General Equilibrium. Stability, Multiplicity and Solutions to Linearised Systems: Sunspots in Economics. Blanchard-Kahn Conditions. What if A is not invertible? Time Iteration. Solving and Estimating a DSGE Model.

DSGE Models Stability, Multiplicity and Solutions to Linearised Systems p+1 45 p Figure: Unique solution and multiple steady states

DSGE Models Stability, Multiplicity and Solutions to Linearised Systems p+1 45 p Figure: Multiple solutions and unique (non-zero) steady state

DSGE Models Stability, Multiplicity and Solutions to Linearised Systems ut+1 negative expectations positive expectations 45 u t Figure: Multiple steady states and sometimes multiple solutions

DSGE Models Sunspots in Economics A solution is a sunspot solution if it depends on a stochastic variable from outside the system. https://www.youtube.com/watch?v=ud5vvit08me

DSGE Models Sunspots in Economics Suppose the model is 0 = E [H(p t+1, p t, d t+1, d t )] d t : exogenous random variable A non-sunspot solution is p t = f (p t 1, p t 2,..., d t, d t 1,...) A sunspot solution is p t : f (p t 1, p t 2,..., d t, d t 1,..., s t ) s t : random variable with E [s t+1 ] = 0

DSGE Models Sunspots in Economics Figure: Large sunspots (MDI image of sunspot region 10484).

DSGE Models Sunspots in Economics Figure: Past sun spot cycles sun spots had a Great Moderation.

DSGE Models Sunspots in Economics Figure: Current cycle (at peak again).

DSGE Models Blanchard-Kahn Condition Blanchard-Kahn condition states that the solution of the rational expectations model is unique if the number of unstable eigenvectors of the system is exactly equal to the number of forward-looking (control) variables. Q: What if A is not invertible? A: Use Schur decomposition (Klein, 2000).

DSGE Models Time Iteration Model: Γ 2 k t+1 + Γ 1 k t + Γ 0 k t 1 = 0 Impose solution: k t = ak t 1 Start with a [i] and using guess for tomorrow s behaviour, solve for today s behaviour: Γ 2 a 2 k t 1 + Γ 1 ak t 1 + Γ 0 k t 1 = 0 for all k t 1 (Γ 2 a [i] + Γ 1 )k t + Γ 0 k t 1 = 0 k t = (Γ 2 a [i] + Γ 1 ) 1 Γ 0 k t 1 a [i+1] = (Γ 2 a [i] + Γ 1 ) 1 Γ 0 Advantages: simple; nice convergence properties.

DSGE Models Solving and Estimating DSGE Models Cast in linear/log-linear form or non-linear model representation. Linear solution techniques: Blanchard / Sims / Klein / Method of Undetermined Coefficients. Non-linear solution techniques: global / iteration / local. Calibration and Moment Matching. Estimation: Moment Matching (Generalised Method of Moments / Simulated Method of Moments / indirect inference) / Maximum Likelihood; Bayesian methods (Sequential Monte Carlo and Markov Chain Monte Carlo). Dynare (runs in MATLAB): www.dynare.org and http://www.dynare.org/documentation-and-support/ user-guide/dynare-userguide-webbeta.pdf.

Other Quantitative Tools Bayesian Econometrics Figure: Thomas Bayes Bayes Rule

Bayesian Econometrics and Non-Linear / Non-Gaussian DSGE Models Why Econometrics Should Always and Everywhere be Bayesian: http://sims.princeton.edu/yftp/ EmetSoc607/AppliedBayes.pdf. Why Non-Linear / Non-Gaussian DSGE Models? http://www.nber.org/econometrics_minicourse_2011/.

Computers http://www.youtube.com/watch?v=fg85ggzshmw www.top500.org

A brief history of computing 3000BC abacus (1 FLOP) 1613 ( computer : a person who computes) 1642 Pascal s adding machine 1832 Babbage s difference engine 1904 Diodes 1936 On Computable Numbers (Turing) 1943 Colossus (code breaking) 1945 ENIAC 1947 Transistors 1949 MONIAC 1957 Fortran 1962 Atlas 1969 Arpanet 1970 Unix and C 1976 Cray I (100 MFLOPS) 1983 SX-1 (570 MFLOPS) ETA-10P (750 MFLOPS) [Mendoza: 87/ 91: RBC in SOE] 1994 MPI 1997 OpenMP 2001 Earth Simulator (40 TFLOPS) 2008 Roadrunner (1 PFLOPS) 2009 TCHPC [Trinity College]: Lonsdale (11 TFLOPS) 2013 Tianhe-2 (34 PFLOPS) / Ireland: Fionn (140 TFLOPS) 2014 NVIDIA Geforce GTX Titan Z (8 TFLOPS per card under your desk )

Figure: MONIAC.

Figure: MONIAC and Phillips.

Figure: China s Tianhe-2 (MilkyWay-2).

Simulation Laws of Large Numbers Figure: Illustration of law of large numbers.

Simulation Central Limit Theorems Figure: Illustration of central limit theorem.

Graphical Programming Tapping the supercomputer under your desk: Solving dynamic equilibrium models with graphics processors by Aldrich, Fernández-Villaverde, Gallant and Rubio-Ramírez (2011). http://www.youtube.com/watch?v=2jjxgjcxve0.

Parallel Programming Limits on serial code (memory, CPU time). Split up task into parts that can be parallelised and parts that cannot. Example: 95% of task can be executed in parallel; even with an infinite number of processes on the parallel part, we still need 5% of the original time to execute the serial part. Amdahl s law: maximum speed up is given by 1 S + 1 S N where S is proportion of code to be executed in serial and N is the number of processes in the parallel part.

Amdahl s Law 25 Amdahl s Law 80% 90% 95% 20 15 Speedup 10 5 0 0 20 40 60 80 100 120 Num Procs

Parallel Programming This suggests no point in writing code for more than 8-16 processes... not true! Running on larger problems, often the serial part scales linearly but the parallel part scales with n 2 or n 3. By tackling larger problems, 95% parallel problem can become a 99% parallel problem and eventually a 99.9% parallel problem. 1 S = 99.9%, N = 1024: Amdahl = 506 speedup! Overhead. Low level parallelism [processor] (compiler) vs high level parallelism [interconnect] (programmer). OpenMP for shared memory (PC) vs MPI for distributed memory (cluster): work for C/C++/Fortran.

Comparing Programming Languages in Economics http://economics.sas.upenn.edu/~jesusfv/comparison_ languages.pdf