  We present a general framework of detrending methods of fluctuation analysis
of which detrended fluctuation analysis (DFA) is one prominent example. Another
more recently introduced method is detrending moving average (DMA). Both
methods are constructed differently but are similarly able to detect long-range
correlations as well as anomalous diffusion even in the presence of
nonstationarities. In this article we describe their similarities in a general
framework of detrending methods. We establish this framework independently of
the definition of DFA or DMA but by investigating the failure of standard
statistical tools applied on nonstationary time series, let these be intrinsic
nonstationarities such as for Brownian pathes, or external ones due to additive
trends. In particular, we investigate the sample averaged mean squared
displacement of the summed time series. By modifying this estimator we
introduce a general form of the so-called fluctuation function and can
formulate the framework of detrending methods. A detrending method provides an
estimator of the fluctuation function which obeys the following principles: The
first relates the scaling behaviour of the fluctuation function to the
stochastic properties of the time series. The second principles claims
unbiasedness of the estimatior. This is the centerpiece of the detrending
procedure and ensures that the detrending method can be applied to
nonstationary time series, e.g. FBM or additive trends. Both principles are
formulated and investigated in detail for DFA and DMA by using the relationship
between the fluctuation function and the autocovariance function of the
underlying stochastic process of the time series.
