function [s]=hpfilter(y,w) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Author: Ivailo Izvorski, % Department of Economics % Yale University. % izvorski@econ.yale.edu % This code has been used and seems to be free of error. % However, it carries no explicit or implicit guarantee. % % function [s]=hpfilter(y,w) % Hondrick Prescott filter where: % w - smoothing parameter; w=1600 for quarterly data % y - the original series that has to be smoothed % s - the filtered series %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% if size(y,1)