SWZ: changes for new code
parent
e95699ffeb
commit
48c7ee6788
|
@ -921,22 +921,130 @@ SBVARStatement::writeOutput(ostream &output, const string &basename) const
|
|||
output << "ms_sbvar(0,M_,options_);" << endl;
|
||||
}
|
||||
|
||||
MS_SBVARStatement::MS_SBVARStatement(const OptionsList &options_list_arg) :
|
||||
MSSBVAREstimationStatement::MSSBVAREstimationStatement(const OptionsList &options_list_arg) :
|
||||
options_list(options_list_arg)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
MS_SBVARStatement::checkPass(ModFileStructure &mod_file_struct)
|
||||
MSSBVAREstimationStatement::checkPass(ModFileStructure &mod_file_struct)
|
||||
{
|
||||
mod_file_struct.bvar_present = true;
|
||||
}
|
||||
|
||||
void
|
||||
MS_SBVARStatement::writeOutput(ostream &output, const string &basename) const
|
||||
MSSBVAREstimationStatement::writeOutput(ostream &output, const string &basename) const
|
||||
{
|
||||
options_list.writeOutput(output);
|
||||
output << "ms_sbvar(1,M_,options_);" << endl;
|
||||
output << "ms_estimation(options_);" << endl;
|
||||
}
|
||||
|
||||
MSSBVARSimulationStatement::MSSBVARSimulationStatement(const OptionsList &options_list_arg) :
|
||||
options_list(options_list_arg)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
MSSBVARSimulationStatement::checkPass(ModFileStructure &mod_file_struct)
|
||||
{
|
||||
mod_file_struct.bvar_present = true;
|
||||
}
|
||||
|
||||
void
|
||||
MSSBVARSimulationStatement::writeOutput(ostream &output, const string &basename) const
|
||||
{
|
||||
options_list.writeOutput(output);
|
||||
output << "ms_simulation(options_);" << endl;
|
||||
}
|
||||
|
||||
MSSBVARComputeMDDStatement::MSSBVARComputeMDDStatement(const OptionsList &options_list_arg) :
|
||||
options_list(options_list_arg)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
MSSBVARComputeMDDStatement::checkPass(ModFileStructure &mod_file_struct)
|
||||
{
|
||||
mod_file_struct.bvar_present = true;
|
||||
}
|
||||
|
||||
void
|
||||
MSSBVARComputeMDDStatement::writeOutput(ostream &output, const string &basename) const
|
||||
{
|
||||
options_list.writeOutput(output);
|
||||
output << "oo_ = ms_compute_mdd(options_,oo_);" << endl;
|
||||
}
|
||||
|
||||
MSSBVARComputeProbabilitiesStatement::MSSBVARComputeProbabilitiesStatement(const OptionsList &options_list_arg) :
|
||||
options_list(options_list_arg)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
MSSBVARComputeProbabilitiesStatement::checkPass(ModFileStructure &mod_file_struct)
|
||||
{
|
||||
mod_file_struct.bvar_present = true;
|
||||
}
|
||||
|
||||
void
|
||||
MSSBVARComputeProbabilitiesStatement::writeOutput(ostream &output, const string &basename) const
|
||||
{
|
||||
options_list.writeOutput(output);
|
||||
output << "ms_compute_probabilities(options_);" << endl;
|
||||
}
|
||||
|
||||
MSSBVARIrfStatement::MSSBVARIrfStatement(const OptionsList &options_list_arg) :
|
||||
options_list(options_list_arg)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
MSSBVARIrfStatement::checkPass(ModFileStructure &mod_file_struct)
|
||||
{
|
||||
mod_file_struct.bvar_present = true;
|
||||
}
|
||||
|
||||
void
|
||||
MSSBVARIrfStatement::writeOutput(ostream &output, const string &basename) const
|
||||
{
|
||||
options_list.writeOutput(output);
|
||||
output << "ms_irf(options_);" << endl;
|
||||
}
|
||||
|
||||
MSSBVARForecastStatement::MSSBVARForecastStatement(const OptionsList &options_list_arg) :
|
||||
options_list(options_list_arg)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
MSSBVARForecastStatement::checkPass(ModFileStructure &mod_file_struct)
|
||||
{
|
||||
mod_file_struct.bvar_present = true;
|
||||
}
|
||||
|
||||
void
|
||||
MSSBVARForecastStatement::writeOutput(ostream &output, const string &basename) const
|
||||
{
|
||||
options_list.writeOutput(output);
|
||||
output << "ms_forecast(options_);" << endl;
|
||||
}
|
||||
|
||||
MSSBVARVarianceDecompositionStatement::MSSBVARVarianceDecompositionStatement(const OptionsList &options_list_arg) :
|
||||
options_list(options_list_arg)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
MSSBVARVarianceDecompositionStatement::checkPass(ModFileStructure &mod_file_struct)
|
||||
{
|
||||
mod_file_struct.bvar_present = true;
|
||||
}
|
||||
|
||||
void
|
||||
MSSBVARVarianceDecompositionStatement::writeOutput(ostream &output, const string &basename) const
|
||||
{
|
||||
options_list.writeOutput(output);
|
||||
output << "ms_variance_decomposition(options_);" << endl;
|
||||
}
|
||||
|
||||
IdentificationStatement::IdentificationStatement(const OptionsList &options_list_arg)
|
||||
|
|
|
@ -378,12 +378,72 @@ public:
|
|||
virtual void writeOutput(ostream &output, const string &basename) const;
|
||||
};
|
||||
|
||||
class MS_SBVARStatement : public Statement
|
||||
class MSSBVAREstimationStatement : public Statement
|
||||
{
|
||||
private:
|
||||
const OptionsList options_list;
|
||||
public:
|
||||
MS_SBVARStatement(const OptionsList &options_list_arg);
|
||||
MSSBVAREstimationStatement(const OptionsList &options_list_arg);
|
||||
virtual void checkPass(ModFileStructure &mod_file_struct);
|
||||
virtual void writeOutput(ostream &output, const string &basename) const;
|
||||
};
|
||||
|
||||
class MSSBVARSimulationStatement : public Statement
|
||||
{
|
||||
private:
|
||||
const OptionsList options_list;
|
||||
public:
|
||||
MSSBVARSimulationStatement(const OptionsList &options_list_arg);
|
||||
virtual void checkPass(ModFileStructure &mod_file_struct);
|
||||
virtual void writeOutput(ostream &output, const string &basename) const;
|
||||
};
|
||||
|
||||
class MSSBVARComputeMDDStatement : public Statement
|
||||
{
|
||||
private:
|
||||
const OptionsList options_list;
|
||||
public:
|
||||
MSSBVARComputeMDDStatement(const OptionsList &options_list_arg);
|
||||
virtual void checkPass(ModFileStructure &mod_file_struct);
|
||||
virtual void writeOutput(ostream &output, const string &basename) const;
|
||||
};
|
||||
|
||||
class MSSBVARComputeProbabilitiesStatement : public Statement
|
||||
{
|
||||
private:
|
||||
const OptionsList options_list;
|
||||
public:
|
||||
MSSBVARComputeProbabilitiesStatement(const OptionsList &options_list_arg);
|
||||
virtual void checkPass(ModFileStructure &mod_file_struct);
|
||||
virtual void writeOutput(ostream &output, const string &basename) const;
|
||||
};
|
||||
|
||||
class MSSBVARIrfStatement : public Statement
|
||||
{
|
||||
private:
|
||||
const OptionsList options_list;
|
||||
public:
|
||||
MSSBVARIrfStatement(const OptionsList &options_list_arg);
|
||||
virtual void checkPass(ModFileStructure &mod_file_struct);
|
||||
virtual void writeOutput(ostream &output, const string &basename) const;
|
||||
};
|
||||
|
||||
class MSSBVARForecastStatement : public Statement
|
||||
{
|
||||
private:
|
||||
const OptionsList options_list;
|
||||
public:
|
||||
MSSBVARForecastStatement(const OptionsList &options_list_arg);
|
||||
virtual void checkPass(ModFileStructure &mod_file_struct);
|
||||
virtual void writeOutput(ostream &output, const string &basename) const;
|
||||
};
|
||||
|
||||
class MSSBVARVarianceDecompositionStatement : public Statement
|
||||
{
|
||||
private:
|
||||
const OptionsList options_list;
|
||||
public:
|
||||
MSSBVARVarianceDecompositionStatement(const OptionsList &options_list_arg);
|
||||
virtual void checkPass(ModFileStructure &mod_file_struct);
|
||||
virtual void writeOutput(ostream &output, const string &basename) const;
|
||||
};
|
||||
|
|
328
DynareBison.yy
328
DynareBison.yy
|
@ -150,16 +150,26 @@ class ParsingDriver;
|
|||
%token GSIG2_LMD GSIG2_LMDM Q_DIAG FLAT_PRIOR NCSK NSTD
|
||||
%token INDXPARR INDXOVR INDXAP APBAND INDXIMF IMFBAND INDXFORE FOREBAND INDXGFOREHAT INDXGIMFHAT
|
||||
%token INDXESTIMA INDXGDLS EQ_MS FILTER_COVARIANCE FILTER_DECOMPOSITION
|
||||
%token EQ_CMS TLINDX TLNUMBER BANACT CREATE_INITIALIZATION_FILE ESTIMATE_MSMODEL
|
||||
%token COMPUTE_MDD COMPUTE_PROBABILITIES PRINT_DRAWS N_DRAWS THINNING_FACTOR PROPOSAL_DRAWS MARKOV_FILE
|
||||
%token MHM_FILE OUTPUT_FILE_TAG DRAWS_NBR_BURN_IN_1 DRAWS_NBR_BURN_IN_2 DRAWS_NBR_MEAN_VAR_ESTIMATE
|
||||
%token DRAWS_NBR_MODIFIED_HARMONIC_MEAN DIRICHLET_SCALE
|
||||
%token SBVAR MS_SBVAR TREND_VAR DEFLATOR GROWTH_FACTOR
|
||||
%token EQ_CMS TLINDX TLNUMBER BANACT CREATE_INITIALIZATION_FILE
|
||||
%token OUTPUT_FILE_TAG DRAWS_NBR_BURN_IN_1 DRAWS_NBR_BURN_IN_2
|
||||
%token SBVAR TREND_VAR DEFLATOR GROWTH_FACTOR MS_IRF MS_VARIANCE_DECOMPOSITION
|
||||
%token MS_ESTIMATION MS_SIMULATION MS_COMPUTE_MDD MS_COMPUTE_PROBABILITIES MS_FORECAST
|
||||
%token SVAR_IDENTIFICATION EQUATION EXCLUSION LAG UPPER_CHOLESKY LOWER_CHOLESKY
|
||||
%token MARKOV_SWITCHING CHAIN STATE DURATION NUMBER_OF_STATES
|
||||
%token SVAR COEFFICIENTS VARIANCES CONSTANTS EQUATIONS
|
||||
%token EXTERNAL_FUNCTION EXT_FUNC_NAME EXT_FUNC_NARGS FIRST_DERIV_PROVIDED SECOND_DERIV_PROVIDED
|
||||
%token SELECTED_VARIABLES_ONLY COVA_COMPUTE
|
||||
%token ERROR_BANDS ERROR_BAND_PERCENTILES PARAMETER_UNCERTAINTY
|
||||
%token SHOCK_DRAWS REGIMES FREE_PARAMETERS MEDIAN DATA_OBS_NBR
|
||||
%token FILTERED_PROBABILITIES FILTERED REAL_TIME_SMOOTHED
|
||||
%token PROPOSAL_TYPE MDD_PROPOSAL_DRAWS MDD_USE_MEAN_CENTER
|
||||
%token ADAPTIVE_MH_DRAWS THINNING_FACTOR COEFFICIENTS_PRIOR_HYPERPARAMETERS
|
||||
%token CONVERGENCE_STARTING_VALUE CONVERGENCE_ENDING_VALUE CONVERGENCE_INCREMENT_VALUE
|
||||
%token MAX_ITERATIONS_STARTING_VALUE MAX_ITERATIONS_INCREMENT_VALUE MAX_BLOCK_ITERATIONS
|
||||
%token MAX_REPEATED_OPTIMIZATION_RUNS FUNCTION_CONVERGENCE_CRITERION
|
||||
%token PARAMETER_CONVERGENCE_CRITERION NUMBER_OF_LARGE_PERTURBATIONS NUMBER_OF_SMALL_PERTURBATIONS
|
||||
%token NUMBER_OF_POSTERIOR_DRAWS_AFTER_PERTURBATION MAX_NUMBER_OF_STAGES
|
||||
%token RANDOM_FUNCTION_CONVERGENCE_CRITERION RANDOM_PARAMETER_CONVERGENCE_CRITERION
|
||||
|
||||
%type <node_val> expression expression_or_empty
|
||||
%type <node_val> equation hand_side
|
||||
|
@ -221,7 +231,6 @@ statement : parameters
|
|||
| bvar_density
|
||||
| bvar_forecast
|
||||
| sbvar
|
||||
| ms_sbvar
|
||||
| dynare_sensitivity
|
||||
| homotopy_setup
|
||||
| forecast
|
||||
|
@ -240,6 +249,13 @@ statement : parameters
|
|||
| external_function
|
||||
| steady_state_model
|
||||
| trend_var
|
||||
| ms_estimation
|
||||
| ms_simulation
|
||||
| ms_compute_mdd
|
||||
| ms_compute_probabilities
|
||||
| ms_forecast
|
||||
| ms_irf
|
||||
| ms_variance_decomposition
|
||||
;
|
||||
|
||||
dsample : DSAMPLE INT_NUMBER ';'
|
||||
|
@ -1456,83 +1472,169 @@ sbvar : SBVAR ';'
|
|||
{ driver.sbvar(); }
|
||||
;
|
||||
|
||||
ms_sbvar_option : o_datafile
|
||||
| o_freq
|
||||
| o_initial_year
|
||||
| o_initial_subperiod
|
||||
| o_final_year
|
||||
| o_final_subperiod
|
||||
| o_data
|
||||
| o_vlist
|
||||
| o_vlistlog
|
||||
| o_vlistper
|
||||
| o_varlist
|
||||
| o_restriction_fname
|
||||
| o_nlags
|
||||
| o_cross_restrictions
|
||||
| o_contemp_reduced_form
|
||||
| o_real_pseudo_forecast
|
||||
| o_bayesian_prior
|
||||
| o_dummy_obs
|
||||
| o_nstates
|
||||
| o_indxscalesstates
|
||||
| o_alpha
|
||||
| o_beta
|
||||
| o_gsig2_lmd
|
||||
| o_gsig2_lmdm
|
||||
| o_q_diag
|
||||
| o_flat_prior
|
||||
| o_ncsk
|
||||
| o_nstd
|
||||
| o_ninv
|
||||
| o_indxparr
|
||||
| o_indxovr
|
||||
| o_aband
|
||||
| o_indxap
|
||||
| o_apband
|
||||
| o_indximf
|
||||
| o_indxfore
|
||||
| o_foreband
|
||||
| o_indxgforhat
|
||||
| o_indxgimfhat
|
||||
| o_indxestima
|
||||
| o_indxgdls
|
||||
| o_eq_ms
|
||||
| o_cms
|
||||
| o_ncms
|
||||
| o_eq_cms
|
||||
| o_tlindx
|
||||
| o_tlnumber
|
||||
| o_cnum
|
||||
| o_forecast
|
||||
| o_output_file_tag
|
||||
| o_create_initialization_file
|
||||
| o_estimate_msmodel
|
||||
| o_compute_mdd
|
||||
| o_compute_probabilities
|
||||
| o_print_draws
|
||||
| o_n_draws
|
||||
| o_thinning_factor
|
||||
| o_markov_file
|
||||
| o_mhm_file
|
||||
| o_proposal_draws
|
||||
| o_draws_nbr_burn_in_1
|
||||
| o_draws_nbr_burn_in_2
|
||||
| o_draws_nbr_mean_var_estimate
|
||||
| o_draws_nbr_modified_harmonic_mean
|
||||
| o_dirichlet_scale
|
||||
;
|
||||
ms_variance_decomposition_option : o_output_file_tag
|
||||
| o_filtered_probabilities
|
||||
| o_error_bands
|
||||
| o_error_band_percentiles
|
||||
| o_parameter_uncertainty
|
||||
| o_shock_draws
|
||||
| o_thinning_factor
|
||||
| o_regimes
|
||||
| o_free_parameters
|
||||
| o_load_mh_file
|
||||
| o_median
|
||||
;
|
||||
|
||||
ms_sbvar_options_list : ms_sbvar_option COMMA ms_sbvar_options_list
|
||||
| ms_sbvar_option
|
||||
ms_variance_decomposition_options_list : ms_variance_decomposition_option COMMA ms_variance_decomposition_options_list
|
||||
| ms_variance_decomposition_option
|
||||
;
|
||||
|
||||
ms_variance_decomposition : MS_VARIANCE_DECOMPOSITION ';'
|
||||
{ driver.ms_variance_decomposition(); }
|
||||
| MS_VARIANCE_DECOMPOSITION '(' ms_variance_decomposition_options_list ')' ';'
|
||||
{ driver.ms_variance_decomposition(); }
|
||||
;
|
||||
|
||||
ms_forecast_option : o_output_file_tag
|
||||
| o_data_obs_nbr
|
||||
| o_error_bands
|
||||
| o_error_band_percentiles
|
||||
| o_parameter_uncertainty
|
||||
| o_shock_draws
|
||||
| o_thinning_factor
|
||||
| o_regimes
|
||||
| o_free_parameters
|
||||
| o_load_mh_file
|
||||
| o_median
|
||||
;
|
||||
|
||||
ms_forecast_options_list : ms_forecast_option COMMA ms_forecast_options_list
|
||||
| ms_forecast_option
|
||||
;
|
||||
|
||||
ms_forecast : MS_FORECAST ';'
|
||||
{ driver.ms_forecast(); }
|
||||
| MS_FORECAST '(' ms_forecast_options_list ')' ';'
|
||||
{ driver.ms_forecast(); }
|
||||
;
|
||||
|
||||
ms_irf_option : o_output_file_tag
|
||||
| o_filtered_probabilities
|
||||
| o_error_bands
|
||||
| o_error_band_percentiles
|
||||
| o_parameter_uncertainty
|
||||
| o_shock_draws
|
||||
| o_thinning_factor
|
||||
| o_regimes
|
||||
| o_free_parameters
|
||||
| o_load_mh_file
|
||||
| o_median
|
||||
;
|
||||
|
||||
ms_irf_options_list : ms_irf_option COMMA ms_irf_options_list
|
||||
| ms_irf_option
|
||||
;
|
||||
|
||||
ms_irf : MS_IRF ';'
|
||||
{ driver.ms_irf(); }
|
||||
| MS_IRF '(' ms_irf_options_list ')' ';'
|
||||
{ driver.ms_irf(); }
|
||||
;
|
||||
|
||||
ms_compute_probabilities_option : o_output_file_tag
|
||||
| o_filtered_probabilities
|
||||
| o_real_time_smoothed
|
||||
;
|
||||
|
||||
ms_compute_probabilities_options_list : ms_compute_probabilities_option COMMA ms_compute_probabilities_options_list
|
||||
| ms_compute_probabilities_option
|
||||
;
|
||||
|
||||
ms_compute_probabilities : MS_COMPUTE_PROBABILITIES ';'
|
||||
{ driver.ms_compute_probabilities(); }
|
||||
| MS_COMPUTE_PROBABILITIES '(' ms_compute_probabilities_options_list ')' ';'
|
||||
{ driver.ms_compute_probabilities(); }
|
||||
;
|
||||
|
||||
ms_compute_mdd_option : o_output_file_tag
|
||||
| o_load_mh_file
|
||||
| o_proposal_type
|
||||
| o_mdd_proposal_draws
|
||||
| o_mdd_use_mean_center
|
||||
;
|
||||
|
||||
ms_sbvar : MS_SBVAR ';'
|
||||
{ driver.ms_sbvar(); }
|
||||
| MS_SBVAR '(' ms_sbvar_options_list ')' ';'
|
||||
{ driver.ms_sbvar(); }
|
||||
;
|
||||
ms_compute_mdd_options_list : ms_compute_mdd_option COMMA ms_compute_mdd_options_list
|
||||
| ms_compute_mdd_option
|
||||
;
|
||||
|
||||
ms_compute_mdd : MS_COMPUTE_MDD ';'
|
||||
{ driver.ms_compute_mdd(); }
|
||||
| MS_COMPUTE_MDD '(' ms_compute_mdd_options_list ')' ';'
|
||||
{ driver.ms_compute_mdd(); }
|
||||
;
|
||||
|
||||
ms_simulation_option : o_output_file_tag
|
||||
| o_mh_replic
|
||||
| o_drop
|
||||
| o_thinning_factor
|
||||
| o_adaptive_mh_draws
|
||||
;
|
||||
|
||||
ms_simulation_options_list : ms_simulation_option COMMA ms_simulation_options_list
|
||||
| ms_simulation_option
|
||||
;
|
||||
|
||||
ms_simulation : MS_SIMULATION ';'
|
||||
{ driver.ms_simulation(); }
|
||||
| MS_SIMULATION '(' ms_simulation_options_list ')' ';'
|
||||
{ driver.ms_simulation(); }
|
||||
;
|
||||
|
||||
ms_estimation_option : o_coefficients_prior_hyperparameters
|
||||
| o_freq
|
||||
| o_initial_year
|
||||
| o_initial_subperiod
|
||||
| o_final_year
|
||||
| o_final_subperiod
|
||||
| o_datafile
|
||||
| o_varlist
|
||||
| o_nlags
|
||||
| o_cross_restrictions
|
||||
| o_contemp_reduced_form
|
||||
| o_bayesian_prior
|
||||
| o_alpha
|
||||
| o_beta
|
||||
| o_gsig2_lmd
|
||||
| o_gsig2_lmdm
|
||||
| o_upper_cholesky
|
||||
| o_lower_cholesky
|
||||
| o_output_file_tag
|
||||
| o_convergence_starting_value
|
||||
| o_convergence_ending_value
|
||||
| o_convergence_increment_value
|
||||
| o_max_iterations_starting_value
|
||||
| o_max_iterations_increment_value
|
||||
| o_max_block_iterations
|
||||
| o_max_repeated_optimization_runs
|
||||
| o_function_convergence_criterion
|
||||
| o_parameter_convergence_criterion
|
||||
| o_number_of_large_perturbations
|
||||
| o_number_of_small_perturbations
|
||||
| o_number_of_posterior_draws_after_perturbation
|
||||
| o_max_number_of_stages
|
||||
| o_random_function_convergence_criterion
|
||||
| o_random_parameter_convergence_criterion
|
||||
;
|
||||
|
||||
ms_estimation_options_list : ms_estimation_option COMMA ms_estimation_options_list
|
||||
| ms_estimation_option
|
||||
;
|
||||
|
||||
ms_estimation : MS_ESTIMATION ';'
|
||||
{ driver.ms_estimation(); }
|
||||
| MS_ESTIMATION '(' ms_estimation_options_list ')' ';'
|
||||
{ driver.ms_estimation(); }
|
||||
;
|
||||
|
||||
dynare_sensitivity : DYNARE_SENSITIVITY ';'
|
||||
{ driver.dynare_sensitivity(); }
|
||||
|
@ -1896,25 +1998,9 @@ o_eq_cms : EQ_CMS EQUAL INT_NUMBER {driver.option_num("ms.eq_cms",$3); };
|
|||
o_tlindx : TLINDX EQUAL INT_NUMBER {driver.option_num("ms.tlindx",$3); };
|
||||
o_tlnumber : TLNUMBER EQUAL INT_NUMBER {driver.option_num("ms.tlnumber",$3); };
|
||||
o_cnum : CNUM EQUAL INT_NUMBER {driver.option_num("ms.cnum",$3); };
|
||||
o_output_file_tag : OUTPUT_FILE_TAG EQUAL '(' symbol_list ')' {driver.option_symbol_list("ms.output_file_tag"); };
|
||||
o_create_initialization_file : CREATE_INITIALIZATION_FILE EQUAL INT_NUMBER {driver.option_num("ms.create_initialization_file",$3); };
|
||||
o_estimate_msmodel : ESTIMATE_MSMODEL EQUAL INT_NUMBER {driver.option_num("ms.estimate_msmodel",$3); };
|
||||
o_compute_mdd : COMPUTE_MDD EQUAL INT_NUMBER {driver.option_num("ms.compute_mdd",$3); };
|
||||
o_compute_probabilities : COMPUTE_PROBABILITIES EQUAL INT_NUMBER {driver.option_num("ms.compute_probabilities",$3); };
|
||||
o_print_draws : PRINT_DRAWS EQUAL INT_NUMBER {driver.option_num("ms.print_draws",$3); };
|
||||
o_n_draws : N_DRAWS EQUAL INT_NUMBER {driver.option_num("ms.n_draws",$3); };
|
||||
o_thinning_factor : THINNING_FACTOR EQUAL INT_NUMBER {driver.option_num("ms.thinning_factor",$3); };
|
||||
o_markov_file : MARKOV_FILE EQUAL NAME {driver.option_str("ms.markov_file",$3); };
|
||||
o_mhm_file: MHM_FILE EQUAL NAME {driver.option_str("ms.mhm_file",$3); };
|
||||
o_proposal_draws : PROPOSAL_DRAWS EQUAL INT_NUMBER {driver.option_num("ms.proposal_draws",$3); };
|
||||
o_draws_nbr_burn_in_1 : DRAWS_NBR_BURN_IN_1 EQUAL INT_NUMBER {driver.option_num("ms.draws_nbr_burn_in_1",$3); };
|
||||
o_draws_nbr_burn_in_2 : DRAWS_NBR_BURN_IN_2 EQUAL INT_NUMBER {driver.option_num("ms.draws_nbr_burn_in_2",$3); };
|
||||
o_draws_nbr_mean_var_estimate : DRAWS_NBR_MEAN_VAR_ESTIMATE EQUAL INT_NUMBER {driver.option_num("ms.draws_nbr_mean_var_estimate",$3); };
|
||||
o_draws_nbr_modified_harmonic_mean : DRAWS_NBR_MODIFIED_HARMONIC_MEAN EQUAL INT_NUMBER {driver.option_num("ms.draws_nbr_modified_harmonic_mean",$3); };
|
||||
o_dirichlet_scale : DIRICHLET_SCALE EQUAL INT_NUMBER {driver.option_num("ms.dirichlet_scale",$3); };
|
||||
o_output_file_tag : OUTPUT_FILE_TAG EQUAL '(' symbol_list ')' {driver.option_symbol_list("ms.ft"); };
|
||||
o_k_order_solver : K_ORDER_SOLVER {driver.option_num("k_order_solver","1"); };
|
||||
o_pruning : PRUNING { driver.option_num("pruning", "1"); };
|
||||
|
||||
o_chain : CHAIN EQUAL INT_NUMBER { driver.option_num("ms.chain",$3); };
|
||||
o_state : STATE EQUAL INT_NUMBER { driver.option_num("ms.state",$3); };
|
||||
o_duration : DURATION EQUAL non_negative_number
|
||||
|
@ -1958,6 +2044,56 @@ o_selected_variables_only : SELECTED_VARIABLES_ONLY
|
|||
o_cova_compute : COVA_COMPUTE EQUAL INT_NUMBER
|
||||
{ driver.option_num("cova_compute",$3);}
|
||||
;
|
||||
o_upper_cholesky : UPPER_CHOLESKY { driver.option_num("ms.upper_cholesky","1"); };
|
||||
o_lower_cholesky : LOWER_CHOLESKY { driver.option_num("ms.lower_cholesky","1"); };
|
||||
o_coefficients_prior_hyperparameters : COEFFICIENTS_PRIOR_HYPERPARAMETERS EQUAL vec_value
|
||||
{ driver.option_num("coefficients_prior_hyperparameters",$3); };
|
||||
o_convergence_starting_value : CONVERGENCE_STARTING_VALUE EQUAL non_negative_number
|
||||
{ driver.option_num("ms.convergence_starting_value",$3); };
|
||||
o_convergence_ending_value : CONVERGENCE_ENDING_VALUE EQUAL non_negative_number
|
||||
{ driver.option_num("ms.convergence_ending_value",$3); };
|
||||
o_convergence_increment_value : CONVERGENCE_INCREMENT_VALUE EQUAL non_negative_number
|
||||
{ driver.option_num("ms.convergence_increment_value",$3); };
|
||||
o_max_iterations_starting_value : MAX_ITERATIONS_STARTING_VALUE EQUAL INT_NUMBER
|
||||
{ driver.option_num("ms.max_iterations_starting_value",$3); };
|
||||
o_max_iterations_increment_value : MAX_ITERATIONS_INCREMENT_VALUE EQUAL non_negative_number
|
||||
{ driver.option_num("ms.max_iterations_increment_value",$3); };
|
||||
o_max_block_iterations : MAX_BLOCK_ITERATIONS EQUAL INT_NUMBER
|
||||
{ driver.option_num("ms.max_block_iterations",$3); };
|
||||
o_max_repeated_optimization_runs : MAX_REPEATED_OPTIMIZATION_RUNS EQUAL INT_NUMBER
|
||||
{ driver.option_num("ms.max_repeated_optimization_runs",$3); };
|
||||
o_function_convergence_criterion : FUNCTION_CONVERGENCE_CRITERION EQUAL non_negative_number
|
||||
{ driver.option_num("ms.function_convergence_criterion",$3); };
|
||||
o_parameter_convergence_criterion : PARAMETER_CONVERGENCE_CRITERION EQUAL non_negative_number
|
||||
{ driver.option_num("ms.parameter_convergence_criterion",$3); };
|
||||
o_number_of_large_perturbations : NUMBER_OF_LARGE_PERTURBATIONS EQUAL INT_NUMBER
|
||||
{ driver.option_num("ms.number_of_large_perturbations",$3); };
|
||||
o_number_of_small_perturbations : NUMBER_OF_SMALL_PERTURBATIONS EQUAL INT_NUMBER
|
||||
{ driver.option_num("ms.number_of_small_perturbations",$3); };
|
||||
o_number_of_posterior_draws_after_perturbation : NUMBER_OF_POSTERIOR_DRAWS_AFTER_PERTURBATION EQUAL INT_NUMBER
|
||||
{ driver.option_num("ms.number_of_posterior_draws_after_perturbation",$3); };
|
||||
o_max_number_of_stages : MAX_NUMBER_OF_STAGES EQUAL INT_NUMBER
|
||||
{ driver.option_num("ms.max_number_of_stages",$3); };
|
||||
o_random_function_convergence_criterion : RANDOM_FUNCTION_CONVERGENCE_CRITERION EQUAL non_negative_number
|
||||
{ driver.option_num("ms.random_function_convergence_criterion",$3); };
|
||||
o_random_parameter_convergence_criterion : RANDOM_PARAMETER_CONVERGENCE_CRITERION EQUAL non_negative_number
|
||||
{ driver.option_num("ms.random_parameter_convergence_criterion",$3); };
|
||||
o_thinning_factor : THINNING_FACTOR EQUAL INT_NUMBER { driver.option_num("ms.thinning_factor",$3); };
|
||||
o_adaptive_mh_draws : ADAPTIVE_MH_DRAWS EQUAL INT_NUMBER { driver.option_num("ms.adaptive_mh_draws",$3); };
|
||||
o_mdd_proposal_draws : MDD_PROPOSAL_DRAWS EQUAL INT_NUMBER { driver.option_num("ms.mdd_proposal_draws",$3); };
|
||||
o_mdd_use_mean_center : MDD_USE_MEAN_CENTER { driver.option_num("ms.mdd_use_mean_center","1"); };
|
||||
o_proposal_type : PROPOSAL_TYPE EQUAL vec_value { driver.option_num("ms.proposal_type",$3); };
|
||||
o_filtered_probabilities : FILTERED_PROBABILITIES { driver.option_num("ms.filtered_probabilities","1"); };
|
||||
o_real_time_smoothed : REAL_TIME_SMOOTHED { driver.option_num("ms.real_time_smoothed_probabilities","1"); };
|
||||
|
||||
o_error_bands : ERROR_BANDS { driver.option_num("ms.error_bands","1"); };
|
||||
o_error_band_percentiles : ERROR_BAND_PERCENTILES EQUAL vec_value { driver.option_num("ms.percentiles",$3); };
|
||||
o_parameter_uncertainty : PARAMETER_UNCERTAINTY { driver.option_num("ms.error_bands","1"); };
|
||||
o_shock_draws : SHOCK_DRAWS EQUAL INT_NUMBER { driver.option_num("ms.shock_draws",$3); };
|
||||
o_regimes : REGIMES { driver.option_num("ms.regimes","1"); };
|
||||
o_free_parameters : FREE_PARAMETERS EQUAL vec_value { driver.option_num("ms.free_parameters",$3); };
|
||||
o_median : MEDIAN { driver.option_num("ms.median","1"); };
|
||||
o_data_obs_nbr : DATA_OBS_NBR { driver.option_num("ms.forecast_data_obs","1"); };
|
||||
|
||||
range : symbol ':' symbol
|
||||
{
|
||||
|
|
|
@ -140,7 +140,13 @@ string eofbuff;
|
|||
<INITIAL>forecast {BEGIN DYNARE_STATEMENT; return token::FORECAST;}
|
||||
<INITIAL>shock_decomposition {BEGIN DYNARE_STATEMENT; return token::SHOCK_DECOMPOSITION;}
|
||||
<INITIAL>sbvar {BEGIN DYNARE_STATEMENT; return token::SBVAR;}
|
||||
<INITIAL>ms_sbvar {BEGIN DYNARE_STATEMENT; return token::MS_SBVAR;}
|
||||
<INITIAL>ms_estimation {BEGIN DYNARE_STATEMENT; return token::MS_ESTIMATION;}
|
||||
<INITIAL>ms_simulation {BEGIN DYNARE_STATEMENT; return token::MS_SIMULATION;}
|
||||
<INITIAL>ms_compute_mdd {BEGIN DYNARE_STATEMENT; return token::MS_COMPUTE_MDD;}
|
||||
<INITIAL>ms_compute_probabilities {BEGIN DYNARE_STATEMENT; return token::MS_COMPUTE_PROBABILITIES;}
|
||||
<INITIAL>ms_forecast {BEGIN DYNARE_STATEMENT; return token::MS_FORECAST;}
|
||||
<INITIAL>ms_irf {BEGIN DYNARE_STATEMENT; return token::MS_IRF;}
|
||||
<INITIAL>ms_variance_decomposition {BEGIN DYNARE_STATEMENT; return token::MS_VARIANCE_DECOMPOSITION;}
|
||||
<INITIAL>conditional_forecast {BEGIN DYNARE_STATEMENT; return token::CONDITIONAL_FORECAST;}
|
||||
<INITIAL>plot_conditional_forecast {BEGIN DYNARE_STATEMENT; return token::PLOT_CONDITIONAL_FORECAST;}
|
||||
|
||||
|
@ -312,22 +318,41 @@ string eofbuff;
|
|||
return token::CNUM;
|
||||
}
|
||||
<DYNARE_STATEMENT>banact {return token::BANACT;}
|
||||
|
||||
<DYNARE_STATEMENT>output_file_tag {return token::OUTPUT_FILE_TAG;}
|
||||
<DYNARE_STATEMENT>create_initialization_file {return token::CREATE_INITIALIZATION_FILE;}
|
||||
<DYNARE_STATEMENT>estimate_msmodel {return token::ESTIMATE_MSMODEL;}
|
||||
<DYNARE_STATEMENT>compute_mdd {return token::COMPUTE_MDD;}
|
||||
<DYNARE_STATEMENT>compute_probabilities {return token::COMPUTE_PROBABILITIES;}
|
||||
<DYNARE_STATEMENT>print_draws {return token::PRINT_DRAWS;}
|
||||
<DYNARE_STATEMENT>n_draws {return token::N_DRAWS;}
|
||||
<DYNARE_STATEMENT>filtered {return token::FILTERED;}
|
||||
<DYNARE_STATEMENT>error_bands {return token::ERROR_BANDS;}
|
||||
<DYNARE_STATEMENT>error_band_percentiles {return token::ERROR_BAND_PERCENTILES;}
|
||||
<DYNARE_STATEMENT>parameter_uncertainty {return token::PARAMETER_UNCERTAINTY;}
|
||||
<DYNARE_STATEMENT>shock_draws {return token::SHOCK_DRAWS;}
|
||||
<DYNARE_STATEMENT>thinning_factor {return token::THINNING_FACTOR;}
|
||||
<DYNARE_STATEMENT>markov_file {return token::MARKOV_FILE;}
|
||||
<DYNARE_STATEMENT>mhm_file {return token::MHM_FILE;}
|
||||
<DYNARE_STATEMENT>proposal_draws {return token::PROPOSAL_DRAWS;}
|
||||
<DYNARE_STATEMENT>draws_nbr_burn_in_1 {return token::DRAWS_NBR_BURN_IN_1;}
|
||||
<DYNARE_STATEMENT>draws_nbr_burn_in_2 {return token::DRAWS_NBR_BURN_IN_2;}
|
||||
<DYNARE_STATEMENT>draws_nbr_mean_var_estimate {return token::DRAWS_NBR_MEAN_VAR_ESTIMATE;}
|
||||
<DYNARE_STATEMENT>draws_nbr_modified_harmonic_mean {return token::DRAWS_NBR_MODIFIED_HARMONIC_MEAN;}
|
||||
<DYNARE_STATEMENT>dirichlet_scale {return token::DIRICHLET_SCALE;}
|
||||
<DYNARE_STATEMENT>regimes {return token::REGIMES;}
|
||||
<DYNARE_STATEMENT>free_parameters {return token::FREE_PARAMETERS;}
|
||||
<DYNARE_STATEMENT>median {return token::MEDIAN;}
|
||||
<DYNARE_STATEMENT>data_obs_nbr {return token::DATA_OBS_NBR;}
|
||||
<DYNARE_STATEMENT>filtered_probabilities {return token::FILTERED_PROBABILITIES;}
|
||||
<DYNARE_STATEMENT>real_time_smoothed {return token::REAL_TIME_SMOOTHED;}
|
||||
<DYNARE_STATEMENT>proposal_type {return token::PROPOSAL_TYPE;}
|
||||
<DYNARE_STATEMENT>mdd_proposal_draws {return token::MDD_PROPOSAL_DRAWS;}
|
||||
<DYNARE_STATEMENT>mdd_use_mean_center {return token::MDD_USE_MEAN_CENTER;}
|
||||
<DYNARE_STATEMENT>adaptive_mh_draws {return token::ADAPTIVE_MH_DRAWS;}
|
||||
<DYNARE_STATEMENT>coefficients_prior_hyperparameters {return token::COEFFICIENTS_PRIOR_HYPERPARAMETERS;}
|
||||
<DYNARE_STATEMENT>convergence_starting_value {return token::CONVERGENCE_STARTING_VALUE;}
|
||||
<DYNARE_STATEMENT>convergence_ending_value {return token::CONVERGENCE_ENDING_VALUE;}
|
||||
<DYNARE_STATEMENT>convergence_increment_value {return token::CONVERGENCE_INCREMENT_VALUE;}
|
||||
<DYNARE_STATEMENT>max_iterations_starting_value {return token::MAX_ITERATIONS_STARTING_VALUE;}
|
||||
<DYNARE_STATEMENT>max_iterations_increment_value {return token::MAX_ITERATIONS_INCREMENT_VALUE;}
|
||||
<DYNARE_STATEMENT>max_block_iterations {return token::MAX_BLOCK_ITERATIONS;}
|
||||
<DYNARE_STATEMENT>max_repeated_optimization_runs {return token::MAX_REPEATED_OPTIMIZATION_RUNS;}
|
||||
<DYNARE_STATEMENT>function_convergence_criterion {return token::FUNCTION_CONVERGENCE_CRITERION;}
|
||||
<DYNARE_STATEMENT>parameter_convergence_criterion {return token::PARAMETER_CONVERGENCE_CRITERION;}
|
||||
<DYNARE_STATEMENT>number_of_large_perturbations {return token::NUMBER_OF_LARGE_PERTURBATIONS;}
|
||||
<DYNARE_STATEMENT>number_of_small_perturbations {return token::NUMBER_OF_SMALL_PERTURBATIONS;}
|
||||
<DYNARE_STATEMENT>number_of_posterior_draws_after_perturbation {return token::NUMBER_OF_POSTERIOR_DRAWS_AFTER_PERTURBATION;}
|
||||
<DYNARE_STATEMENT>max_number_of_stages {return token::MAX_NUMBER_OF_STAGES;}
|
||||
<DYNARE_STATEMENT>random_function_convergence_criterion {return token::RANDOM_FUNCTION_CONVERGENCE_CRITERION;}
|
||||
<DYNARE_STATEMENT>random_parameter_convergence_criterion {return token::RANDOM_PARAMETER_CONVERGENCE_CRITERION;}
|
||||
|
||||
<DYNARE_STATEMENT>instruments {return token::INSTRUMENTS;}
|
||||
|
||||
/* These four (var, varexo, varexo_det, parameters) are for change_type */
|
||||
|
@ -419,8 +444,8 @@ string eofbuff;
|
|||
<DYNARE_BLOCK>equation {return token::EQUATION;}
|
||||
<DYNARE_BLOCK>exclusion {return token::EXCLUSION;}
|
||||
<DYNARE_BLOCK>lag {return token::LAG;}
|
||||
<DYNARE_BLOCK>upper_cholesky {return token::UPPER_CHOLESKY;}
|
||||
<DYNARE_BLOCK>lower_cholesky {return token::LOWER_CHOLESKY;}
|
||||
<DYNARE_STATEMENT,DYNARE_BLOCK>upper_cholesky {return token::UPPER_CHOLESKY;}
|
||||
<DYNARE_STATEMENT,DYNARE_BLOCK>lower_cholesky {return token::LOWER_CHOLESKY;}
|
||||
<DYNARE_STATEMENT>chain {return token::CHAIN;}
|
||||
<DYNARE_STATEMENT>state {return token::STATE;}
|
||||
<DYNARE_STATEMENT>number_of_states {return token::NUMBER_OF_STATES;}
|
||||
|
|
|
@ -1312,9 +1312,51 @@ ParsingDriver::sbvar()
|
|||
}
|
||||
|
||||
void
|
||||
ParsingDriver::ms_sbvar()
|
||||
ParsingDriver::ms_estimation()
|
||||
{
|
||||
mod_file->addStatement(new MS_SBVARStatement(options_list));
|
||||
mod_file->addStatement(new MSSBVAREstimationStatement(options_list));
|
||||
options_list.clear();
|
||||
}
|
||||
|
||||
void
|
||||
ParsingDriver::ms_simulation()
|
||||
{
|
||||
mod_file->addStatement(new MSSBVARSimulationStatement(options_list));
|
||||
options_list.clear();
|
||||
}
|
||||
|
||||
void
|
||||
ParsingDriver::ms_compute_mdd()
|
||||
{
|
||||
mod_file->addStatement(new MSSBVARComputeMDDStatement(options_list));
|
||||
options_list.clear();
|
||||
}
|
||||
|
||||
void
|
||||
ParsingDriver::ms_compute_probabilities()
|
||||
{
|
||||
mod_file->addStatement(new MSSBVARComputeProbabilitiesStatement(options_list));
|
||||
options_list.clear();
|
||||
}
|
||||
|
||||
void
|
||||
ParsingDriver::ms_irf()
|
||||
{
|
||||
mod_file->addStatement(new MSSBVARIrfStatement(options_list));
|
||||
options_list.clear();
|
||||
}
|
||||
|
||||
void
|
||||
ParsingDriver::ms_forecast()
|
||||
{
|
||||
mod_file->addStatement(new MSSBVARForecastStatement(options_list));
|
||||
options_list.clear();
|
||||
}
|
||||
|
||||
void
|
||||
ParsingDriver::ms_variance_decomposition()
|
||||
{
|
||||
mod_file->addStatement(new MSSBVARVarianceDecompositionStatement(options_list));
|
||||
options_list.clear();
|
||||
}
|
||||
|
||||
|
|
|
@ -392,8 +392,20 @@ public:
|
|||
void bvar_forecast(string *nlags);
|
||||
//! SBVAR statement
|
||||
void sbvar();
|
||||
//! MS_SBVAR statement
|
||||
void ms_sbvar();
|
||||
//! Markov Switching Statement: Estimation
|
||||
void ms_estimation();
|
||||
//! Markov Switching Statement: Simulation
|
||||
void ms_simulation();
|
||||
//! Markov Switching Statement: MDD
|
||||
void ms_compute_mdd();
|
||||
//! Markov Switching Statement: Probabilities
|
||||
void ms_compute_probabilities();
|
||||
//! Markov Switching Statement: IRF
|
||||
void ms_irf();
|
||||
//! Markov Switching Statement: Forecast
|
||||
void ms_forecast();
|
||||
//! Markov Switching Statement: Variance Decomposition
|
||||
void ms_variance_decomposition();
|
||||
//! Svar statement
|
||||
void svar();
|
||||
//! MarkovSwitching statement
|
||||
|
|
Loading…
Reference in New Issue