@@ -103,6 +103,7 @@ void ParametricVarAnalyticImpl::setVarReport(const QuantLib::ext::shared_ptr<ore
103103 varParams, inputs_->getVarSalvagingAlgorithm (), QuantLib::ext::nullopt , std::move (sensiArgs),
104104 inputs_->varBreakDown (), inputs_->useAtParCouponsCurves (), inputs_->useAtParCouponsTrades ());
105105 } else {
106+ QL_REQUIRE (inputs_->benchmarkVarPeriod ()!=std::string (), " BenchmarkVarPeriod Required." );
106107 TimePeriod benchmarkVarPeriod (parseListOfValues<Date>(inputs_->benchmarkVarPeriod (), &parseDate),
107108 inputs_->mporDays (), inputs_->mporCalendar ());
108109
@@ -112,6 +113,8 @@ void ParametricVarAnalyticImpl::setVarReport(const QuantLib::ext::shared_ptr<ore
112113
113114 auto defaultReturnConfig = QuantLib::ext::make_shared<ReturnConfiguration>();
114115
116+ QL_REQUIRE (inputs_->scenarioReader (), " ScenarioReader Required." );
117+
115118 auto scenarios = buildHistoricalScenarioGenerator (
116119 inputs_->scenarioReader (), adjFactors, benchmarkVarPeriod, inputs_->mporCalendar (), inputs_->mporDays (),
117120 analytic ()->configurations ().simMarketParams , analytic ()->configurations ().todaysMarketParams ,
@@ -159,6 +162,7 @@ void HistoricalSimulationVarAnalyticImpl::setVarReport(
159162 const QuantLib::ext::shared_ptr<ore::data::InMemoryLoader>& loader) {
160163
161164 LOG (" Build VaR calculator" );
165+ QL_REQUIRE (inputs_->benchmarkVarPeriod ()!=std::string (), " BenchmarkVarPeriod Required." );
162166 TimePeriod benchmarkVarPeriod (parseListOfValues<Date>(inputs_->benchmarkVarPeriod (), &parseDate), inputs_->mporDays (), inputs_->mporCalendar ());
163167
164168 QuantLib::ext::shared_ptr<ore::data::AdjustmentFactors> adjFactors;
@@ -167,6 +171,8 @@ void HistoricalSimulationVarAnalyticImpl::setVarReport(
167171
168172 auto defaultReturnConfig = QuantLib::ext::make_shared<ReturnConfiguration>();
169173
174+ QL_REQUIRE (inputs_->scenarioReader (), " ScenarioReader Required." );
175+
170176 auto scenarios = buildHistoricalScenarioGenerator (
171177 inputs_->scenarioReader (), adjFactors, benchmarkVarPeriod, inputs_->mporCalendar (), inputs_->mporDays (),
172178 analytic ()->configurations ().simMarketParams , analytic ()->configurations ().todaysMarketParams ,
0 commit comments