Skip to content
Abhinav Anand
work

Quant / Portfolio

Monte Carlo Simulation & Markowitz Portfolio Optimization

Simulated price paths and a mean-variance efficient frontier for a basket of assets.

Streamlit app showing optimal weights, Sharpe ratio, expected return and volatility, a weights donut chart and an efficient frontier scatter plot.
The optimizer app on AAPL, MSFT, GOOGL, AMZN, META and JPM, 2020 to 2024 daily prices, max weight 40%.

[01] problem

Estimate the risk and return of a portfolio, then choose weights that make the best risk/return trade-off.

[02] approach

  1. 01Monte Carlo simulation of asset price paths and portfolio returns estimates expected return, volatility and Value at Risk.
  2. 02Markowitz mean-variance optimization builds the efficient frontier.
  3. 03The maximum-Sharpe and minimum-variance portfolios are picked off the frontier.

[03] what's interesting

  • Simulation gives the risk view, and optimization uses it to choose the weights.

[04] stack

  • Python
  • NumPy
  • Pandas
  • SciPy
  • Matplotlib
  • cvxpy
  • Streamlit
  • Plotly