Closed pcgm-team closed 7 months ago
Could there be a simple minimal manual data test like this included in the examples and some insight into the failure?
Please refrain from posting unless you found a bug in Cvxportfolio.Thanks.
I believe this is a bug though? It's the simplest possible test I could come up with.
This should fix your "dummy" code
returns = returns.astype(float)
volume = volume.astype(float)
prices = prices.astype(float)
But what's the point? The default examples use Yahoo Finance (which vendors ICE data) and they all work. I'm happy to review PRs of data interfaces to other data vendors, so that the user gets the same experience. The only reason I'm not doing it myself is that I don't think it's needed. And, for user-provided data, the old examples (e.g., the one on data provision , should get you started.
Apologies, I wrongly assumed it was a more subtle issue. Thanks.
Amend DataEstimator
and UserProvidedMarketData
, if dtypes not numeric coerce to float, if failure throw ValueError
. Otherwise exception is thrown deep in the data checks and failure is difficult to understand.
To test the behavior, I'm doing a simple dummy test with manual data. However, I fail to get the backtest to run and do not understand the error report.
The code is:
And the full error message is: