Fini Marketing Intelligence ships three distinct forecasting models, each designed to capture different layers of complexity in daily candy sales data. The Prophet Baseline provides a clean trend-and-seasonality foundation with minimal configuration. The Prophet Enriched model extends that foundation by injecting explicit binary flags for high-impact seasonal events — Halloween, Christmas, and Summer. Finally, the XGBoost model abandons the time-series decomposition paradigm entirely in favour of gradient-boosted trees trained on lag features and calendar signals, making it the most flexible option for non-linear demand patterns. Running all three against the same train/test split lets you benchmark their relative strengths before committing to a production pipeline.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/andresshm/fini-marketing-intelligence/llms.txt
Use this file to discover all available pages before exploring further.
Shared Pipeline
Every model in this project follows the same data contract, split strategy, and evaluation protocol, so results are directly comparable.Load and aggregate sales data
Raw transactions are read from
data/raw/sales.csv and grouped by sale_date, summing the revenue column to produce a daily revenue time series.Train / test split
The last 90 days of the dataset form the held-out test set. All earlier dates are used for training.
90-day future forecast
After evaluation on the test window, each Prophet model extends the horizon by 90 additional days beyond the last observed date. XGBoost evaluates the test set only and does not produce a future forecast.
Compute metrics
Three scalar metrics are calculated on the evaluation set — the overlap between historical actuals and model predictions.
| Metric | Formula | Unit |
|---|---|---|
| MAE | Mean Absolute Error | € / day |
| RMSE | Root Mean Squared Error | € / day |
| MAPE | Mean Absolute Percentage Error | % |
Write outputs
Each model saves a CSV forecast file and a JSON metrics file to the
outputs/ directory.| File | Description |
|---|---|
outputs/forecast_baseline.csv | ds, yhat, yhat_lower, yhat_upper, y |
outputs/forecast_enriched.csv | ds, yhat, yhat_lower, yhat_upper, y |
outputs/forecast_xgboost.csv | ds, y, yhat (test period only) |
outputs/metrics_baseline.json | MAE, RMSE, MAPE |
outputs/metrics_enriched.json | MAE, RMSE, MAPE |
outputs/metrics_xgboost.json | MAE, RMSE, MAPE |
Model Comparison
The table below shows results from each model’s most recent evaluation run against the 90-day test set.| Model | MAE (€/day) | RMSE (€/day) | MAPE (%) |
|---|---|---|---|
| Prophet Baseline | 54.85 | 77.31 | 27.56 |
| Prophet Enriched | 52.48 | 73.58 | 26.62 |
| XGBoost | 173.43 | 232.35 | 24.53 |
When to Use Each Model
Prophet Baseline — choose this when you want a quick, interpretable forecast with no extra feature engineering. It captures yearly and weekly seasonality out of the box and is ideal for stable product lines where special events do not drive meaningful demand spikes. Prophet Enriched — choose this when you know that Halloween, Christmas, and Summer meaningfully shift daily revenue. The explicit seasonal regressors allow the model to learn separate lift coefficients for each event, improving both MAE and RMSE over the baseline. This is the recommended starting point for Fini’s candy portfolio. XGBoost — choose this when demand patterns are non-linear, heavily auto-correlated, or when you want to incorporate a richer feature set (promotions, pricing, competitor activity) without rethinking the model architecture. Its gradient-boosted trees can capture interactions that additive decomposition models miss, though it requires at least 30 days of history to populate lag features and does not extrapolate beyond the observed range.Explore the Models
Prophet Baseline
Yearly + weekly seasonality, no regressors. Fast to train and easy to interpret.
Prophet Enriched
Adds Halloween, Christmas, and Summer binary regressors on top of the baseline.
XGBoost
Gradient-boosted trees with lag features and calendar signals. Most flexible.