diff --git a/src/ComputingTasks.cc b/src/ComputingTasks.cc
index eb976e00871d22c6ed13fa131870d54eda93de8b..9b6e68b98391a8ad6f0e0933606751cd0446a62b 100644
--- a/src/ComputingTasks.cc
+++ b/src/ComputingTasks.cc
@@ -2112,6 +2112,12 @@ OsrStatement::checkPass(ModFileStructure &mod_file_struct, WarningConsolidation
       opt && *opt == "true")
     mod_file_struct.partial_information = true;
 
+  // Fill in mod_file_struct.estimation_analytic_derivation
+  if (auto opt = options_list.get_if<OptionsList::NumVal>("analytic_derivation");
+      opt && *opt == "1")
+    mod_file_struct.osr_analytic_derivation = true;
+
+
   // Option k_order_solver (implicit when order >= 3)
   if (auto opt = options_list.get_if<OptionsList::NumVal>("k_order_solver");
       (opt && *opt == "true") || mod_file_struct.order_option >= 3)
diff --git a/src/DynareBison.yy b/src/DynareBison.yy
index 06ce4ebd5e5651580c62b7e9e0b33880885a2339..a7d5058311e005632348e5afa110fea79b1ff486 100644
--- a/src/DynareBison.yy
+++ b/src/DynareBison.yy
@@ -2356,6 +2356,8 @@ osr_options : stoch_simul_primary_options
             | o_optim
             | o_huge_number
             | o_silent_optimizer
+            | o_analytic_derivation
+            | o_analytic_derivation_mode
             ;
 
 osr : OSR ';'
diff --git a/src/ModFile.cc b/src/ModFile.cc
index 34ea448622a80777d555d1cda1b397c8172a4130..23f86c7abdcb54531de0ebefa2e8afb6bd70a926 100644
--- a/src/ModFile.cc
+++ b/src/ModFile.cc
@@ -670,6 +670,7 @@ ModFile::computingPass(bool no_tmp_terms, OutputType output, int params_derivs_o
 
           if (mod_file_struct.identification_present 
               || mod_file_struct.estimation_analytic_derivation
+              || mod_file_struct.osr_analytic_derivation
               || (mod_file_struct.GMM_present && (mod_file_struct.analytic_standard_errors_present || mod_file_struct.analytic_jacobian_present)))
             paramsDerivsOrder = params_derivs_order;
 
@@ -722,6 +723,7 @@ ModFile::computingPass(bool no_tmp_terms, OutputType output, int params_derivs_o
               int paramsDerivsOrder = 0;
               if (mod_file_struct.identification_present 
                   || mod_file_struct.estimation_analytic_derivation
+                  || mod_file_struct.osr_analytic_derivation
                   || (mod_file_struct.GMM_present && (mod_file_struct.analytic_standard_errors_present || mod_file_struct.analytic_jacobian_present)))
                 paramsDerivsOrder = params_derivs_order;
               dynamic_model.computingPass(derivsOrder, paramsDerivsOrder, global_eval_context, no_tmp_terms, block, use_dll);
diff --git a/src/Statement.hh b/src/Statement.hh
index cd1585ffc009a56f9e6f021e77683601a90ec659..6a8bdc7f44665cfcb3ca926ff6bc9fc43c75769f 100644
--- a/src/Statement.hh
+++ b/src/Statement.hh
@@ -74,6 +74,8 @@ struct ModFileStructure
   bool sensitivity_present{false};
   //! Whether the option analytic_derivation is given to estimation
   bool estimation_analytic_derivation{false};
+  //! Whether the option analytic_derivation is given to osr
+  bool osr_analytic_derivation{false};
   //! Whether the option partial_information is given to stoch_simul/estimation/osr/ramsey_policy
   bool partial_information{false};
   //! Whether the "k_order_solver" option is used (explictly, or implicitly if order >= 3)