Hi Emil, did the solution work for you? I am working with BR_EQUITIES and for me it didn't. After I have applied the solution above, got another error message, this time regarding timezones...
I have tried applying tz_convert and/or tz_localize, unstacking and re-stacking... but nothing worked.
Dan, can you help? Tks.
AttributeError Traceback (most recent call last)
----> 4 periods=periods
/venvs/py35/lib/python3.5/site-packages/alphalens/utils.py in get_clean_factor_and_forward_returns(factor, prices, groupby, binning_by_group, quantiles, bins, periods, filter_zscore, groupby_labels, max_loss, zero_aware, cumulative_returns)
--> 832 cumulative_returns,
/venvs/py35/lib/python3.5/site-packages/alphalens/utils.py in compute_forward_returns(factor, prices, periods, filter_zscore, cumulative_returns)
262 factor_dateindex = factor.index.levels
--> 263 if factor_dateindex.tz != prices.index.tz:
264 raise NonMatchingTimezoneError("The timezone of 'factor' is not the "
265 "same as the timezone of 'prices'. See "
AttributeError: 'MultiIndex' object has no attribute 'tz'