Added headers.
parent
a51d8bfe31
commit
7dc6013eaa
|
@ -1,8 +1,23 @@
|
|||
function ts = baxter_king_filter(ts, high_frequency, low_frequency, K) % --*-- Unitary tests --*--
|
||||
|
||||
% Implementation of Baxter and King (1999) band pass filter for dynSeries objects.
|
||||
% ts = baxter_king_filter(ts, high_frequency, low_frequency, K)
|
||||
%
|
||||
% Adapted from the code provided by Baxter and King.
|
||||
% Implementation of Baxter and King (1999) band pass filter for dynSeries objects. The code is adapted from
|
||||
% the one provided by Baxter and King. This filter isolates business cycle fluctuations with a period of length
|
||||
% ranging between high_frequency to low_frequency (quarters).
|
||||
%
|
||||
% INPUTS
|
||||
% o ts dynSeries object.
|
||||
% o high_frequency positive scalar, period length (default value is 6).
|
||||
% o low_frequency positive scalar, period length (default value is 32).
|
||||
% o K positive scalar integer, truncation parameter (default value is 12).
|
||||
%
|
||||
% OUTPUTS
|
||||
% o ts dynSeries object.
|
||||
%
|
||||
% REMARKS
|
||||
% This filter use a (symmetric) moving average smoother, so that K observations at the beginning and at the end of the
|
||||
% sample are lost in the computation of the filter.
|
||||
|
||||
% Copyright (C) 2013 Dynare Team
|
||||
%
|
||||
|
|
|
@ -1,5 +1,16 @@
|
|||
function ts = hpcycle(ts, lambda) % --*-- Unitary tests --*--
|
||||
|
||||
% ts = hpcycle(ts, lambda)
|
||||
%
|
||||
% Extracts the cycle component form a dynSeries object using Hodrick Prescott filter.
|
||||
%
|
||||
% INPUTS
|
||||
% o ts dynSeries object.
|
||||
% o lambda positive scalar, trend smoothness parameter.
|
||||
%
|
||||
% OUTPUTS
|
||||
% o ts dynSeries object, with time series replaced by the cyclical component of the original time series.
|
||||
|
||||
% Copyright (C) 2013 Dynare Team
|
||||
%
|
||||
% This file is part of Dynare.
|
||||
|
|
|
@ -1,5 +1,16 @@
|
|||
function ts = hptrend(ts, lambda) % --*-- Unitary tests --*--
|
||||
|
||||
% ts = hptrend(ts, lambda)
|
||||
%
|
||||
% Extracts the trend component form a dynSeries object using Hodrick Prescott filter.
|
||||
%
|
||||
% INPUTS
|
||||
% o ts dynSeries object.
|
||||
% o lambda positive scalar, trend smoothness parameter.
|
||||
%
|
||||
% OUTPUTS
|
||||
% o ts dynSeries object, with time series replaced by the trend component of the original time series.
|
||||
|
||||
% Copyright (C) 2013 Dynare Team
|
||||
%
|
||||
% This file is part of Dynare.
|
||||
|
|
Loading…
Reference in New Issue