It is shown that monotonicity of the transform in the surrogate data test,
which diminishes the applicability of the test, is not necessary and concer
ns only the prominent algorithm of amplitude adjusted Fourier transform (AA
FT) for surrogate data generation. The failure of AAFT under nonmonotonicit
y is explained and a modified algorithm appropriate for nonmonotonic transf
orms, called corrected AAFT (CAAFT), is proposed. The superiority of CAAFT
over AAFT is demonstrated with simulated and real data and compared also to
the iterated AAFT algorithm.