Am 06.10.2020 um 09:56 schrieb Riccardo (Jack) Lucchetti:
I'm going back to a discussion we had last month to ask you guys your
opinion: would it be wortwhile to add a paragraph to the GUG chapter on
systems with an example on how to simulate from such a system?
Is that a rhetorical question? I mean, the only reason why it doesn't
exist yet is that nobody took the time to write it, right?
What do you think?
### compute the reduced form VAR representation
matrix A = $sysGamma\$sysA
matrix b = $sysGamma\$sysB
This is super elegant and concise - is it also correct (combined with
varsimul below)? I dimly remember that there was an issue with the
ordering of the regressors that might be different from what varsimul
expects.
### produce the simulation
scalar horizon = 12
# future values of the exogenous variable
matrix SimExo = 1 ~ seq($nobs + 1, $nobs + horizon)'
I think this doesn't generalize to any possible selected sample with
respect to the normalization of the time trend, but that's of course a
secondary issue.
matrix X = SimExo * b'
# simulated disturbances
E = mnormal(horizon, 3) * cholesky($sigma)'
# inital values
list ENDO = Con Inv Inc
matrix init = {ENDO}[$nobs-1:,]
I guess this is $nobs - maxlag + 1 ?
# perform simulation
Sim = varsimul(A, X + E, init)
Very nice.
thanks
sven