From 8936f798ab00bf5b0181ca81726408c579638b13 Mon Sep 17 00:00:00 2001 From: foefl Date: Fri, 11 Apr 2025 12:30:31 +0200 Subject: [PATCH] force enough data points --- src/delta_barth/analysis/forecast.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/delta_barth/analysis/forecast.py b/src/delta_barth/analysis/forecast.py index 19ad3d2..90c8dec 100644 --- a/src/delta_barth/analysis/forecast.py +++ b/src/delta_barth/analysis/forecast.py @@ -262,8 +262,8 @@ def _process_sales( # print("dates: ", dates) # ?? --- new: use monthly basis for time windows # baseline: 3 years - 36 months - starting_date = datetime.datetime.now() - relativedelta(months=12) - # starting_date = dates.max() - relativedelta(months=36) + # starting_date = datetime.datetime.now() - relativedelta(months=36) + starting_date = dates.max() - relativedelta(months=36) # start_index = next( # (i for i, date in enumerate(dates) if date >= starting_date), len(dates) - 1 # )