07.¾­¼ÃѧģÐÍ-DSGEÄ£ÐÍÌÖÂÛÖ®Æß - ×î¼òµ¥µÄDSGEÄ£Ð͵ÄDynareÄ£ÄâºÍMLE-Bayesian¹À¼Æ ÏÂÔØ±¾ÎÄ

ÉúÃü´Í¸øÎÒÃÇ£¬ÎÒÃDZØÐë·îÏ×ÉúÃü£¬²ÅÄÜ»ñµÃÉúÃü¡£

Õâ¸önotes´¿´âÊÇɨäÓõġ£

ÎÒÓÃÁËÒ»¸ö×î¼òµ¥µÄÏßÐÔDSGE£¬Ö»ÓÐÁ½¸ö·½³Ì¡£ÏÈÊÇÎÒÓÃÊÖËãµÄ·½·¨ÕÒµ½saddle-path µÄpolicy function£¬È»ºóÊÖËã³öimpulse response function¡£ÕâЩÎÒ¶¼ÓÃDynare×öÁ˼ÆË㣬³ÌÐòºÍ½á¹û¶¼Ð´ÔÚnoteÀïÃæ¡£

ÉÏÃæÊÇÎÒnoteµÄ½ØÍ¼£¬Õâ¸öDSGEÄ£ÐÍʵ¼ÊÉϾÍÊÇÒ»¸ölinear rational expecation model (LREM)£¬µ«DSGEµÄÏßÐÔ»¯ºóµÄ±¾ÖÊÒ²¾ÍÊǸöLRE¡£ËäÈ»Õâ¸önoteÌṩµÄÄ£Ðͷdz£¼òµ¥£¬µ«ÊÇ˼·ÔÚÓÚÈçºÎÓÃDynareÀ´ÉîÈëѧϰÕâ¸ö¶¯Ì¬ÏµÍ³¡£Óм¸¸öÊÂÇéÐèÒª´ó¼Ò×Ô¼ºÀ´×ö£º

1. betaºÍrhoµÄ´óС£¬´ó¼Ò´Ó»»ºÜ¶à´Îcalibration£¬¿´ÄܶÔIRF´øÀ´Ê²Ã´Ó°Ïì? 2. betaºÍrho¶¼´óÓÚ1µÄʱºò£¬ÄãÓ¦¸ÃÔõôÐÞ¸ÄÄ£ÐÍ£¬ÎªÁËά³ÖÄ£Ð͵ÄÎȶ¨ÐÔ£¿ 3. ¿´ÐÞ¸ÄshockµÄstardard deviationÄܶÔÄ£ÐÍ´øÁËʲôӰÏ죿 4. Èç¹ûÄãÔÙ¼ÓÒ»¸ö·½³Ì½øÈ¥ÄØ£¿Ê²Ã´Ñù×ӵķ½³Ì£¿

ÒÔÉÏÄÚÈÝÎÒ¶¼ÊÔÑé¹ýÁË¡£Õâ¸ö¶«Î÷û·¨°ï´ó¼ÒÊÔÑ飬ËùÒÔ´ó¼Ò±ØÐë×Ô¼ºÊÔ×Å×ö¡£ÕâÑùÄã¿ÉÒÔѧµ½ºÜ¶à¹ØÓÚ¶¯Ì¬ÏµÍ³µÄ¸ÐÐÔÈÏʶ¡£

Ö®ºó£¬ÎÒÓÃ×î´óËÆÈ»¹À¼Æ¶Ô²ÎÊý¹À¼Æ£¬È»ºóÎÒ¹ÊÒâÖÆÔìunder-identificationµÄÎÊÌ⣬Èôó¼Ò¿´Ò»Ï½á¹ûÊÇʲôÑù×Ó¡£×îºó¾ÍÊÇBayesian estimation£¬ÎÒÖ»¹À¼ÆÁË1¸ö²ÎÊý£¬ÓÃÁË2ÌõƽÐÐÂí¶û¿Æ·òÁ´£¬×öÁ˳¬³¬¶Ì³ÌÄ£Ä⣨ֻÓÐ500´Î£¬Õý³£Çé¿ö¶¼ÊÇ100000£©£¬ÎªÁËʡʱ¼ä(ÎÒµçÄÔÖ»ÓÃ50Ãë×óÓÒ)£¬ËùÒÔÎÒ²¢Ã»ÓÐÈõçÄÔÅܺܳ¤µÄÂí¶û¿Æ·òÁ´ºÍ¶à¸öƽÐÐÁ´Ìõ¡£ËùÒÔ½á¹û·Ç³£²î£¬µ«ÊÇÕâ²»ÊǵÄÄ¿µÄ¡£Ä¿µÄ»¹ÊÇÔÚÓÚÈôÓÀ´Ã»¼û¹ýÕû¸ö¹À¼Æ¹ý³ÌµÄͬѧ¿´µ½Ò»¸öȫò¡£ËùÒÔÎÒûÓÐÌá¼°ÀíÂÛÄÚÈÝ£¬»òÕßÊÇÒ»´ø¶ø¹ý¡£

