Random walk with a drift process

Detrending is just a convenient normalization for the solution technique. You can later add the trend back. See e.g. https://github.com/JohannesPfeifer/DSGE_mod/blob/master/Aguiar_Gopinath_2007/Aguiar_Gopinath_2007.mod