Skip to content

Commit 8a36404

Browse files
mgronckijenkins
authored andcommitted
QPR-9859 bugfix
1 parent dbb17c5 commit 8a36404

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

OREData/ored/utilities/dategrid.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ void DateGrid::addCloseOutDates(const QuantLib::Period& p) {
227227
c = calendar_.adjust(dates_[i] + p);
228228
else
229229
c = calendar_.advance(dates_[i], p, Following, false);
230-
closeOutDates_[c] = dates_[i];
230+
closeOutToValuation_[c] = dates_[i];
231231
tmpDates.insert(dates_[i]);
232232
tmpDates.insert(c);
233233
tmpValueDates.insert(dates_[i]);
@@ -238,7 +238,7 @@ void DateGrid::addCloseOutDates(const QuantLib::Period& p) {
238238
isValuationDate_ = std::vector<bool>(dates_.size(), true);
239239
for(size_t i = 0; i < dates_.size(); ++i){
240240
Date d = dates_[i];
241-
if(closeOutDates_.count(d) == 1){
241+
if(closeOutToValuation_.count(d) == 1){
242242
isCloseOutDate_[i] = true;
243243
}
244244
if(tmpValueDates.count(d) == 0){

OREData/ored/utilities/dategrid.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
*/
2323

2424
#pragma once
25-
25+
#include <map>
2626
#include <ql/time/calendars/target.hpp>
2727
#include <ql/time/daycounters/actualactual.hpp>
2828
#include <ql/timegrid.hpp>
@@ -103,8 +103,8 @@ class DateGrid {
103103

104104
//! Given a close out date it returns the corresponding value date
105105
QuantLib::Date valuationDateFromCloseOutDate(const QuantLib::Date& closeOutDate) const {
106-
auto it = closeOutDates_.find(closeOutDate);
107-
QL_REQUIRE(it != closeOutDates_.end(), "close out date " << closeOutDate << " not found in dategrid");
106+
auto it = closeOutToValuation_.find(closeOutDate);
107+
QL_REQUIRE(it != closeOutToValuation_.end(), "close out date " << closeOutDate << " not found in dategrid");
108108
return it->second;
109109
}
110110
//@}
@@ -121,7 +121,7 @@ class DateGrid {
121121
QuantLib::Calendar calendar_;
122122
QuantLib::DayCounter dayCounter_;
123123
std::vector<QuantLib::Date> dates_;
124-
std::map<QuantLib::Date, QuantLib::Date> closeOutDates_;
124+
std::map<QuantLib::Date, QuantLib::Date> closeOutToValuation_;
125125
std::vector<QuantLib::Period> tenors_;
126126
std::vector<QuantLib::Time> times_;
127127
QuantLib::TimeGrid timeGrid_;

0 commit comments

Comments
 (0)