Smooth representation of trends by a wavelet-based technique