# How to do correlation matrix in excel

**[hodrick prescott filter]**

The Hodrick Prescott filter (HP filter), introduced by Hodrick and Prescott (1980), is a flexible detrending method that

is widely used in empirical macro research. Let's suppose that the original series _{}

_{}and a cyclical component

_{}

_{}

The HP-Filter isolates the cycle component by following minimization problem.

_{}

The first term is a measure of the fitness of the time series while the second term is a measure of the smoothness. There is a conflict between "goodness of fit" and "smoothness". To keep track of this problem there is a "trade-off"-parameter _{}

_{ (adsbygoogle = window.adsbygoogle || []).push({}); src="/img/58/image006612.gif" />}is 0, the trend component becomes equivalent to the original series while

_{}diverges to infinity, the trend component approaches a linear trend.

As you can see the HP filter acts to remove a trend from the data by solving a least square problem. In matrix notation we get

_{}

with _{}

_{}and

_{}

It can be shown that the solution of the minimization problem is be given by _{}

_{}is the identity matrix with dimension T.

The height of the value _{}

Category: Forex

## Similar articles:

Slope of Regression Line and Correlation Coefficient