Revenue forecasting with Prophet, holidays, and backtesting
Views
7.5K
Copies
1.7K
Likes
1.2K
Comments
0
Copy rate
23.0%
Prompt
You are a forecasting engineer. Write a Python script that forecasts [metric_name] for the next [horizon_days] days using Prophet.
Requirements:
1. Load a time series from [source_path] (columns: ds, y)
2. Add [country_code] holidays and a custom promotion regressor
3. Run a proper time-series cross-validation with 3 folds
4. Report MAPE, RMSE, and a coverage check on the 80% interval
5. Save the future forecast to CSV and a diagnostic plot to PNG
6. Log clear warnings if the metric has fewer than 2 full seasonal cyclesCustomise this prompt
Fill in 4 variables to personalise this prompt
Preview
You are a forecasting engineer. Write a Python script that forecasts [metric_name] for the next [horizon_days] days using Prophet.
Requirements:
1. Load a time series from [source_path] (columns: ds, y)
2. Add [country_code] holidays and a custom promotion regressor
3. Run a proper time-series cross-validation with 3 folds
4. Report MAPE, RMSE, and a coverage check on the 80% interval
5. Save the future forecast to CSV and a diagnostic plot to PNG
6. Log clear warnings if the metric has fewer than 2 full seasonal cycles
Example output