Skip to content

Commit 25344f6

Browse files
pcaspersjenkins
authored andcommitted
QPR-12492 -- Add EndOfMonthConvention to docs and expose the parameter in dates-based Schedule
1 parent 5381865 commit 25344f6

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

Docs/UserGuide/tradecomponents/scheduledata.tex

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ \subsubsection{Schedule Data (Rules, Dates and Derived)}\label{ss:schedule_data}
3838
<Convention>Following</Convention>
3939
<Tenor>3M</Tenor>
4040
<EndOfMonth>false</EndOfMonth>
41+
<EndOfMOnthConvention>Following</EndOfMOnthConvention>
4142
<Dates>
4243
<Date>2012-01-06</Date>
4344
<Date>2012-04-10</Date>
@@ -129,6 +130,14 @@ \subsubsection{Schedule Data (Rules, Dates and Derived)}\label{ss:schedule_data}
129130

130131
Allowable values: Boolean node, allowing \emph{Y, N, 1, 0, true, false} etc. The full set of allowable values is given in Table \ref{tab:boolean_allowable}. Defaults to \emph{false} if left blank or omitted. Must be set to \emph{false} or omitted if the date generation Rule is set to \emph{CDS} or \emph{CDS2015}.
131132

133+
\item \lstinline!EndOfMonthConvention! [Optional]: Determines the adjustment of the end-of-month schedule dates with regards to the selected calendar.
134+
This field is only used when \lstinline!EndOfMonth! is true. If left blank or omitted, then the default \lstinline!Preceding! convention is applied
135+
(i.e.\ end-of-month dates will never be adjusted over to the beginning of the next month)
136+
137+
Allowable values: See Table \ref{tab:convention} Roll Convention.
138+
139+
Allowable values: Boolean node, allowing \emph{Y, N, 1, 0, true, false} etc. The full set of allowable values is given in Table \ref{tab:boolean_allowable}. Defaults to \emph{false} if left blank or omitted. Must be set to \emph{false} or omitted if the date generation Rule is set to \emph{CDS} or \emph{CDS2015}.
140+
132141
\item \lstinline!FirstDate! [Optional]: Date for initial stub period. For date generation rules \emph{CDS} and \emph{CDS2015}, if given, this
133142
overwrites the first date of the schedule that is otherwise built from IMM dates.
134143

@@ -178,6 +187,10 @@ \subsubsection{Schedule Data (Rules, Dates and Derived)}\label{ss:schedule_data}
178187

179188
Allowable values: Boolean node, allowing \emph{Y, N, 1, 0, true, false} etc. The full set of allowable values is given in Table \ref{tab:boolean_allowable}. Defaults to \emph{false} if left blank or omitted.
180189

190+
\item \lstinline!EndOfMonthConvention! [Optional]: Whenever the \lstinline!EndOfMonth! logic is applied, this is used as the roll convention along with the \lstinline!Calendar!for any date adjustments.
191+
192+
Allowable values: See Table \ref{tab:convention} Roll Convention. Defaults to \emph{Preceding} if omitted.
193+
181194
\item \lstinline!Dates!: This is a sub-sub-node and contains child elements of type
182195
\lstinline!Date!. In this case the schedule dates are determined
183196
directly by the \lstinline!Date! child elements. At least two

OREData/ored/portfolio/schedule.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ void ScheduleDates::fromXML(XMLNode* node) {
128128
tenor_ = XMLUtils::getChildValue(node, "Tenor") == "1T" ? "0D" : XMLUtils::getChildValue(node, "Tenor");
129129
was1T_ = XMLUtils::getChildValue(node, "Tenor") == "1T" ? true : false;
130130
endOfMonth_ = XMLUtils::getChildValue(node, "EndOfMonth");
131+
endOfMonthConvention_ = XMLUtils::getChildValue(node, "EndOfMonthConvention");
131132
dates_ = XMLUtils::getChildrenValues(node, "Dates", "Date");
132133
}
133134

@@ -139,6 +140,8 @@ XMLNode* ScheduleDates::toXML(XMLDocument& doc) const {
139140
XMLUtils::addChild(doc, node, "Tenor", was1T_ ? "1T" : tenor_);
140141
if (!endOfMonth_.empty())
141142
XMLUtils::addChild(doc, node, "EndOfMonth", endOfMonth_);
143+
if (!endOfMonthConvention_.empty())
144+
XMLUtils::addChild(doc, node, "EndOfMonthConvention", endOfMonthConvention_);
142145
XMLUtils::addChildren(doc, node, "Dates", "Date", dates_);
143146
return node;
144147
}

0 commit comments

Comments
 (0)