Create Detrend method