PlotPosteriorDistributions.m
-
MichelJuillard authored
this function. Suppressed use of globals in CheckPath.
MichelJuillard authoredthis function. Suppressed use of globals in CheckPath.
Time Series
Dynare provides a MATLAB/Octave class for handling time series data, which is based on a class for handling dates. Dynare also provides a new type for dates, so that the user does not have to worry about class and methods for dates. Below, you will first find the class and methods used for creating and dealing with dates and then the class used for using time series. Dynare also provides an interface to the X-13 ARIMA-SEATS seasonal adjustment program produced, distributed, and maintained by the U.S. Census Bureau (2020).
Dates
Dates in a mod file
Dynare understands dates in a mod file. Users can declare annual, bi-annual, quarterly, or monthly dates using the following syntax:
1990Y
1990S2
1990Q4
1990M11
Behind the scene, Dynare’s preprocessor translates these expressions
into instantiations of the MATLAB/Octave’s class dates
described
below. Basic operations can be performed on dates:
plus binary operator (+)
An integer scalar, interpreted as a number of periods, can be added to a date. For instance, ifa = 1950Q1
thenb = 1951Q2
andb = a + 5
are identical.
plus unary operator (+)
Increments a date by one period.+1950Q1
is identical to1950Q2
,++++1950Q1
is identical to1951Q1
.
minus binary operator (-)
Has two functions: difference and subtraction. If the second argument is a date, calculates the difference between the first date and the secmond date (e.g.1951Q2-1950Q1
is equal to5
). If the second argument is an integerX
, subtractsX
periods from the date (e.g.1951Q2-2
is equal to1950Q4
).
minus unary operator (-)
Subtracts one period to a date.-1950Q1
is identical to1949Q4
. The unary minus operator is the reciprocal of the unary plus operator,+-1950Q1
is identical to1950Q1
.
colon operator (:)
Can be used to create a range of dates. For instance,r = 1950Q1:1951Q1
creates adates
object with five elements:1950Q1, 1950Q2, 1950Q3, 1950Q4
and1951Q1
. By default the increment between each element is one period. This default can be changed using, for instance, the following instruction:1950Q1:2:1951Q1
which will instantiate adates
object with three elements:1950Q1
,1950Q3
and1951Q1
.
horzcat operator ([,])