robertmartin8 / PyPortfolioOpt

Financial portfolio optimisation in python, including classical efficient frontier, Black-Litterman, Hierarchical Risk Parity
https://pyportfolioopt.readthedocs.io/
MIT License
4.38k stars 940 forks source link

Feature request: Use Plotly instead of matplotlib #352

Closed samatix closed 3 years ago

samatix commented 3 years ago

Is your feature request related to a problem? Using matplotlib is very limited when it comes to graphical representation.

Describe the feature you'd like The idea is to replace matplotlib module with plotly

Additional context With plotly: image

With matplotlib: image

I can take care of the migration to Plotly.

robertmartin8 commented 3 years ago

Hi @samatix,

The plotly charts do indeed look awesome, but I don't think plotly should be part of core PyPortfolioOpt.

Ultimately I want PyPortfolioOpt to be focussed primarily on the portfolio optimisation itself – data ingestion, backtesting, plotting, portfolio analysis etc is not truly within the scope of the library.

The existing plotting functionality is meant to be a "quick" solution for non-technical users to get off the ground, but my belief is that any more advanced plotting should be done by the user, using a library of their choice. Also, while I agree that plotly produces superior charts, matplotlib is the "industry standard" (at least in finance), so people will be able to interact with the plots.

All this said, if you are willing to share code, I'd love to add this in one of the tutorial notebooks as an example of advanced plotting (will link/attribute in the docs).

Cheers, Robert

samatix commented 3 years ago

Fully agreed @robertmartin8, I'll share the code in the cook book section.

nicktids commented 2 years ago

@samatix did you ever get the plotly in to a notbook for demo?