Python for Finance (MaBDA)
This is a mini-course introduction to financial applications in Python for the LUISS Business School Master in Big Data Analytics. The course has a strong focus on data analytics and will also provide an introduction to the use of Python.
The main reference for the Python examples is Yves Hilpisch, Python for Finance: Analyze Big Financial Data (2015) (the latest edition is from 2019 with a slightly modiefied tititle "Mastering Data-Driven Finance").
Topic 1: A primer on data visualization with Python matplotlib.
Introduction: the properties of risk and return of financial assets [slides]
Python notebook: using Python for data visualization (matplotlib).
Python notebook: a note on tuple, lists and dictionaries [required data files: file1].
Topic 2: A primer on working with the dataframe class with Python pandas and financial time series.
Python notebook: using dataframes with pandas.
Topic 3: Portfolio optimization
Capital allocation to risky assets [slides]
Optimal risky portfolios [slides]
Python notebook: optimal portfolio, efficient frontier and Sharpe ratios
Topic 4: Mathematical tools for finance
Python notebook: using Python for regression and interpolation
Python notebook: using Python for statical analysis and simulations
Python notebook: using Python for simple math finance problems (present value, IRR, etc.)
Links to data for in-class applications: