The quantlib multi is an interactive tool for specifying and analyzing multiple time series models. In the next sections we will try to build a small German money demand model. Our approach is to specify a model in full VAR form. This can be justified as a first step since the full VAR is a quite general model. It is also chosen here for exposition purpose.
Such a model should obviously include the money demand itself and
some of its determinants.
Money demand is set equal to the money circulating in the economy
(henceforth referred as ). Two
determinants are included: the transaction volume of the economy which
is given by the gross national product (GNP, henceforth referred as
)
and the costs of holding money which is given by an interest rate
(henceforth referred as
).
From economic theory we know that
has a positive
whereas
has a negative effect on
.
We might want to find out
whether these theoretical considerations are supported by some observed data and
whether a full VAR model is a
satisfactory description of the relation between the variables involved.
But before starting the analysis we need to prepare the data and start the
quantlet
domulti
.
The time series need to be provided as a numeric
data matrix x, where
is
the length of the time series, and
its dimension.
The first
-dimensional vector of observations is in the first row of x,
the second vector of observations is in the second row of x,
and so forth. The data matrix must not contain verbal information.
Additional data information
(variable names, observation period) are given directly to
domulti
.
This chapter will use the dataset mts.dat which contains three time series:
The quantlet
domulti
takes up to five inputs: The data matrix
,
the main period of the first observation (1960), the sub period of the
first observation (1), the periodicity (4), and the variable names (
,
, and
).
Call
domulti
by
library("multi") x=read("mts.dat") domulti(x,1960,1,4,"M"|"Y"|"I")