Demean the series or not

Actually, it is a bit more complicated. With the one-sided HP filter, the mean will only be asymptotically 0. Thus, if your sample is short and depending on your view of the world, you still may want to demean. See also