Home
A modern Python library for Markowitz portfolio optimization and analysis.
Previously known as Diversificador
The original portfolio-analysis web app built with Dash
is no longer maintained, but it is preserved on the
dash-deprecated
branch for reference.
Features¶
- Markowitz Mean-Variance Optimization — Compute the efficient frontier using
scipy.optimize - Capital Allocation Line — Mix risky portfolios with risk-free assets
- Visualization — Plotly-based charts for efficient frontier, allocation pie, CAL, correlation heatmaps, and price timelines
- Data Fetching — Built-in helpers for downloading market data via yfinance
- Web Application — FastAPI backend with a dark-themed interactive frontend
Where to go next¶
- Installation — install the library or run the web app
- Quick Start — optimize a portfolio in a few lines of Python
- Web Application — run the interactive dark-themed UI locally or via Docker
- API Reference — full reference for every public function and class
- Contributing — set up a dev environment and submit changes
Modules¶
| Module | Description |
|---|---|
core |
MarkowitzOptimizer — efficient frontier optimization |
allocation |
CapitalAllocator — risk-free asset allocation |
visualization |
Plotly chart functions (efficient frontier, pie, CAL, correlation) |
data |
Market-data fetching and monthly-return helpers (yfinance) |
The web application (backend/, frontend/) is kept in the repo but is not
part of the installable package — see Web Application.