

    \filetitle{bwf}{Butterworth filter with tunes}{tseries/bwf}

	\paragraph{Syntax}
 
 \begin{verbatim}
 [T,C] = bwf(X,ORDER,CUTOFF)
 [T,C] = bwf(X,ORDER,CUTOFF,RANGE,...)
 \end{verbatim}
 \paragraph{Syntax with output arguments swapped}
 
 \begin{verbatim}
 [C,T] = bwf2(X,ORDER,CUTOFF)
 [C,T] = bwf2(X,ORDER,CUTOFF,RANGE,...)
 \end{verbatim}
 \paragraph{Input arguments}
 
 \begin{itemize}
 \item
   \texttt{X} {[} tseries {]} - Input tseries object that will be
   filtered.
 \item
   \texttt{ORDER} {[} numeric {]} - Order of the Butterworth filter; note
   that \texttt{ORDER} = 2 reproduces the Hodrick-Prescott filter.
 \item
   \texttt{CUTOFF} {[} numeric {]} - Cut-off periodicity.
 \item
   \texttt{RANGE} {[} numeric {]} - Date range on which the input data
   will be filtered; \texttt{RANGE} can be \texttt{Inf},
   \texttt{{[}startdata,Inf{]}}, or \texttt{{[}-Inf,enddate{]}}; if not
   specifired, \texttt{Inf} (i.e.~the entire available range of the input
   series) is used.
 \end{itemize}
 \paragraph{Output arguments}
 
 \begin{itemize}
 \item
   \texttt{T} {[} tseries {]} - Lower-frequency (trend) component.
 \item
   \texttt{C} {[} tseries {]} - Higher-frequency (cyclical) component.
 \end{itemize}
 \paragraph{Options}
 
 \begin{itemize}
 \item
   \texttt{'level='} {[} tseries {]} - Hard tune on the level of the
   trend.
 \item
   \texttt{'change='} {[} tseries {]} - Hard tune on the change of the
   trend.
 \item
   \texttt{'log='} {[} \texttt{true} \textbar{} \emph{\texttt{false}} {]}
   - Logarithmise the data before filtering, de-logarithmise afterwards.
 \end{itemize}
 \paragraph{Description}
 
 \paragraph{Example}


