Method notes
Detrending methodsMethods, failure modes and the reasoning behind every default
The detrending methods below each answer one question and document the failure modes that make the naive answer wrong. Formulas are paired with a plain-language note: what it computes, a concrete example, and the caution that matters.
Detrending methods, trend tests and decomposition notes
Detrending
Is it safe to flatten the trend?
STL, differencing and regression residuals, preceded by ADF and KPSS. Includes the random-walk trap.
Mann-Kendall
Is the direction statistically real?
Standard MK, Yue–Wang, TFPW, SMK, MKRD and MKC3, with effect sizes, Theil–Sen intervals and BH-FDR.
STL decomposition
How much is trend, season and noise?
Parameter semantics, robust weights, large-sample degradation and residual diagnostics.
Robust denoising
What counts as an outlier, and what does removing it cost?
IQR fences, modified Z-score, MAD versus Qn efficiency and breakdown points, and STL residual rules.
A note on defaults. Every default in the workspace comes from the diagnostics, not from a hard-coded constant. The selected sheet is the one with the most numeric columns; the selected column is the first numeric series; the denoising rule depends on skew and extreme values; the trend method depends on autocorrelation and the inferred cycle.