Course plan

 

Week 1: Introduction

 

Lecture: You will be introduced to working with Python 3 (Anaconda, JupyterLab, VS Code). We will:

  1. Solve a consumer problem

  2. Simulate an AS-AD model


Class: Work on DataCamp courses (free access will be provided):

  1. Intro to Python for Data Science

  2. Intermediate Python for Data Science

  3. Python Data Science Toolbox (Part 1)

  4. Python Data Science Toolbox (Part 2)

 

Week 2: Fundamentals: Primitives

 

Lecture: You will be given an in-depth introduction to the fundamentals of Python (objects, variables, operators, classes, methods, functions, conditionals, loops). You learn to discriminate between different types such as integers, floats, strings, lists, tuples and dictionaries, and determine whether they are subscriptable (slicable) and/or mutable. You will learn about referencing and scope. You will learn a tiny bit about floating point arithmetics.

Class: Continue to work on DataCamp courses

 

Week 3: Fundamentals: Optimize, print and plot

 

Lecture: You will learn how to work with numerical data (numpy) and solve simple numerical optimization problems (scipy.optimize) and report the results both in text (print) and in figures (matplotlib).

Class: Continue to work on DataCamp courses

 

Week 4: Fundamentals: Random numbers and simulation

 

Lecture: You will learn how to use a random number generator with a seed and produce simulation results (numpy.random, scipy.stats), and calcuate the expected value of a random variable through Monte Carlo integration. You will learn how to save your results for later use (pickle). Finally, you will learn how to make your figures interactive (ipywidgets).

Class: Problem Set 1: Solving the consumer problem

 

Week 5: Fundamentals: Workflow and debugging

 

Lecture: You will learn how to structure and comment your code and document it for later use. You will learn how to debug your code using print, assert and try/except statements. You will learn how to write modules and run scripts from a terminal in VSCode and how to share your code with others through Git.

Class: Problem Set 2: Finding the Walras equilibrium in a multi-agent economy

 

Week 6: Fundamentals: Recap and overview

 

Lecture: Recap and overview of what you have learned so far.

Class: Work on your inaugural project

 

Week 7: Working with Data: Load/save and structure data

 

Lecture: You will learn to load and save data both to and from offline sources (e.g. CSV or Excel). You will learn about pandas series and dataframes, and how to clean, rename, structure and index your data.

Class: Problem Set 3: Loading and structuring data from Denmark Statistics

 

Week 8: Working with Data: Basic data analysis

 

Lecture: You will learn how to combine (join and concatenate) datasets, download online datasets (throguh an API), and use split-apply-combine to calculate group-level statistics and make group-level plots.

Class: Problem Set 4: Analyzing data form Denmark Statistics

 

Week 9: Algorithms: Searching and sorting

 

Lecture: You will learn how to write pseudo code and a bit about computational complexity (big-O notion). You will learn learn about functional recursion and some illustrative search (sequential, binary) and sort (bubble, insertion, quick) algorithms.

Class: Work on your data analysis project

 

Week 10: Algorithms: Solving equations

 

Lecture: You will learn about working with matrices and linear algebra (scipy.linalg), including solving systems of linear equations. You will learn to find roots of linear and non-linear equations both numerically (scipy.optimize) and symbolically (sympy).

Class: Problem Set 5: Writing your own algorithms

 

Week 11: Algorithms: Numerical optimization

 

Lecture: You will learn to solve non-convex multi-dimensional optimization problems using numerical optimization with multistart and nesting (scipy.optimize). You will learn simple function approximation using linear interpolation (scipy.interp).

Class: Problem Set 6: Solving the Solow Model

 

Week 12

 

Lecture: Easter holiday

Class: Problem Set 7: Solving the consumer problem with income risk

 

Week 13: Further Perspectives: The need for speed

 

Lecture: You will learn how to time your code and locate its bottlenecks. You will learn how to alleviate such bottlenecks using techniques such as comprehensions, generators, vectorization and parallelization. You will be introduced to how to use the Numba library to speed-up your code. You will hear about the fundamental computational costs of mathematical operations and memory management (caching).

Class: Work on your model analysis project

 

Week 14

 

Lecture: Work on your model analysis project

Class: Work on your model analysis project

 

Week 15: Further Perspectives: Other programming languages

 

Lecture: We will discuss alternative programming languages such as MATLAB, R, C++ and Julia

Class: Polish your exam portfolio