We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UnboundLocalError: local variable 'period_len' referenced before assignment, line 319
days_diffs = [] for i in range(30): if i >= len(forward_returns.index): break p_idx = prices.index.get_loc(forward_returns.index[i]) if p_idx is None or p_idx < 0 or ( p_idx + period) >= len(prices.index): continue start = prices.index[p_idx] end = prices.index[p_idx + period] period_len = diff_custom_calendar_timedeltas(start, end, freq) days_diffs.append(period_len.components.days) delta_days = period_len.components.days - mode(days_diffs).mode[0] period_len -= pd.Timedelta(days=delta_days) label = timedelta_to_string(period_len)
Please provide the full traceback:
[Paste traceback here]
Please provide any additional information below:
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Problem Description
UnboundLocalError: local variable 'period_len' referenced before assignment, line 319
Please provide the full traceback:
Please provide any additional information below:
Versions
The text was updated successfully, but these errors were encountered: