Update of /cvsroot/quantlibaddin/QuantLibAddin/qlo
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv10954/qlo
Modified Files:
ratehelpers.cpp ratehelpers.hpp
Log Message:
activated exclude/include depo after front futures contract
bug fixed
Renamed range in wkb
Index: ratehelpers.hpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/ratehelpers.hpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** ratehelpers.hpp 20 Dec 2006 09:33:16 -0000 1.10
--- ratehelpers.hpp 12 Jan 2007 09:25:48 -0000 1.11
***************
*** 79,83 ****
const long nFutures,
const long frontFuturesRollingDays,
! bool depoIncludeFlag);
}
--- 79,83 ----
const long nFutures,
const long frontFuturesRollingDays,
! bool depoExcludeFlag);
}
Index: ratehelpers.cpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/ratehelpers.cpp,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** ratehelpers.cpp 5 Jan 2007 15:24:45 -0000 1.18
--- ratehelpers.cpp 12 Jan 2007 09:25:48 -0000 1.19
***************
*** 142,146 ****
const long nFutures,
const long frontFuturesRollingDays,
! bool depoIncludeFlag)
{
// Checks
--- 142,146 ----
const long nFutures,
const long frontFuturesRollingDays,
! bool depoExcludeFlag)
{
// Checks
***************
*** 187,191 ****
// Select input rate helpers according to their includeFlag,
! // their expiration, maximum number of allowed Futures and depoIncludeFlag
long futuresCounter = 0;
QuantLib::Date evalDate = QuantLib::Settings::instance().evaluationDate();
--- 187,191 ----
// Select input rate helpers according to their includeFlag,
! // their expiration, maximum number of allowed Futures and depoExcludeFlag
long futuresCounter = 0;
QuantLib::Date evalDate = QuantLib::Settings::instance().evaluationDate();
***************
*** 195,198 ****
--- 195,199 ----
QuantLib::Date frontFuturesEarliestDate;
bool thereAreFutures = false;
+ i=0;
while (i<nInstruments) {
if (rhsAll[i].isFutures &&
***************
*** 204,209 ****
i++;
}
! // If there are NOT Futures, force Depo include flag at true
! if (!thereAreFutures) depoIncludeFlag = true;
// Start selection
bool depoAfterFrontFuturesAlreadyIncluded = false;
--- 205,210 ----
i++;
}
! // If there are NOT Futures, force Depo exclude flag at false
! if (!thereAreFutures) depoExcludeFlag = false;
// Start selection
bool depoAfterFrontFuturesAlreadyIncluded = false;
***************
*** 211,215 ****
if (rhsAll[i].includeFlag && rhsAll[i].earliestDate >= evalDate) {
if (rhsAll[i].isDepo) { // Check Depo conditions
! if (!depoIncludeFlag) {
rhs.push_back(rhsAll[i]); // Include all depos
} else {
--- 212,216 ----
if (rhsAll[i].includeFlag && rhsAll[i].earliestDate >= evalDate) {
if (rhsAll[i].isDepo) { // Check Depo conditions
! if (!depoExcludeFlag) {
rhs.push_back(rhsAll[i]); // Include all depos
} else {
|