English   Danish

2023/2024  KAN-CCMVV2413U  Python for the Financial Economist

English Title
Python for the Financial Economist

Course information

Language English
Course ECTS 7.5 ECTS
Type Elective
Level Full Degree Master
Duration One Semester
Start time of the course Autumn
Timetable Course schedule will be posted at calendar.cbs.dk
Max. participants 104
Study board
Study Board for cand.merc. and GMA (CM)
Course coordinator
  • Claus Munk - Department of Finance (FI)
  • Johan Stax Jakobsen - Department of Finance (FI)
Main academic disciplines
  • Finance
  • Statistics and quantitative methods
Teaching methods
  • Blended learning
Last updated on 15-02-2023

Relevant links

Learning objectives
Use Python and the methods presented in the course and exercises to solve problems similar or slightly different from the problems solved in the exercises of the course.
Course prerequisites
The course is oriented towards master-students with solid quantitative skills and the following background:

1. Master course in portfolio theory

2. Master course in bond and option analysis

3. Undergraduate course in statistics

4. Mathematics course covering optimization and basic matrix algebra.

Some experience with scientific computing in coding languages such as Python, R, VBA, Matlab or similar would be an advantage. It will be assumed that students have knowledge about basic concepts (e.g. "for loops" and "if statements") from scientific computing.
Examination
Python for the Financial Economist:
Exam ECTS 7,5
Examination form Home assignment - written product
Individual or group exam Group exam
Please note the rules in the Programme Regulations about identification of individual contributions.
Number of people in the group 2
Size of written product Max. 25 pages
2 students 25 pages max.
Assignment type Project
Release of assignment An assigned subject is released in class
Duration Written product to be submitted on specified date and time.
Grading scale 7-point grading scale
Examiner(s) One internal examiner
Exam period Winter, Take-home exam is published at least 2 weeks prior to hand-in deadline.
Make-up exam/re-exam
Same examination form as the ordinary exam
If a student fails the ordinary exam, then the course coordinator chooses whether the student will have to hand in a revised product for the retake or a new project.

If the number of registered candidates for the make-up examination/re-take examination warrants that it may most appropriately be held as an oral examination, the programme office will inform the students that the make-up examination/re-take examination will be held as an oral examination instead.
Course content, structure and pedagogical approach

The aim of this course is to enable students to implement financial models using realistic data. Several topics in financial economics will be covered and the students will at the end of the course be able to implement financial models from scratch in Python. This will be highly relevant when writing academic papers and/or working in the financial industry.

 

The teaching format will be different than the traditional teaching format at CBS and requires a high degree of self-motivation and self-management from the students.

 

The course is very exercise based. The students will learn Python by solving a range of different problems in financial economics. This includes implementation of different models from academic research papers. Examples of potential topics include

 

  • Modelling financial returns, e.g.
    • Return properties and distributional assumption
  • Public available data sources and how to access them using Python
  • Calculation of portfolio risk measures using Python, e.g. 
    • Marginal CVaR and VaR
  • Option pricing using Monte Carlo
  • Robust portfolio optimization, e.g.
    • Classical mean-variance optimization and its drawbacks
    • The Black-Litterman model
    • Resampling methods
    • Bayesian approach to robust portfolio optimization
    • Ledoit and Wolf (2004), A Well-Conditioned Estimator for Large-Dimensional Covariance Matrices
  • Volatility modelling, e.g.
    • RiskMetrics, ARCH and GARCH models
  • Term structure and Interest rate modelling, e.g.
    • Specifications of the yield curve such as the Nelson-Siegel model
    • Short rate models such as the Vasicek and CIR model

 

In the beginning of the course there will be a general introduction to Python and exercises that familiarise the students with relevant Python functionalities used in the course.

Description of the teaching methods
The course is very exercises based and the main workload consists of solving exercises using Python.

The objectives of the lectures are two-fold. First, lectures are used to present solutions to the solved exercises which may be pre-recorded videos. This will enable students to assess their ability to solve the exercises. Second, some lectures are held as Q&A sessions that will cover certain topics in more details and where the students can get answers to specific questions.
Feedback during the teaching period
The lectures involve discussions with students about the solution of pre-assigned problems as well as Q&A sessions in which students are able to ask and discuss individual questions and problems.
In addition, students may book individual meetings if needed during weekly office hours which will be held online.
Student workload
Hours of lectures / tutorials 33 hours
Preparation / exam 173 hours
Further Information

Term papers are not allowed due to the special nature of the course.

Expected literature

No required literature. Notes and exercises introduce relevant material. 

 

Relevant literature:

 

Yves Hilpisch, Python for Finance

Attilio Meucci, Risk and Asset Allocation

Claus Munk, Fixed Income Modelling

 

Last updated on 15-02-2023