Skip to content

Blake Rayvid

Menu
  • About
  • Portfolio
Menu

Efficient Portfolio

Posted on December 7, 2020August 14, 2025 by Blake

This is a Python implementation of Robert C. Merton’s efficient or minimum-variance portfolio algorithm from the paper An Analytic Derivation of the Efficient Portfolio Frontier (1972). Building on the work of Harry Markowitz, Merton describes a way to assign weights to a list of securities to make a portfolio that has the lowest variance in returns for a given level of expected returns, based on historical returns data. Each weight may be positive or negative corresponding to long and short positions, or zero when no position should be taken, and sum to 100%.

Open in Colab

View on GitHub


Tags:
NumPy, Pandas, Python, YFinance
Categories: Finance, Optimization

Post navigation

← Boolean Network Animation
RouteCat →

Categories

  • Data Science
  • Exploration
  • Finance
  • Health
  • Interactive
  • Optimization
  • Utilities

Tags

D3.js Desmos Flask GCP Gemini API HTML/CSS JavaScript JQuery MATLAB Matplotlib Netlify NetworkX NLP NLTK Node/Express NumPy P5.js Pandas PostgreSQL Python QuantConnect Railway React Scikit-Learn SciPy SpaCy TensorFlow Vader YFinance

© 2025 Blake Rayvid. All rights reserved.