Introduction to Portfolio Risk Management in Python
Learn to measure return distributions, build efficient portfolios, model factor exposure and estimate value at risk in Python with interactive exercises.
Measuring portfolio risk means looking past average returns to how widely returns spread, how skewed and heavy-tailed they are, and how large losses can grow. Working in Python, you turn price data into returns, judge how a mix of assets trades risk against reward, and put a number on downside exposure with value at risk and expected shortfall.
What You Will Achieve
- Describe an asset’s return history in numbers, including its annualized variance and how far it departs from a normal shape.
- Choose asset weights that maximize risk-adjusted return or minimize volatility, and check the result against simpler weighting schemes.
- Measure how strongly a portfolio moves with the market and other factors, and judge whether its alpha holds up statistically.
- Put a figure on likely and extreme losses for a holding using past data, distribution assumptions and simulated price paths.
Program Overview
Investment Risk and Return Distributions
Turns price series into returns and describes their distribution through its four statistical moments.
- Calculating financial returns from timeseries data
- Mean, variance and annualizing variance
- Skewness and kurtosis
- Statistical tests for normality
Portfolio Investing and Factor Models
Combines assets into weighted portfolios, locates efficient allocations, then explains portfolio returns with market factors.
- Portfolio returns, composition and backtesting
- Correlation and co-variance matrices
- Markowitz portfolios, Sharpe ratios, MSR and GMV
- CAPM beta and the Fama French 3-factor and 5-factor models
Tail Risk and Value at Risk
Estimates the size and likelihood of losses with historical, parametric and simulated methods.
- Historical drawdown and expected shortfall
- Historical and parametric VaR and CVaR
- Scaling risk estimates and changing quantiles
- Random walks and Monte Carlo VaR
Certificate Awarded (Paid)
Job Outlook
These methods apply in investment analysis, portfolio management and financial risk work, wherever returns, diversification and potential losses have to be measured and reported with code.
Good for: Learners who want a code-first tour of the standard risk measures used to describe, build and estimate the losses of equity portfolios.
Keep in mind: The chapters center on measuring and simulating market risk, not on hedging it, and despite the intermediate label the material starts from the fundamentals of returns and risk.
Bottom line: Its strength is the range of risk measures packed into four chapters: return moments, efficient portfolios, factor regressions and three ways of estimating value at risk.
Frequently Asked Questions
How is value at risk estimated in the lessons?
The final chapter works through three approaches: historical VaR taken straight from past returns, parametric VaR based on an assumed distribution, and Monte Carlo VaR built on simulated random walks. It also covers expected shortfall, drawdown and how the estimates change when you move the quantile or scale them over time.
Which factor models does the course use?
It starts with the Capital Asset Pricing model, calculating beta through co-variance and through regression. It then moves to the Fama French 3-factor model and its 5-factor extension, reading coefficients, p-values and adjusted R-squared, and weighing alpha against R-squared when judging a model.
Which portfolio weighting schemes are compared?
The portfolio chapter builds equal weighted and market-cap weighted portfolios, then turns to Markowitz portfolios on the efficient frontier. Two of those are singled out, the MSR and GMV portfolios, with Sharpe ratios used to compare risk-adjusted returns across the options.
Does the course go beyond the normal distribution?
Yes. The first chapter measures skewness and kurtosis as the third and fourth moments of a return distribution and applies statistical tests for normality, so you can see when the normal assumption fails before relying on it in later risk estimates.
User Reviews
Write your review
You must be logged in to post a review.
Reviews can only be posted by registered learners. Log in or create a free account, then you will return here to post.


There are no reviews yet.