This book presents a set of lectures on Python programming for economics and finance.
The lecture describes important ideas in economics that use the mathematics of geometric series.
Among these are:
• the Keynesian multiplier
• the money multiplier that prevails in fractional reserve banking systems
• interest rates and present values of streams of payouts from assets
As we shall see below, the term multiplier comes down to meaning sum of a convergent geometric series. These and other applications prove the truth of the wise crack that “in economics, a little knowledge of geometric series goes a long way “.
Linear algebra is one of the most useful branches of applied mathematics for economists to invest in. For example, many applied problems in economics and finance require the solution of a linear system of equations. In this lecture we will cover the basics of linear and matrix algebra, treating both theory and computation. We admit some overlap with this lecture, where operations on NumPy arrays were first explained. Note that this lecture is more theoretical than most, and contains background material that will be used in applications as we go along.
In an earlier lecture on Pandas, we looked at working with simple data sets. Econometricians often need to work with more complex data sets, such as panels. Common tasks include:
• Importing data, cleaning it and reshaping it across several axes.
• Selecting a time series or cross-section from a panel.
• Grouping and summarizing data.
Pandas (derived from ‘panel’ and ‘data’) contains powerful and easy-to-use tools for solving exactly these kinds of problems. In what follows, we will use a panel data set of real minimum wages from the OECD to create:
• summary statistics over multiple dimensions of our data
• a time series of the average minimum wage of countries in the dataset
• kernel density estimates of wages by continent
We will begin by reading in our long format panel data from a CSV file and reshaping the resulting DataFrame with pivot_table to build a MultiIndex.
Author(s): Thomas J. Sargent, John Stachurski
Publisher: QuantEcon
Year: 2023
Language: English
Pages: 943
I Tools and Techniques
Geometric Series for Elementary Economics
Modeling COVID 19
Linear Algebra
Complex Numbers and Trigonometry
LLN and CLT
Heavy-Tailed Distributions
II Introduction to Dynamics
Dynamics in One Dimension
AR1 Processes
Finite Markov Chains
Inventory Dynamics
Linear State Space Models
Application: The Samuelson Multiplier-Accelerator
Kesten Processes and Firm Dynamics
Wealth Distribution Dynamics
A First Look at the Kalman Filter
Shortest Paths
Cass-Koopmans Planning Problem
Cass-Koopmans Competitive Equilibrium
III Search
Job Search I: The McCall Search Model
Job Search II: Search and Separation
Job Search III: Fitted Value Function Iteration
Job Search IV: Correlated Wage Offers
Job Search V: Modeling Career Choice
Job Search VI: On-the-Job Search
IV Consumption, Savings and Growth
Cake Eating I: Introduction to Optimal Saving
Cake Eating II: Numerical Methods
Optimal Growth I: The Stochastic Optimal Growth Model
Optimal Growth II: Accelerating the Code with Numba
Optimal Growth III: Time Iteration
Optimal Growth IV: The Endogenous Grid Method
The Income Fluctuation Problem I: Basic Model
The Income Fluctuation Problem II: Stochastic Returns on Assets
V Information
Job Search VII: Search with Learning
Likelihood Ratio Processes
A Problem that Stumped Milton Friedman
Exchangeability and Bayesian Updating
Likelihood Ratio Processes and Bayesian Learning
Bayesian versus Frequentist Decision Rules
VI LQ Control
LQ Control: Foundations
The Permanent Income Model
Permanent Income II: LQ Techniques
Production Smoothing via Inventories
VII Multiple Agent Models
Schelling’s Segregation Model
A Lake Model of Employment and Unemployment
Rational Expectations Equilibrium
Stability in Linear Rational Expectations Models
Markov Perfect Equilibrium
Uncertainty Traps
The Aiyagari Model
VIII Asset Pricing and Finance
Asset Pricing: Finite State Models
Asset Pricing with Incomplete Markets
IX Data and Empirics
Pandas for Panel Data
Linear Regression in Python
Maximum Likelihood Estimation