Python For Finance

Python for Finance Seminar

These seminar materials provide a (very) brief introduction to Python, with emphasis on financial applications. No experience with Python or programming is required.

Be sure to first view the slides available at the link below for a general overview of the Lessons and Examples, as well as software and package install instructions.

Python for Finance Slides



An Introduction to Python Lesson 1

Arithmetic, variables, and dataframes.



Python Code (.py) Jupyter Notebook (.ipynb)


Graphing Stock Returns Lesson 2

Retrieving data from Yahoo! Finance, percent returns, graphing.



Python Code (.py) Jupyter Notebook (.ipynb)


Calculating a Stock's Beta and Alpha Lesson 3

CAPM, beta, alpha, retrieving market data, regression, graphing.



Python Code (.py) Jupyter Notebook (.ipynb)


Portfolio Optimization

Find the optimal portfolio given historical risk and return. Be sure to create an account at www.quandl.com first.



Python Code (.py)