DESCRIPTION
This program performs Monte Carlo simulations for the dynamic bivariate model used as example in the paper (section 6.2.1). 
In order to replicate the simulations in the paper, please, execute the program S621_main.m adjusting T (the sample size) and hypothesis (the data generating process).
To replicate the results for HAC variance calculations execute S621_main_hac.m after S621_main.m has concluded.
To replicate the results for bootstrap critical value calculations execute S621_main_bootstrap.m after S621_main.m has concluded.

The model is given by:
y_t = l*x_t + v_t
(1 - alpha_x L)(x_t - x_(t-1)) = sqrt(gamma_x)*f_t
v_t = sqrt(Gamma_v)*e_t
(f_t,e_t)' are N[0(3,1),I(3)] under the null.
Gamma_v is a diagonal matrices.

The user should set:
- Calibration of the parameters ax, gx, g1 and g2;
- Number of Monte Carlo replicas S and sample size T;
- Distribution of the innovations,
hypothesis == 0: null, (f_t,e_t)' is N(0(3,1),I(3)),
hypothesis == 1: alternative, (f_t,e_t)' is t(0(2,1),I(2),nu),
hypothesis == 2: alternative, f_t is t(0,1,nu) and e_t is N(0,I),
hypothesis == 3: alternative, f_t is N(0,1) and e_t is t(0,I,nu),
hypothesis == 4: alternative, f_t and e_t are all t(0,1,nu),
hypothesis == 5: alternative, (f_t,e_t)' is t(0(3,1),I(3),nu,beta),
hypothesis == 6: alternative, f_t is t(0,1,nu,beta) and e_t is N(0,I),
hypothesis == 7: alternative, f_t is N(0,1) and e_t is t(0,I,nu,beta),
hypothesis == 8: alternative, f_t and e_t are all t(0,1,nu,beta).
Degrees of freedom nu and direction of asymmetry beta should also be set.

The program will compute and save:
- ML estimators and asymptotic variances of (c,alpha,gamma_x,Gamma_v),
- Scores with respect to the shape parameters,
- Asymptotic variances of the scores,
- Test statistics.

The program will create four files with names:
- estimate_'T'_'H'.mat, containing data and ML estimates,
- score_'T'_'H'.mat, shape parameter scores,
- stderr_'T'_'H'.mat, containing asymptotic variances of scores,
- test_'T'_'H'.mat, containing the test statistics.
'T' is replaced by the sample size and 'H' by the hypothesis of the simulations.

INFORMATION
Authors: Almuzara, Amengual, Sentana.
Created: January 2016. Revised: November 2018.