¶ÔÓÚBayesian estimation£¬ÓиöµØ·½Òª×¢ÒâµÄ¾ÍÊÇshockµÄ¸öÊý±ØÐë´óÓÚµÈobservableµÄ¸öÊý£¬ÕâÊÇÆô¶¯Kalman filterÄ£Äâlikelihood functionµÄ³ä·ÖÌõ¼þ¡£Kalman filterÊÇÒ»¸ö¼«Æä¸´ÔÓµÄËã·¨£¬¼ÆÁ¿¾­¼ÃѧÉÏÃæÓÃÀ´Ä£Äâlikelihood function¡£ÒÔºóÎÒ»áÓÐÒ»¸öÌù×ÓרÃÅÀ´Õ¹¿ªKalman filterµÄÄÚ²¿½á¹¹¡£ notesÏÂÔØ Ï£ÍûÊDZ¾ÎÞËùνÓУ¬ÎÞËùνÎ޵ġ£ÕâÕýÈçµØÉϵÄ·£»ÆäʵµØÉϱ¾Ã»Óз£¬×ßµÄÈ˶àÁË£¬Ò²±ã³ÉÁË·¡£

ÉúÃü´Í¸øÎÒÃÇ£¬ÎÒÃDZØÐë·îÏ×ÉúÃü£¬²ÅÄÜ»ñµÃÉúÃü¡£

Simplest DSGE.pdf (257.99 KB)

¹ØÓÚÄ£Ð;ßÌåÍÆµ¼ºÍÄ£ÄâµÄÀý×Ó£¬Çë¿´µÚÁù¸öÌû×Ó DSGEÄ£ÐÍÌÖÂÛÖ®Áù¡ª¡ªÐ¹ŵäÔö³¤Ä£ÐÍ£¨ÈëÃż¶DSGE£©µÄÍÆµ¼ºÍDynareÄ£”M ¹ØÓÚÄ£ÐÍÇó½â·½·¨£¬±ÈÈçBlanchard-Khan£¬Uhlig ·½·¨£¬¿´µÚÈý¸öÌû×Ó DSGEÄ£ÐÍÌÖÂÛÖ®Èý¡ª¡ªÏßÐÎÀíÐÔÔ¤ÆÚÄ£ÐÍ(Linear rational expectation model) Èç¹ûÄãÁ¬DSGEÊÇʲô¶¼²»ÖªµÀ£¬¿´ Õë¶ÔDSGEÄ£ÐÍѧϰµÄ½¨ÒéÐԼƻ®£¨Ô­´´£©¹ØÓÚDSGEÇó½âºÍÄ£ÐͲÎÊý¹À¼ÆµÄһЩÈÏʶ(Ô­´´)

>> dynare simplemodel

Configuring Dynare ... [mex] Generalized QZ.

[mex] Sylvester equation solution. [mex] Kronecker products.

[mex] Sparse kronecker products.

[mex] Local state space iteration (second order). [mex] Bytecode evaluation.

[mex] k-order perturbation solver. [mex] k-order solution simulation.

[mex] Quasi Monte-Carlo sequence (Sobol). [mex] Markov Switching SBVAR.

Starting Dynare (version 4.3.3).

Starting preprocessing of the model file ... Found 2 equation(s).

Evaluating expressions...done

Computing static model derivatives: - order 1

Computing dynamic model derivatives: - order 1

Processing outputs ...done Preprocessing completed.

Starting MATLAB/Octave computing.

STEADY-STATE RESULTS:

Ï£ÍûÊDZ¾ÎÞËùνÓУ¬ÎÞËùνÎ޵ġ£ÕâÕýÈçµØÉϵÄ·£»ÆäʵµØÉϱ¾Ã»Óз£¬×ßµÄÈ˶àÁË£¬Ò²±ã³ÉÁË·¡£

ÉúÃü´Í¸øÎÒÃÇ£¬ÎÒÃDZØÐë·îÏ×ÉúÃü£¬²ÅÄÜ»ñµÃÉúÃü¡£

x 0 y 0

EIGENVALUES:

Modulus Real Imaginary

0.9 0.9 0 1.111 1.111 0

There are 1 eigenvalue(s) larger than 1 in modulus for 1 forward-looking variable(s)

The rank condition is verified.

Residuals of the static equations:

Equation number 1 : 0 Equation number 2 : 0

MODEL SUMMARY

Number of variables: 2 Number of stochastic shocks: 2 Number of state variables: 1 Number of jumpers: 1 Number of static variables: 0

MATRIX OF COVARIANCE OF EXOGENOUS SHOCKS

Variables e u e 0.010000 0.000000 u 0.000000 0.010000

POLICY AND TRANSITION FUNCTIONS

y x

Ï£ÍûÊDZ¾ÎÞËùνÓУ¬ÎÞËùνÎ޵ġ£ÕâÕýÈçµØÉϵÄ·£»ÆäʵµØÉϱ¾Ã»Óз£¬×ßµÄÈ˶àÁË£¬Ò²±ã³ÉÁË·¡£

