powered by
Deterministic forecasting method combining hybrid growth signals, volatility-aware asymmetric caps, and optional seasonal scaling. Supports weekly, monthly, quarterly, and yearly time series.
gace_forecast( df, periods = 12, freq = c("week", "month", "quarter", "year"), seasonal = TRUE, cap_low = -0.3, cap_high = 0.3, verbose = FALSE )
A data frame with columns:
period – integer index of historical and forecast periods,
period
value – observed or forecast values,
value
type – "historical" or "forecast".
type
The returned object has S3 class "gace_forecast" and includes engine details in the "gace_details" attribute.
"gace_forecast"
"gace_details"
Numeric vector or time series of historical values.
Integer; number of future periods to forecast.
One of "week", "month", "quarter", or "year". Used when df is not a ts object, and also informs the growth/seasonal logic.
"week"
"month"
"quarter"
"year"
df
ts
Logical; whether to apply seasonal scaling.
Numeric; baseline lower growth cap.
Numeric; baseline upper growth cap.
Logical; if TRUE, prints diagnostic messages.
This is the main user-facing function. It wraps the internal engine and returns a data frame suitable for plotting and downstream analysis.
# \donttest{ set.seed(1) y <- ts(rnorm(60, mean = 100, sd = 10), frequency = 12) fc <- gace_forecast(y, periods = 12, freq = "month") head(fc) # }
Run the code above in your browser using DataLab