-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Portfolio optimization bug fixes #3675
Conversation
@deeleeramone can you test this to see if the bugs you found are fixed pls? |
Will take a look at this shortly, thanks! |
Amazing, @montezdesousa!! We're cooking with gas now! The ability to modify parameters in the terminal makes a much smoother user-experience, and now because you don't have leave the terminal, fine adjustments can be incorporated into routines! Haven't yet tested with the SDK layer, but in the Terminal it is not crashing anymore and the argparse bug is gone. Error handling is also much more graceful. I ran into a few minor things. First, a typo here in the output print, MaxUtil is returning a $ instead of %. Secondly, I can't seem to make the window large enough to be able to have the title and axes labels on screen with Zooming out doesn't help either. If the syntax is incorrect, or using it wrong, Thirdly, Then a few comments, and I realize these fall outside of the scope of this PR; so, do with them as you will. If I am remembering correctly, there was a previous effort to clean up all arguments, terminal-wide, so that Using the S&P 500 example, optimizing will show lots of 0.00 % allocations, but intuitively I know they are not actually zeros. There are +/- 0 % allocations, and you are unable to distinguish what this means. The user is also not able to verify if rounded numbers are being used for downstream calculations, which would create compounding errors. 0 is a much different outcome than 0.004. I personally see no benefit to limiting the number of decimal places displayed, especially when the value is < 1. Displaying 1,000,000 is the same number of characters as 0.0000001. If the number is > 1, then a reasonable number of decimals might be 2 - 6, with less decimals as the number grows - i.e., 10, 100, 1000, 100000. For example, stocks and options are quoted on exchange on a sub-penny level; many crypto assets have a ridiculous number of zeros before the first integer. Lastly, there must be a way to export the weightings of optimized portfolios for use in the main portfolio menu and elsewhere, or for recall. In the other direction, categories are already known by the main portfolio engine after a transactions file has been loaded. These two menus need to work together instead of independently. |
Thanks for your feedback! Taking a look |
Can you describe the steps to reproduce this pls? Edit: No need. Oddly, we are assuming that the values are in $ terms if the weights don't add up to 100% (with slight tolerance). I increase the tolerance to avoid this too often, but the logic itself does not make much sense to me. Are you aware of optimization methods in the menu that deal with actual $ instead of %? If not, I'd include this issue in the decimals display issue I quoted below so that we address it later. |
Regarding these points below, can you open specific issues so they don't get lost here in the comments? Already opened the arguments with more than one letter when '-' #3687 Quote: Screenshot 2022-12-01 at 6 32 31 PM I personally see no benefit to limiting the number of decimal places displayed, especially when the value is < 1. Displaying 1,000,000 is the same number of characters as 0.0000001. If the number is > 1, then a reasonable number of decimals might be 2 - 6, with less decimals as the number grows - i.e., 10, 100, 1000, 100000. For example, stocks and options are quoted on exchange on a sub-penny level; many crypto assets have a ridiculous number of zeros before the first integer. Lastly, there must be a way to export the weightings of optimized portfolios for use in the main portfolio menu and elsewhere, or for recall. In the other direction, categories are already known by the main portfolio engine after a transactions file has been loaded. These two menus need to work together instead of independently. |
I don't think there are any models returning $ amounts. Will add to the decimal issue. |
Description
params
menusave
to/OpenBBUserData/portfolio/optimization
and added toload
pathsplot --heat
with just one value in categoryportfolios
forshow
,rpf
andplot
load
fromportfolio/po
is missing its examples files #3640maxdecorr -p max
- Terminal Crashes #3594How has this been tested?
Terminal:
Run the portfolio optimization scripts in
openbb_terminal/miscellaneous/scripts/portfolio
Try
portfolio/po/params
commandsload
andsave
SDK: