-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New portfolio optimization menu #1642
New portfolio optimization menu #1642
Conversation
…OpenBBTerminal into New-Portfolio-Optimization-Menu
Hey @dcajasn, First of all, great work. The functionalities you have added will improve the Portfolio menu by a lot. My first question would be when are you going to make an Excel sheet that people can use to set their preferences? As there are so many options, it is very relevant that this can be directly done via an Excel. This is absolutely crucial for this menu to work. A few comments: I think that all of these could be set similarly to how you see it on the SIA menu:
You have added a lot of parameters to each command. E.g. maxnan, threshold, method, rm, risk_free, alpha, target_return and more. I would like to invite you to include all of these parameters in the documentation and explain what each represents. E.g. what is FLPM or what is EWMA1 and EWMA2 or what is the difference between relaxed risk parity model A, B and C. It needs to abundantly clear what settings I am using and what they represent. You don't have to explain the entire mathematics as long as it makes sense for the Financial professional. To reduce the amount of arguments, one suggestion be to create a different command that does the plotting. To achieve this, you can "store" your calculations. E.g. if I run maxsharpe, it will store as "maxsharpe1" (and the next will be "maxsharpe2" if settings change. Then I can plot pie charts of maxsharpe1 and maxsharpe2 to graphically understand the difference X parameter makes. This command could also allow for combining certain plots for example. Could you look at the "Other optimization techniques" and see if they can fit in a category and if it is old commands, if they can be removed? We don't want too many functionalities if they don't even make too much sense. I still need to look into the theory of all the options but these are some general pointers at least. |
Hi @JerBouma, following your comments I split plot functions from portfolio optimization models. Also, I added the option to save portfolios and then make plots to compare them. I'm starting to work with the excel template to create most complex portfolios and finishing to update documentation. |
Hi @dcajasn, that is really great. Well done. Could you focus on integrating Riskfolio-lib functions within the terminal directly first? I will work on the spreadsheet. |
Sure, no problem. |
Hi @JerBouma, I added riskfolio-lib modules. It is working without problems but I need to make some changes to pass flake8 pre-commit-hooks. |
Configure portfolio optimization parameters with ini file
This reverts commit b4b7169.
Hi @JerBouma, I'm going to fix the bugs asap. In the case of the Excel, I was thinking that you will design all Excels for the portfolio optimization menu like input parameters and Black Litterman, but no problem I will create and Excel for p_views and q_views. |
Hi @JerBouma, I changed the colors of all charts to openBB style, I added the option to download and upload a template to build views for black litterman model. I couldn't find errors with -dd cmd, I tried with several portfolios and works well, could you send me the exact portfolio to reproduce the error? because in the image there isn't a cmd to create a portfolio. |
@dcajasn For
|
@JerBouma here is working well.
|
Description
This PR updates the Portfolio Optimization menu. It adds several new portfolio optimization models that are available in Riskfolio-Lib and allows the user plots new charts for optimal portfolios: histogram, drawdown, risk contribution and correlation heatmap. Also add the option to build the efficient frontier for additional risk measures.
Some examples:
How has this been tested?
I'm still writing tests but I would like your opinion about new features.
Checklist:
Others
pre-commit install
.pytest tests/...
.