Intermediate

Building a Portfolio Optimizer Using Python's PyPortfolioOpt

A hands-on build course for quant aspirants, prop desk applicants and traders who want to systematise how they size a portfolio. You already know what an efficient frontier is. This course makes you build one that survives contact with real Indian data. You will pull a clean price panel for Nifty 50 stocks, estimate expected returns three ways, build covariance matrices that are not drowned in noise, and run max Sharpe, minimum volatility and target return optimisations in PyPortfolioOpt with the Indian risk-free rate. You then add the constraints a real portfolio needs (weight caps, NSE sector limits, regularisation, transaction cost penalties), move beyond mean-variance with Hierarchical Risk Parity, Black-Litterman and CVaR, and finally convert weights into whole shares for a real INR budget, backtest the result against the Nifty 50 TRI and account for rebalancing turnover and Indian capital gains tax. The course ends with an end-to-end monthly optimizer pipeline you can rerun yourself.

PyPortfolioOptExpected Returns EstimationCovariance and ShrinkageEfficient FrontierMax Sharpe and Min VolatilityPortfolio ConstraintsHierarchical Risk ParityBlack-LittermanCVaR OptimisationDiscrete AllocationRebalancing and Tax Drag
MODULES
7
DURATION
4 Hours
TRACK
Python for Finance

What You'll Master

Set up a reproducible PyPortfolioOpt project and build a clean, adjusted price panel for NSE stocks
Estimate expected returns with historical, exponentially weighted and CAPM methods, and know why each one misleads
Build sample, shrunk, exponential and semicovariance risk models, and check them before trusting them
Run max Sharpe, minimum volatility and target return optimisations using the Indian risk-free rate, and plot the efficient frontier
Add weight bounds, NSE sector limits, L2 regularisation and transaction cost penalties so the optimizer produces investable portfolios
Apply Hierarchical Risk Parity, Black-Litterman and CVaR optimisation, and choose between optimisers with evidence
Convert weights into whole-share orders for an INR budget, and backtest the portfolio fairly against the Nifty 50 TRI
Design rebalancing rules that account for turnover, brokerage and Indian capital gains tax, inside one rerunnable pipeline
Access Level
LEARNER
Everything included
Full Text Playbooks
Actionable Exercises
Mobile Reading Mode
Lifetime Updates

Curriculum Breakdown