fmilthaler / FinQuant

A program for financial portfolio management, analysis and optimisation.
MIT License
1.38k stars 190 forks source link

Question about plotting EF #62

Closed cstampar closed 4 years ago

cstampar commented 4 years ago

Hey thanks so much for all your work here! It is really useful for me.

The plots look particularly great. My question is, is there a way to get the EF plot to also show the "black line" that defines the efficient frontier? It shows that in your example picture in ReadMe but not in the plot that is actually generated. Very minor, really for aesthetics sake. Thank you so much! :)

fmilthaler commented 4 years ago

Hi, sure there is. Here is a snippet of code that plots the efficient frontier line of your portfolio pf (as well as the individual stocks of your portfolio and the optimised versions of your portfolio).

# computing and plotting efficient frontier of pf
pf.ef_plot_efrontier()
# adding markers to optimal solutions
pf.ef_plot_optimal_portfolios()
# and adding the individual stocks to the plot
pf.plot_stocks()
plt.show()
cstampar commented 4 years ago

Great thanks! :)