diff --git a/matlab/global_initialization.m b/matlab/global_initialization.m
index 65acab6edce581b513f1050f85721ee7b8b151bc..9fe808c7e8d7447dd55cf52043b754a8afda60aa 100644
--- a/matlab/global_initialization.m
+++ b/matlab/global_initialization.m
@@ -495,6 +495,7 @@ M_.exo_histval = [];
 M_.exo_det_histval = [];
 M_.Correlation_matrix = [];
 M_.Correlation_matrix_ME = [];
+M_.parameter_used_with_lead_lag = false;
 
 % homotopy for steady state
 options_.homotopy_mode = 0;
diff --git a/preprocessor/DataTree.cc b/preprocessor/DataTree.cc
index 3f90a44f87b3180c25abf406b55f59ccf278db17..7c718c5ec655092a70c89c2e8bf7fbf233429ad4 100644
--- a/preprocessor/DataTree.cc
+++ b/preprocessor/DataTree.cc
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2003-2014 Dynare Team
+ * Copyright (C) 2003-2015 Dynare Team
  *
  * This file is part of Dynare.
  *
@@ -72,6 +72,16 @@ DataTree::AddVariableInternal(int symb_id, int lag)
     return new VariableNode(*this, symb_id, lag);
 }
 
+bool
+DataTree::ParamUsedWithLeadLagInternal() const
+{
+  for (variable_node_map_t::const_iterator it = variable_node_map.begin();
+       it != variable_node_map.end(); it++)
+    if (symbol_table.getType(it->first.first) == eParameter && it->first.second != 0)
+      return true;
+  return false;
+}
+
 VariableNode *
 DataTree::AddVariable(int symb_id, int lag)
 {
diff --git a/preprocessor/DataTree.hh b/preprocessor/DataTree.hh
index d7c53645d5d74cc88833d042c45c3c8e98f917a6..4c740113f086b8a63518655c6c802b75710bcd29 100644
--- a/preprocessor/DataTree.hh
+++ b/preprocessor/DataTree.hh
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2003-2014 Dynare Team
+ * Copyright (C) 2003-2015 Dynare Team
  *
  * This file is part of Dynare.
  *
@@ -88,6 +88,8 @@ protected:
   //! Internal implementation of AddVariable(), without the check on the lag
   VariableNode *AddVariableInternal(int symb_id, int lag);
 
+  //! Internal implementation of ParamUsedWithLeadLag()
+  bool ParamUsedWithLeadLagInternal() const;
 private:
   typedef list<expr_t> node_list_t;
   //! The list of nodes
diff --git a/preprocessor/DynamicModel.cc b/preprocessor/DynamicModel.cc
index 70b16176597594a5265bff865c0bce6bc2f0172c..6c506c400a8b495fcc287422546e884c35cbcf91 100644
--- a/preprocessor/DynamicModel.cc
+++ b/preprocessor/DynamicModel.cc
@@ -3499,6 +3499,12 @@ DynamicModel::toStatic(StaticModel &static_model) const
     static_model.addAuxEquation((*it)->toStatic(static_model));
 }
 
+bool
+DynamicModel::ParamUsedWithLeadLag() const
+{
+  return ParamUsedWithLeadLagInternal();
+}
+
 set<int>
 DynamicModel::findUnusedEndogenous()
 {
diff --git a/preprocessor/DynamicModel.hh b/preprocessor/DynamicModel.hh
index 0bf34f479310bf3a26755a3bf2245389fc4a3e80..6f1eefd7e900a53d1f732164248a086ba8a8d79e 100644
--- a/preprocessor/DynamicModel.hh
+++ b/preprocessor/DynamicModel.hh
@@ -469,6 +469,9 @@ public:
   };
   bool isModelLocalVariableUsed() const;
 
+  //! Returns true if a parameter was used in the model block with a lead or lag
+  bool ParamUsedWithLeadLag() const;
+
   //! Writes model initialization and lead/lag incidence matrix to C output
   void writeCOutput(ostream &output, const string &basename, bool block, bool byte_code, bool use_dll, int order, bool estimation_present) const;
   //! Writes model initialization and lead/lag incidence matrix to Cpp output
diff --git a/preprocessor/ModFile.cc b/preprocessor/ModFile.cc
index a4693cfc7160011bdf48bf88830e57d5892f7a57..1b7f286b028e60ff8700429f095fa652897b7dfb 100644
--- a/preprocessor/ModFile.cc
+++ b/preprocessor/ModFile.cc
@@ -41,7 +41,7 @@ ModFile::ModFile(WarningConsolidation &warnings_arg)
     linear(false), block(false), byte_code(false), use_dll(false), no_static(false), 
     differentiate_forward_vars(false),
     nonstationary_variables(false), orig_eqn_nbr(0), ramsey_eqn_nbr(0),
-    warnings(warnings_arg)
+    param_used_with_lead_lag(false), warnings(warnings_arg)
 {
 }
 
@@ -120,6 +120,10 @@ ModFile::checkPass()
   if (!mod_file_struct.order_option)
     mod_file_struct.order_option = 2;
 
+  param_used_with_lead_lag = dynamic_model.ParamUsedWithLeadLag();
+  if (param_used_with_lead_lag)
+    warnings << "WARNING: A parameter was used with a lead or a lag in the model block" << endl;
+
   bool stochastic_statement_present = mod_file_struct.stoch_simul_present
     || mod_file_struct.estimation_present
     || mod_file_struct.osr_present
@@ -599,7 +603,10 @@ ModFile::writeOutputFiles(const string &basename, bool clear_all, bool clear_glo
 
   if (nointeractive)
     mOutputFile << "options_.nointeractive = 1;" << endl;
-    
+
+  if (param_used_with_lead_lag)
+    mOutputFile << "M_.parameter_used_with_lead_lag = true;" << endl;
+
   cout << "Processing outputs ..." << endl;
 
   symbol_table.writeOutput(mOutputFile);
diff --git a/preprocessor/ModFile.hh b/preprocessor/ModFile.hh
index 11e3e4246166102f6c28ff5ac9eed950117ec93c..23ea3371e530a1fa61491a5241e23b71e4c79176 100644
--- a/preprocessor/ModFile.hh
+++ b/preprocessor/ModFile.hh
@@ -107,6 +107,9 @@ public:
   //! Stores the number of equations added to the Ramsey model
   int ramsey_eqn_nbr;
 
+  //! Parameter used with lead/lag
+  bool param_used_with_lead_lag;
+
   //! Stores the list of extra files to be transefered during a parallel run
   /*! (i.e. option parallel_local_files of model block) */
   vector<string> parallel_local_files;