ÉúÃü´Í¸øÎÒÃÇ£¬ÎÒÃDZØÐë·îÏ×ÉúÃü£¬²ÅÄÜ»ñµÃÉúÃü¡£

x(-1) 4.736842 0.900000 e 5.263158 1.000000 u 1.000000 0

MOMENTS OF SIMULATED VARIABLES

VARIABLE MEAN STD. DEV. VARIANCE SKEWNESS KURTOSIS y -0.347966 1.279206 1.636369 -0.076629 0.045543 x -0.065640 0.242347 0.058732 -0.091698 0.036069

CORRELATION OF SIMULATED VARIABLES

VARIABLE y x y 1.0000 0.9970 x 0.9970 1.0000

AUTOCORRELATION OF SIMULATED VARIABLES

VARIABLE 1 2 3 4 5 y 0.9127 0.8244 0.7364 0.6581 0.5958 x 0.9163 0.8295 0.7426 0.6692 0.6119 Loading 900 observations from Simul_data.mat

Initial value of the log posterior (or likelihood): -14016.6527

Warning: Options LargeScale = 'off' and Algorithm = 'trust-region-reflective' conflict. Ignoring Algorithm and running active-set algorithm. To run trust-region-reflective, set LargeScale = 'on'. To run active-set without this warning, use Algorithm = 'active-set'. > In fmincon at 454

In dynare_estimation_1 at 228 In dynare_estimation at 70 In simplemodel at 129 In dynare at 120

Warning: Your current settings will run a different algorithm (interior-point) in a future release. > In fmincon at 458

In dynare_estimation_1 at 228 In dynare_estimation at 70 In simplemodel at 129 In dynare at 120

Max Line search Directional First-order Iter F-count f(x) constraint steplength derivative optimality Procedure Ï£ÍûÊDZ¾ÎÞËùνÓУ¬ÎÞËùνÎ޵ġ£ÕâÕýÈçµØÉϵÄ·£»ÆäʵµØÉϱ¾Ã»Óз£¬×ßµÄÈ˶àÁË£¬Ò²±ã³ÉÁË·¡£

ÉúÃü´Í¸øÎÒÃÇ£¬ÎÒÃDZØÐë·îÏ×ÉúÃü£¬²ÅÄÜ»ñµÃÉúÃü¡£

0 3 14016.7 -0.19 1 7 -1447.33 -0.095 0.5 -1.1e+05 5.09e+04 2 13 -1577.29 -0.08313 0.125 -2.88e+04 8.91e+03 3 17 -1579.48 -0.04156 0.5 -244 4.29e+03 4 22 -1587.63 -0.07759 0.25 -341 1.9e+03 5 29 -1588.01 -0.07479 0.0625 -293 56.2 6 32 -1588.68 -0.08274 1 -76.1 390 7 35 -1589.03 -0.08502 1 -48.8 980 8 38 -1589.17 -0.08623 1 -140 110 9 41 -1589.19 -0.08436 1 -11.3 17.6 10 44 -1589.19 -0.08348 1 -3.35 8.1 11 47 -1589.19 -0.08345 1 -0.72 0.0422

Local minimum possible. Constraints satisfied.

fmincon stopped because the size of the current search direction is less than twice the selected value of the step size tolerance and constraints are satisfied to within the default value of the constraint tolerance.

No active inequalities.

POSTERIOR KERNEL OPTIMIZATION PROBLEM!

(minus) the hessian matrix at the \=> posterior variance of the estimated parameters are not positive. You should try to change the initial values of the parameters using the estimated_params_init block, or use another optimization routine. Warning: The results below are most likely wrong! > In dynare_estimation_1 at 480 In dynare_estimation at 70 In simplemodel at 129 In dynare at 120

MODE CHECK

Fval obtained by the minimization routine: -1589.188769

RESULTS FROM MAXIMUM LIKELIHOOD parameters

Estimate s.d. t-stat

beta 0.8935 0.0000 0.0000

Ï£ÍûÊDZ¾ÎÞËùνÓУ¬ÎÞËùνÎ޵ġ£ÕâÕýÈçµØÉϵÄ·£»ÆäʵµØÉϱ¾Ã»Óз£¬×ßµÄÈ˶àÁË£¬Ò²±ã³ÉÁË·¡£

ÉúÃü´Í¸øÎÒÃÇ£¬ÎÒÃDZØÐë·îÏ×ÉúÃü£¬²ÅÄÜ»ñµÃÉúÃü¡£ rho 0.9065 0.0000 0.0000 Total computing time : 0h00m07s

Ï£ÍûÊDZ¾ÎÞËùνÓУ¬ÎÞËùνÎ޵ġ£ÕâÕýÈçµØÉϵÄ·£»ÆäʵµØÉϱ¾Ã»Óз£¬×ßµÄÈ˶àÁË£¬Ò²±ã³ÉÁË·¡£