Closed MaxMA2000 closed 2 years ago
The problem seems to be the data source, there is a negative stock price inside one of the columns...., it should be the wrong data source.
Maybe the package can add a tiny check for the input dataset in the mu = mean_historical_return(df)
in the future? That would help others with similar situations lol.
Thank you so much for the great package!
You're right, it would be helpful if there were a little check for negative stock prices and NaNs etc.
Will leave this open until I fix it.
Describe the bug I am using my stock price datasets to build up the portfolio with the mean-variance optimization, however, it cannot work. It outputs "Workspace allocation error!", and a more detailed error message is shown below. I have also created a code example with my dataset, it would be great if you can help me fix this bug soon. Thank you so much!
Expected behavior I am expecting to have a normal outcome for the
weights = ef.max_sharpe()
Code sample
Operating system, python version, PyPortfolioOpt version e.g MacOS 12.3.1, python 3.9, PyPortfolioOpt latest
Details of error message