diff --git a/ComputingTasks.cc b/ComputingTasks.cc
index b755a3adea08507a91a21b25a9987b203b01fe00..c357d32fca469a44406c205f2ef00d8c0d7a949b 100644
--- a/ComputingTasks.cc
+++ b/ComputingTasks.cc
@@ -848,7 +848,7 @@ PlannerObjectiveStatement::checkPass(ModFileStructure &mod_file_struct)
 {
   if (model_tree->equation_number() != 1)
     {
-      cerr << "Error: planer_objective: should have only one equation!" << endl;
+      cerr << "ERROR: planer_objective: should have only one equation!" << endl;
       exit(-1);
     }
 }
@@ -872,6 +872,12 @@ BVARDensityStatement::BVARDensityStatement(int maxnlags_arg, const OptionsList &
 {
 }
 
+void
+BVARDensityStatement::checkPass(ModFileStructure &mod_file_struct)
+{
+  mod_file_struct.bvar_density_present = true;
+}
+
 void
 BVARDensityStatement::writeOutput(ostream &output, const string &basename) const
 {
@@ -885,6 +891,12 @@ BVARForecastStatement::BVARForecastStatement(int nlags_arg, const OptionsList &o
 {
 }
 
+void
+BVARForecastStatement::checkPass(ModFileStructure &mod_file_struct)
+{
+  mod_file_struct.bvar_forecast_present = true;
+}
+
 void
 BVARForecastStatement::writeOutput(ostream &output, const string &basename) const
 {
diff --git a/ModFile.cc b/ModFile.cc
index 38e10562dcbd66266294aa4a07614a8ba7d7f2e2..6b832720c1c1cc7e0d765ac144865fcbe4acd855 100644
--- a/ModFile.cc
+++ b/ModFile.cc
@@ -75,8 +75,15 @@ ModFile::checkPass()
       exit(-1);
     }
 
-  // Enforce the same number of equations and endogenous if ramsey_policy not present
-  if (!mod_file_struct.ramsey_policy_present && (model_tree.equation_number() != symbol_table.endo_nbr))
+  /*
+    Enforce the same number of equations and endogenous, except in two cases:
+    - ramsey_policy is used
+    - a BVAR command is used and there is no equation (standalone BVAR estimation)
+  */
+  if (!mod_file_struct.ramsey_policy_present
+      && !((mod_file_struct.bvar_density_present || mod_file_struct.bvar_forecast_present)
+           && model_tree.equation_number() == 0)
+      && (model_tree.equation_number() != symbol_table.endo_nbr))
     {
       cerr << "ERROR: There are " << model_tree.equation_number() << " equations but " << symbol_table.endo_nbr << " endogenous variables!" << endl;
       exit(-1);
diff --git a/Statement.cc b/Statement.cc
index eff107c2b7681ecb8d81db1a1cf9202830c57bcd..17adf591bc6bffe53e5cd4dc1c2898ffb873add5 100644
--- a/Statement.cc
+++ b/Statement.cc
@@ -27,7 +27,9 @@ ModFileStructure::ModFileStructure() :
   forecast_present(false),
   osr_present(false),
   ramsey_policy_present(false),
-  order_option(0)
+  order_option(0),
+  bvar_density_present(false),
+  bvar_forecast_present(false)
 {
 }
 
diff --git a/include/ComputingTasks.hh b/include/ComputingTasks.hh
index eaa5703b4b7fe62d955be5ab82b6799d7a424837..08d24a1de0ab85d2b3f0c283b9b7508efa6a4937 100644
--- a/include/ComputingTasks.hh
+++ b/include/ComputingTasks.hh
@@ -445,6 +445,7 @@ private:
   const OptionsList options_list;
 public:
   BVARDensityStatement(int maxnlags_arg, const OptionsList &options_list_arg);
+  virtual void checkPass(ModFileStructure &mod_file_struct);
   virtual void writeOutput(ostream &output, const string &basename) const;
 };
 
@@ -455,8 +456,8 @@ private:
   const OptionsList options_list;
 public:
   BVARForecastStatement(int nlags_arg, const OptionsList &options_list_arg);
+  virtual void checkPass(ModFileStructure &mod_file_struct);
   virtual void writeOutput(ostream &output, const string &basename) const;
 };
 
-
 #endif
diff --git a/include/Statement.hh b/include/Statement.hh
index 9a6f990a751d3efdf93d9fc60008c6e0a6729b26..d86129f7a3e41a19fe0d270d20771a1d150f0b7f 100644
--- a/include/Statement.hh
+++ b/include/Statement.hh
@@ -50,6 +50,10 @@ public:
   //! Derivation order
   /*! First initialized to zero. If user sets order option somewhere in the MOD file, it will be equal to the maximum of order options. Otherwise will default to 2 */
   int order_option;
+  //! Whether a bvar_density statement is present
+  bool bvar_density_present;
+  //! Whether a bvar_forecast statement is present
+  bool bvar_forecast_present;
 };
 
 class Statement