We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 95d4e92 commit 44fcd9fCopy full SHA for 44fcd9f
1 file changed
OREData/ored/portfolio/indexcreditdefaultswapoption.cpp
@@ -135,6 +135,9 @@ void IndexCreditDefaultSwapOption::build(const boost::shared_ptr<EngineFactory>&
135
Date exerciseDate = parseDate(exerciseDates.front());
136
boost::shared_ptr<Exercise> exercise = boost::make_shared<EuropeanExercise>(exerciseDate);
137
138
+ QL_REQUIRE(parseDate(legData.schedule().rules().front().startDate()) > exerciseDate,
139
+ "IndexCreditDefaultSwapOption: ExerciseDate must be before EndDate");
140
+
141
// We apply an automatic correction to a common mistake in the input data, where the full index underlying
142
// is provided and not only the part of the underlying into which we exercise.
143
if (legData.schedule().rules().size() == 1 && legData.schedule().dates().empty()) {
0 commit comments