Using Python to Quantify Portfolio Diversification

by Robin Warner

pandas scikit learn finance

Diversification is a portfolio construction and risk management technique used in finance that aims to minimize the impact of any single investment’s performance on that of the total portfolio. How can Python be used to measure diversification in a quantitative fashion?

This talk is about the term ‘diversification’ and its application within finance using Python. More specifically, it is about how Python can be implemented to measure diversification in the areas of portfolio construction and investment risk management.

The talk will focus on explaining the theoretical framework surrounding diversification, present examples of quantitative diversification metrics, and demonstrate how such measure may be used to construct and manage an investment portfolio.

It will show how common python libraries (such as Pandas and Scikit Learn) may be used to compute traditional diversification measures like number of unique investments, as well as more modern approaches based on extensions of principal component analysis.

There will be a discussion regarding the trade-off between intuition and sophistication when constructing a measure, as well as the importance of examining multiple measures at once when determining the diversification of a given portfolio.

About the Author

Robin Warner currently works on the Risk and Research team at the University of Toronto Asset Management Corporation (UTAM). UTAM is the organization responsible for managing the University of Toronto’s endowment, pension, and short-term working capital portfolios (nearly $10 billion in total). He is a graduate of McGill University, where he majored in Music and Economics.

Author website: