Skip to content

Commit

Permalink
Fixed offsets.
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangxjohn committed Apr 24, 2022
1 parent 5171554 commit 53f54fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hyperts/utils/tstoolbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ def multi_period_loop_imputer(df: pd.DataFrame, freq: str, offsets: list = None,
offsets = [-1, -2, -3, -4, 1, 2, 3, 4]
elif offsets is None and freq in ['SM', '15D', 'SMS']:
offsets = [-1, -2, -4, -6, -8, 1, 2, 4, 6, 8]
elif offsets is None and 'Q' in freq or 'Q-' in freq or 'BQ' in freq or 'BQ-' in freq or 'QS-' in freq or 'BQS-':
elif offsets is None and 'Q' in freq or 'Q-' in freq or 'BQ' in freq or 'BQ-' in freq or 'QS-' in freq or 'BQS-' in freq:
offsets = [-1, -4, -8, -12, 1, 4, 8, 12]
elif offsets is None and freq in ['A', 'Y'] or 'A-' in freq or 'BA-' in freq or 'AS-' in freq or 'BAS-' in freq:
offsets = [-1, -2, -3, -4, 1, 2, 3, 4]
Expand Down

0 comments on commit 53f54fa

Please sign in to comment.