19.06.2023 Tutorial 4#

Hodrick-Prescott Filter#

a) disaggregate Trend and Fluctuations in GDP

\[ \min \{ \bar{y}\}^T_{t=1} \bigg( \underbrace{\sum_{t=1}^T (y_t-\bar{y_t}^2)} _{\text{change in trend}} + \lambda \cdot \underbrace{\sum_{t=2}^{T-1} [(\bar{y}_{t+1} - \bar{y_t}) - (\bar{y}_t - \bar{y}_{t+1})]} _{\text{cyclical component}} \bigg) \]
  • If \(\lambda = 0\): Result is equal to observations (pure cycle)

  • if \(\lambda = \inf\): Result is straight line

b) find differenct values

\[\begin{split} \begin{aligned} Y_t &= \; \bar{Y}_t &\cdot Y_t^c \\ \log Y_t &= \log \bar{Y}_t &\cdot \log Y_t^c \\ y_t &\equiv \; \bar{y} &\equiv c_t \end{aligned} \end{split}\]

Covariance#

a) the GDP is most volatile

b) Differences in deviations

  • common sample deviation: \(\sqrt{\frac{ 1 }{N} \sum ...}\)

  • sample standard deviation: \(\sqrt{ \frac{ 1 }{N \bf{-1}} \sum}\)

c) Covariance

  • when positive correlation: Cov is positive

  • negative vice-versa d) Correlation

\[ \rho = \frac{ Cov (x,y) }{\sqrt{var(x)* var(y)}} \in [-1,1] \]

while regression: \(y = a+bx+e\), with

\[ \hat{b} = \frac{ cov(x,y) }{var(x)} \]

e) Calculation of sample correlation:

\[\begin{split} Cov (GDP, Cons.) = \frac{1 }{4-1} \big( (\overbrace{-0.01}^{x_1}-\overbrace{0}^{x_{mean}} ) * (\overbrace{-0.06}^{y_1}-\overbrace{0}^{{y_{mean}}}) + ... \big) = pos. value\\ Corr = \frac{ Cov}{\sqrt{var(x)*var (y)}} = 0.999 \end{split}\]