

    \filetitle{movsum}{Moving product pseudofunction}{modellang/movprod}

	\paragraph{Syntax}
 
 \begin{verbatim}
 movprod(EXPR)
 movprod(EXPR,K)
 \end{verbatim}
 \paragraph{Description}
 
 If the second input argument, \texttt{K}, is negative, this function
 expands to the moving product of the last K periods (including the
 current period), i.e.
 
 \begin{verbatim}
 ((EXPR)*(EXPR{-1})* ... *(EXPR{-(K-1)})
 \end{verbatim}
 where \texttt{EXPR\{-N\}} derives from \texttt{EXPR} and has all its
 time subscripts shifted by \texttt{-N} (if specified).
 
 If the second input argument, \texttt{K}, is positive, this function
 expands to the moving product of the next K periods ahead (including the
 current period), i.e.
 
 \begin{verbatim}
 ((EXPR)*(EXPR{1})* ... *(EXPR{K-1})
 \end{verbatim}
 If the second input argument, \texttt{K}, is not specified, the default
 value --4 is used (based on the fact that most of the macroeconomic
 models are quarterly).
 
 \paragraph{Example}
 
 The following two lines
 
 \begin{verbatim}
 movprod(Z)
 movprod(Z,-3)
 movprod(X+Y{-1},2)
 \end{verbatim}
 will expand to
 
 \begin{verbatim}
 ((Z)*(Z{-1})*(Z{-2})*(Z{-3}))
 ((Z)*(Z{-1})*(Z{-2}))
 ((X+Y{-1})*(X{1}+Y))
 \end{verbatim}


