Closed javifalces closed 5 years ago
factor_data
should conform to the output of utils.get_clean_factor_and_forward_returns and there documented. it requires freq
to be set. So I don't know why you encountered that error. Could you please share some code that produces that error so that we can better understand the issue?
There is a function, infer_trading_calendar, which can be used to computed freq
but that doesn't solve the problem: why isn't freq
set in your code?
Feel free to reopen this issue if you have a test case where Alphalens fails
On line 205 , method to_weights .
the expression
weights.index.levels[0].freq = factor_data.index.levels[0].freq
is trying to assign a freq , but when is None, raise an error
same as here
I think could be fixed just with that
weights.index.levels[0].freq= pd.tseries.frequencies.to_offset(factor_data.index.levels[0].freq)