Marius Zoican

Maître de conférence, Université Paris - Dauphine

Python programming for finance

Les objectifs du cours

The aim of this class is to provide students with the tools for financial data analysis in Python. The first part of the course (four lectures) introduces the basic tools for working in Python: how to get data, clean it, and obtain summary statistics. The second part of the course focuses on financial applications: portfolio optimization, regression analysis, Value at Risk, and derivatives pricing. Students are introduced to the four “scientific libraries” in Python: numpy, scipy, pandas, and matplotlib.

Plan du cours

  • Basic Tools in Python: Data types and structures: the numpy library. (3h)
  • Data Analysis with pandas: I/O operations. Working with dates/time. Financial panel data: the pandas library.  (3h)
  • High-frequency Data and Visualisation: Data visualization the matplotlib library. (3h) 
  • Regression. Optimization: Interpolation and curve fitting. Symbolic mathematics in Python. Principal component analysis. (3h)
  • Stochastic Processes in Python: Generating random numbers. Monte Carlo simulations. Simulating stock price paths (Brownian motion with jumps). Value-at-Risk and Expected Shortfall. (3h)
  • Option Pricing: Option pricing with binomial trees and Monte Carlo simulation. Least-Squares Monte Carlo for pricing American options. (3h)
  • Portfolio Theory. Efficient frontier. PCA Analysis. Test for normality. (3h)
  • GARCH and the (simulated) EM Algorithm (3h)

Bibliographie

Mandatory literature:
Hilpisch, Yves, Python for Finance: Analyze Big Financial Data, 2015, O’Reilly Publishing


Recommended:
Python 2.7.9 documentation at: https://docs.python.org/2/

 

http://www.mariuszoican.org/python-for-finance.html

Examen

Final exam (75%) and one individual programming assignment (25%).


Recommended prior knowledge
Notions of portfolio theory, regression analysis, and derivatives pricing.