No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Latest commit 0db302a Oct 10, 2018


This page is under development.

Notice: Want to be a teaching assistant for this course? Contact Jeppe Druedahl (


This is the GitHub repository for the course Introduction to programming and numerical analysis. In addition to the files for the course itself, this repository also contains code examples for various other economics courses taught at University of Copenhagen, Department of Economics. For example, the folder "course_micro1" contains examples from an intermediate level microeconomics course.

Course responsible: Jeppe Druedahl

Getting Started

Simple: Launch the interactive version using Binder (no installation required)


  1. Install your own Python workspace
  2. Work-flows

Course Plan

See preliminary Course Plan

Course Description

Course description on (with exam details etc.)

This course introduces you to programming and enables you to numerically solve simple economic models and perform basic data analysis. This will e.g. allow you to both visualize solutions, easily test assumptions with respect to functional forms and parameters, and consider more realistic models, which are solvable numerically but not algebraically.

The course requires no prior experience with programming.

The first part of the course introduces you to programming using the general-purpose Python language. You will learn to write conditional statements, loops, functions, and classes, and to print results and produce static and interactive plots. You will learn to solve simple numerical optimization problems, and draw random number and run simulations. You will learn to test, debug and document your code, and use online communities proactively when writing code.

The second part of the course give you a brief introduction on how to import data from offline and online sources, structure it, and produce central descriptive statistics. You will learn to estimate simple statistical models on your data.

The third part of the course introduce you to the concept of a numerical algorithm. You will learn how to write simple searching, sorting and optimization algorithms. You will learn to solve linear algebra problems, solve non-linear equations numerically and symbolically, find fixed points, and solve complicated numerical optimization problems relying on function approximation.

You will get hands-on experience with applying the above techniques to solve well-known microeconomic and macroeconomic problems from the core bachelor courses. Specifically, you will work with both a small data analysis project, and a larger model analysis project based on a well-known economic model.

While the course only focus on programming in Python, you will also be equipped to start learning other programming languages (such as MATLAB, R, Julia or even C/C++) on your own.

Learning Outcomes


  • Describe the differences between data types (e.g. strings, booleans, integers and floats)
  • Describe the differences between data containers (e.g. lists, dicts and arrays)
  • Explain the use of conditionals (if-elseif-else)
  • Explain the use of loops (for, while, continue, break)
  • Explain the use of functions, methods and classes
  • Describe the difference between views and copies of objects
  • Explain how to use (pseudo) random numbers
  • Explain the notation of numerical algorithms


  • Setup a Python enviroment
  • Write Python scripts, functions and notebooks
  • Apply error handling and debugging techniques
  • Use and write code documentation
  • Print results and make static and interactive plots
  • Import and export of data from and to csv, excel and online databases
  • Perform simple descriptive analysis of numerical data
  • Use numerical equation solvers
  • Use symbolic equation solvers
  • Use numerical optimizers
  • Formulate numerical algorithms from mathematical problems


  • Work collaboratively on code projects
  • Use online communities to find existing code and get help
  • Solve mathematical problems numerically
  • Solve well-known economic problems numerically
  • Perform numerical simulation of stochastic models
  • Present and discuss results of a numerical analysis
  • Learn new programming tools and languages