A modern Python library for Markowitz portfolio optimization and analysis.
Efficient frontier, capital allocation line and interactive charts, from market data to the best portfolio in a few lines. Previously known as Diversificador.
pip install markowizardMarkowitzOptimizer: mean-variance optimization over the efficient frontier, with Sharpe ratios and the max-Sharpe portfolio.CapitalAllocator: the capital allocation line, mixing a risky portfolio with a risk-free asset.markowizard.visualization: Plotly charts for the frontier, allocation, CAL, correlations and prices.markowizard.data: helpers to download prices with yfinance and compute returns.- Web app: a FastAPI backend with an interactive frontend, available as a Docker image (docs).
See the quick start and the API reference.
