Observation
When fitting Prophet with yearly_seasonality=True on exactly 12 monthly observations, I observed that the model becomes under-identified (expected). As a result, different Prophet / cmdstanpy versions can converge to very different trend-seasonality decompositions, even when the code and data are identical.
In my case, one environment extrapolates reasonable future values, while another produces very large negative forecasts, despite all training observations being strictly positive. Inspecting the model components shows that these differences arise from how trend and yearly seasonality trade off under this configuration.
At the moment, there is no warning or safeguard when enabling yearly seasonality with only a single annual cycle of data, which can lead to unstable and version-dependent forecasts in production settings.
Environment
Azure ML Studio:
- prophet: 1.1.4
- cmdstanpy: 1.2.5
Local (VSCode):
- prophet: 1.2.1
- cmdstanpy: 1.3.0
Minimal reproducible example
import pandas as pd
from prophet import Prophet
y = [
361.0602049, 33880.23, 29431.62, 17337.68, 208032.5, 515776.5,
848975.0, 837513.2, 1237904.0, 2246456.0, 1982927.0, 2421611.0
]
df = pd.DataFrame({
"ds": pd.date_range("2025-01-01", periods=12, freq="MS"),
"y": y
})
m = Prophet(
yearly_seasonality=True,
weekly_seasonality=False,
daily_seasonality=False
)
m.fit(df)
future = m.make_future_dataframe(periods=3, freq="MS")
fcst = m.predict(future)
print(fcst[["ds", "trend", "yearly", "yhat"]])
Observed behavior
Azure (prophet 1.1.4)
2026-01 trend = -5.36M, yearly = -7.08M → yhat = -12.4M
Trend becomes large negative, forecasts become large negative (e.g., -10M to -12M)
Local (prophet 1.2.1)
2026-01 trend = +2.25M, yearly = +0.67M → yhat = +2.92M
Same observation for other future months.
Question / Request
Could anyone share best practices to handle this case?
Is it possible to add a warning or safeguard when enabling yearly seasonality with only a single annual cycle of data?
Observation
When fitting Prophet with
yearly_seasonality=Trueon exactly 12 monthly observations, I observed that the model becomes under-identified (expected). As a result, different Prophet / cmdstanpy versions can converge to very different trend-seasonality decompositions, even when the code and data are identical.In my case, one environment extrapolates reasonable future values, while another produces very large negative forecasts, despite all training observations being strictly positive. Inspecting the model components shows that these differences arise from how trend and yearly seasonality trade off under this configuration.
At the moment, there is no warning or safeguard when enabling yearly seasonality with only a single annual cycle of data, which can lead to unstable and version-dependent forecasts in production settings.
Environment
Azure ML Studio:
Local (VSCode):
Minimal reproducible example
Observed behavior
Azure (prophet 1.1.4)
2026-01 trend = -5.36M, yearly = -7.08M → yhat = -12.4MTrend becomes large negative, forecasts become large negative (e.g., -10M to -12M)
Local (prophet 1.2.1)
2026-01 trend = +2.25M, yearly = +0.67M → yhat = +2.92MSame observation for other future months.
Question / Request
Could anyone share best practices to handle this case?
Is it possible to add a warning or safeguard when enabling yearly seasonality with only a single annual cycle of data?