

    \filetitle{instrument}{Define conditioning instruments for VAR model}{VAR/instrument}

	\paragraph{Syntax to add forecast instruments}
 
 \begin{verbatim}
 V = instrument(V,DEF)
 \end{verbatim}
 \paragraph{Syntax to remove all forecast instruments}
 
 \begin{verbatim}
 V = instrument(V)
 \end{verbatim}
 \paragraph{Input arguments}
 
 \begin{itemize}
 \item
   \texttt{V} {[} VAR {]} - VAR object to which forecast instruments will
   be added.
 \item
   \texttt{DEF} {[} char \textbar{} cellstr {]} - Definition string for
   the conditioning instruments.
 \end{itemize}
 \paragraph{Output arguments}
 
 \begin{itemize}
 \item
   \texttt{V} {[} VAR {]} - VAR object with forecast instruments added or
   removed.
 \end{itemize}
 \paragraph{Description}
 
 Conditioning instruments allow you to compute forecasts conditional upon
 a linear combinationi of endogenous variables.
 
 The definition strings must have the following form:
 
 \begin{verbatim}
 'name := expression'
 \end{verbatim}
 where \texttt{name} is the name of the new conditioning instrument, and
 \texttt{expression} is an expression referrring to existing VAR variable
 names and/or their lags.
 
 The conditioning instruments must be a linear combination (possibly with
 a constant) of the existing endogenous variables. The names of the
 conditioning instruments must be obviously unique (i.e.~distinct from
 the names of the exisiting endogenous variables, and from other
 instruments).
 
 \paragraph{Example}
 
 In the following example, we assume that the VAR object \texttt{v} has
 at least three endogenous variables named \texttt{x}, \texttt{y}, and
 \texttt{z}.
 
 \begin{verbatim}
 V = instrument(V,'i1 := x - x{-1}','i2: = (x + y + z)/3');
 \end{verbatim}
 Note that the above line of code is equivalent to
 
 \begin{verbatim}
 V = instrument(V,'i1 := x - x{-1}');
 V = instrument(V,'i2: = (x + y + z)/3');
 \end{verbatim}
 The command defines two conditioning instruments named \texttt{i1} and
 \texttt{i2}. The first instrument is the first difference of the
 variable \texttt{x}. The second instrument is the average of the three
 endogenous variables.
 
 To impose conditions (tunes) on a forecast using these instruments, you
 run \url{VAR/forecast} with the fourth input argument containing a time
 series for \texttt{i1}, \texttt{i2}, or both.
 
 \begin{verbatim}
 j = struct();
 j.i1 = tseries(startdate:startdate+3,0);
 j.i2 = tseries(startdate:startdate+3,[1;1.5;2]);
 
 f = forecast(v,d,startdate:startdate+12,j);
 \end{verbatim}


