Assertion error running Zipline backtest

I’ve been careful to follow the install guide as I’ve built out my conda 3.9 env and I’ve successfully worked through the tutorials. Huge learning curve that last few months, as I’m a newb to this, it’s been great. I’m now moving on to Clenow’s Trading Evolved examples and I’m doing my best to work through snags. I seem to be triggering this AssertionError with many of those scripts:
IN:

Set start and end

start = datetime(1997, 1, 1, 8, 15, 12, 0, pytz.UTC)
end = datetime(2018, 12, 31, 8, 15, 12, 0, pytz.UTC)
OUT:
—> 40 assert type(start_session) == pd.Timestamp
41 assert type(end_session) == pd.Timestamp
42
AssertionError:

I’m pretty sure I need to have the pd.Timestamp input, not the datetime.
Am I on the right track?
Thanks,
Kelly

You will need to make a few adjustments in the python code from Clenow’s book to make it work with zipline-reloaded, most will be indeed to convert the start and end dates to pd.Timestamp

1 Like

Thank you for the reply!