Nonstationarity due to climate change, human impacts, and invasive species presents a major challenge for ecosystem forecasting, as past behavior cannot necessarily predict future behavior. While time-varying linear models may adequately detect nonstationarity in some cases, such models are often poor at forecasting and fail to correctly identify nonstationarity in nonlinear systems. Here we propose a nonlinear generalization of existing models that improves nonstationarity quantification and forecast skill. We demonstrate the effectiveness of the method in simulated datasets and experimental and field time series known to be stationary or nonstationary. Evaluating nonstationarity over subsets of the empirical time series shows that apparent nonstationarity strongly depends on the length and starting time of the series analyzed. Thus, any evaluation of nonstationarity should be conditional on a certain time window. This method could aid both in quantifying the intensity of nonstationarity in ecosystems and producing better forecasts in a changing world.