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)
in ()
2 prices=result,
3 quantiles=10,
----> 4 periods=periods
5 )
6
/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)
830 periods,
831 filter_zscore,
--> 832 cumulative_returns,
833 )
834
/venvs/py35/lib/python3.5/site-packages/alphalens/utils.py in compute_forward_returns(factor, prices, periods, filter_zscore, cumulative_returns)
261
262 factor_dateindex = factor.index.levels[0]
--> 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'