1
1
/*
2
2
Copyright (C) 2016 Quaternion Risk Management Ltd
3
+ Copyright (C) 2024 Oleg Kulkov
3
4
All rights reserved.
4
5
5
6
This file is part of ORE, a free-software/open-source library
@@ -285,11 +286,12 @@ QuantLib::ext::shared_ptr<IborIndex> FraConvention::index() const { return parse
285
286
OisConvention::OisConvention (const string& id, const string& spotLag, const string& index,
286
287
const string& fixedDayCounter, const string& fixedCalendar, const string& paymentLag,
287
288
const string& eom, const string& fixedFrequency, const string& fixedConvention,
288
- const string& fixedPaymentConvention, const string& rule, const string& paymentCal)
289
+ const string& fixedPaymentConvention, const string& rule, const string& paymentCal,
290
+ const string& rateCutoff)
289
291
: Convention(id, Type::OIS), strSpotLag_(spotLag), strIndex_(index), strFixedDayCounter_(fixedDayCounter),
290
292
strFixedCalendar_(fixedCalendar), strPaymentLag_(paymentLag), strEom_(eom), strFixedFrequency_(fixedFrequency),
291
293
strFixedConvention_(fixedConvention), strFixedPaymentConvention_(fixedPaymentConvention), strRule_(rule),
292
- strPaymentCal_(paymentCal) {
294
+ strPaymentCal_(paymentCal), strRateCutoff_(rateCutoff) {
293
295
build ();
294
296
}
295
297
@@ -306,6 +308,8 @@ void OisConvention::build() {
306
308
strFixedPaymentConvention_.empty () ? Following : parseBusinessDayConvention (strFixedPaymentConvention_);
307
309
rule_ = strRule_.empty () ? DateGeneration::Backward : parseDateGenerationRule (strRule_);
308
310
paymentCal_ = strPaymentCal_.empty () ? Calendar () : parseCalendar (strPaymentCal_);
311
+ rateCutoff_ = strRateCutoff_.empty () ? 0 : lexical_cast<Natural>(strRateCutoff_);
312
+
309
313
}
310
314
311
315
void OisConvention::fromXML (XMLNode* node) {
@@ -327,6 +331,7 @@ void OisConvention::fromXML(XMLNode* node) {
327
331
strFixedPaymentConvention_ = XMLUtils::getChildValue (node, " FixedPaymentConvention" , false );
328
332
strRule_ = XMLUtils::getChildValue (node, " Rule" , false );
329
333
strPaymentCal_ = XMLUtils::getChildValue (node, " PaymentCalendar" , false );
334
+ strRateCutoff_ = XMLUtils::getChildValue (node, " RateCutoff" , false );
330
335
331
336
build ();
332
337
}
@@ -354,6 +359,8 @@ XMLNode* OisConvention::toXML(XMLDocument& doc) const {
354
359
XMLUtils::addChild (doc, node, " Rule" , strRule_);
355
360
if (!strPaymentCal_.empty ())
356
361
XMLUtils::addChild (doc, node, " PaymentCalendar" , strPaymentCal_);
362
+ if (!strRateCutoff_.empty ())
363
+ XMLUtils::addChild (doc, node, " RateCutoff" , strRateCutoff_);
357
364
358
365
return node;
359
366
}
0 commit comments