Time series forecasting and statistics for DuckDB
Maintainer(s):
jasadams
Installing and Loading
INSTALL quackstats FROM community;
LOAD quackstats;
Example
SELECT * FROM forecast('sales', timestamp := 'date', value := 'revenue', horizon := 7);
About quackstats
QuackStats brings time series forecasting and statistics directly into DuckDB as SQL table functions.
Forecasting with multiple models (ETS, linear, exponential, logistic, and automatic cross-validation model selection):
SELECT * FROM forecast('sales', timestamp := 'date', value := 'revenue', horizon := 30, model := 'auto');
Grouped forecasting across multiple series in a single query:
SELECT * FROM forecast('sales', timestamp := 'date', value := 'revenue', horizon := 30, group_by := ['region', 'product']);
Seasonality detection to identify periodic patterns:
SELECT * FROM detect_seasonality('sales', timestamp := 'date', value := 'revenue');
All forecasts include configurable prediction intervals (default 95%).
Maintained by the team at Kyomi.
Added Functions
| function_name | function_type | description | comment | examples |
|---|---|---|---|---|
| detect_seasonality | table | NULL | NULL | |
| forecast | table | NULL | NULL |