From dbb19b8e20e9c0f6821b918cc3710f0a3ea0c182 Mon Sep 17 00:00:00 2001
From: Johannes Pfeifer <jpfeifer@gmx,de>
Date: Mon, 10 Feb 2014 18:21:56 +0100
Subject: [PATCH] Adds explicit message if optimal policy was used with steady

---
 matlab/test_for_deep_parameters_calibration.m | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/matlab/test_for_deep_parameters_calibration.m b/matlab/test_for_deep_parameters_calibration.m
index 3fb0716762..0f5ab7aecf 100644
--- a/matlab/test_for_deep_parameters_calibration.m
+++ b/matlab/test_for_deep_parameters_calibration.m
@@ -44,4 +44,7 @@ if ~isempty(plist)
     message = [message, 'If these parameters are not initialized in a steadystate file, Dynare may not be able to solve the model...'];
     message_id  = 'Dynare:ParameterCalibration:NaNValues';
     warning(message_id,message);
+    if strmatch('optimal_policy_discount_factor',plist,'exact')
+        warning('Either you have not correctly initialized planner_discount or you are calling a command like steady or stoch_simul that is not allowed in the context of ramsey_policy')
+    end
 end
\ No newline at end of file
-- 
GitLab