Endogenous Local Linear Trend Estimation for Economic Data -An Enhanced Alternative for the Hodrick-Prescott Filter