Skip to content

4.7 simple_simulator_usage.py: assert error #7

Open
@Kerberos007

Description

@Kerberos007

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.,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions