Compare commits

...

2 Commits

Author SHA1 Message Date
Stéphane Adjemian (Argos) c33b53b045
Bug fix (wrong condition)
We should test the numbe of output arguments, not the number of input
arguments. This was bug was probably not affecting the outcomes since
the number of input arguments is always greater than 1.
2024-01-22 16:54:02 +01:00
Stéphane Adjemian (Argos) 50beb8000d
Cosmetic changes. 2024-01-22 16:54:01 +01:00
2 changed files with 10 additions and 10 deletions

View File

@ -14299,7 +14299,7 @@ a trend target to which the endogenous variables may be attracted in the long-ru
:math:`n\times 1` vector of parameters, :math:`A_i` (:math:`i=0,\ldots,p`)
are :math:`n\times n` matrices of parameters, and :math:`A_0` is non
singular square matrix. Vector :math:`\mathbf{c}` and matrices :math:`A_i`
(:math:`i=0,\ldots,p`) are set by Dynare by parsing the equations in the
(:math:`i=0,\ldots,p`) are set by parsing the equations in the
``model`` block. Then, Dynare builds a VAR(1)-companion form model for
:math:`\mathcal{Y}_t = (1, Y_t, \ldots, Y_{t-p+1})'` as:
@ -14510,7 +14510,7 @@ up to time :math:`t-\tau`, :math:`\mathcal{Y}_{\underline{t-\tau}}`) is:
In a semi-structural model, variables appearing in :math:`t+h` (*e.g.*
the expected output gap in a dynamic IS curve or expected inflation in a
(New Keynesian) Phillips curve) will be replaced by the expectation implied by an auxiliary VAR
New Keynesian Phillips curve) will be replaced by the expectation implied by an auxiliary VAR
model. Another use case is for the computation of permanent
incomes. Typically, consumption will depend on something like:
@ -14518,13 +14518,13 @@ incomes. Typically, consumption will depend on something like:
\sum_{h=0}^{\infty} \beta^h y_{t+h|t-\tau}
Assuming that $0<\beta<1$ and knowing the limit of geometric series, the conditional expectation of this variable can be evaluated based on the same auxiliary model:
Assuming that :math:`0<\beta<1` and knowing the limit of geometric series, the conditional expectation of this variable can be evaluated based on the same auxiliary model:
.. math ::
\mathbb E \left[\sum_{h=0}^{\infty} \beta^h y_{t+h}\Biggl| \mathcal{Y}_{\underline{t-\tau}}\right] = \alpha \mathcal{C}^\tau(I-\beta\mathcal{C})^{-1}\mathcal{Y}_{t-\tau}
More generally, it is possible to consider finite discounted sums.
Finite discounted sums can also be considered.
.. command:: var_expectation_model (OPTIONS...);

View File

@ -18,7 +18,7 @@ function [h, lrcp] = hVectors(params, H, auxmodel, kind, id)
% params(2:end-1) ⟶ Autoregressive parameters.
% params(end) ⟶ Discount factor.
% Copyright © 2018-2021 Dynare Team
% Copyright © 2018-2024 Dynare Team
%
% This file is part of Dynare.
%
@ -52,21 +52,21 @@ n = length(H);
tmp = eye(n*m)-kron(G, transpose(H)); % inv(W2)
switch kind
case 'll'
case 'll' % (A.84), page 28 in Brayton, Davis and Tulip (2000)
h = A_1*A_b*((kron(iota(m, m), H))'*(tmp\kron(iota(m, m), iota(n, id))));
case 'dd'
case 'dd' % (A.79), page 26 in Brayton, Davis and Tulip (2000)
h = A_1*A_b*(kron(iota(m, m)'*inv(eye(m)-G), H')*(tmp\kron(iota(m, m), iota(n, id))));
case 'dl'
case 'dl' % (A.74), page 24 in Brayton, Davis and Tulip (2000)
h = A_1*A_b*(kron(iota(m, m)'*inv(eye(m)-G), (H'-eye(length(H))))*(tmp\kron(iota(m, m), iota(n, id))));
otherwise
error('Unknown kind value in PAC model.')
end
if nargin>1
if nargout>1
if isequal(kind, 'll')
lrcp = NaN;
else
d = A_1*A_b*(iota(m, m)'*inv((eye(m)-G)*(eye(m)-G))*iota(m, m));
lrcp = (1-sum(params(2:end-1))-d);
end
end
end