Sargent T. Quantitative Economics with Python 2020
- Type:
- Other > E-books
- Files:
- 1
- Size:
- 11.9 MiB (12479699 Bytes)
- Uploaded:
- 2024-01-24 19:12 GMT
- By:
- andryold1
- Seeders:
- 0
- Leechers:
- 0
- Info Hash: 0D522394EE1FB0C11176BDEDED11337AC7007F8D
Textbook in PDF format 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