-
Notifications
You must be signed in to change notification settings - Fork 509
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
4.7 simple_simulator_usage.py: assert error #7
Comments
printed below debug info: =================== p_series = 2010-02-03 9995.002499 |
Hi @Kerberos007, please try running the corresponding code in this file: https://github.com/chrisconlan/algorithmic-trading-with-python/blob/master/src/simulate_portfolio.py |
It is the similar to listing 4.7 but does not throw the error you described. |
Thanks. I got the same error. ValueError: Lengths must match. c_series index and p_series index were out of sync: len(c_series) = 646 |
I bought the book.
trying to reproduce all the simulator results.
everything looked good with position class & portfolio class, until I encountered the below assertion error, when running the simple_simulator_usage.py.
using all of the csv files you provided. can't continue with this error. I have not even tried my own portfolio simulation yet.
Is this a known issue? thanks in advance,
in _compute_equity_series(self)
64 c_series = self.cash_series
65 p_series = self.portfolio_value_series
---> 66 assert all(c_series.index == p_series.index), 'portfolio_series has dates not in cash_series'
67 self._equity_series = c_series + p_series
ValueError: Lengths must match.,
The text was updated successfully, but these errors were encountered: