[Rquantlib-commits] r235 - pkg/RQuantLib/src

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Apr 29 17:34:46 CEST 2010


Author: edd
Date: 2010-04-29 17:34:45 +0200 (Thu, 29 Apr 2010)
New Revision: 235

Modified:
   pkg/RQuantLib/src/cbond.cpp
   pkg/RQuantLib/src/hullwhite.cpp
   pkg/RQuantLib/src/zero.cpp
Log:
suppress a few warnings from g++


Modified: pkg/RQuantLib/src/cbond.cpp
===================================================================
--- pkg/RQuantLib/src/cbond.cpp	2010-04-22 02:16:52 UTC (rev 234)
+++ pkg/RQuantLib/src/cbond.cpp	2010-04-29 15:34:45 UTC (rev 235)
@@ -23,10 +23,10 @@
         DayCounter dayCounter = getDayCounter(basis);
         Frequency freq = getFrequency(p);
         Period period(freq);
-        double emr = rparams.getDoubleValue("emr");
+        //double emr = rparams.getDoubleValue("emr");
         double callType = rparams.getDoubleValue("calltype");
         double dividendType = rparams.getDoubleValue("dividendtype");
-        double treeType = rparams.getDoubleValue("treeType");        
+        //double treeType = rparams.getDoubleValue("treeType");        
 
 
         DividendSchedule dividendSchedule;

Modified: pkg/RQuantLib/src/hullwhite.cpp
===================================================================
--- pkg/RQuantLib/src/hullwhite.cpp	2010-04-22 02:16:52 UTC (rev 234)
+++ pkg/RQuantLib/src/hullwhite.cpp	2010-04-29 15:34:45 UTC (rev 235)
@@ -1,4 +1,4 @@
-#include "rquantlib.hpp";
+#include "rquantlib.hpp"
 
 using namespace boost;
 
@@ -29,7 +29,7 @@
         boost::shared_ptr<IborIndex> index = buildIborIndex(iborType,
                                                             indexStrc);
         //process capDataDF
-        std::vector<boost::shared_ptr<CalibrationHelper>> caps;
+        std::vector<boost::shared_ptr <CalibrationHelper> > caps;
         try {
             RcppFrame capDF(capDataDF);
             std::vector<std::vector<ColDatum> > table = capDF.getTableData();
@@ -62,7 +62,7 @@
         LevenbergMarquardt optimizationMethod(1.0e-8,1.0e-8,1.0e-8);
         EndCriteria endCriteria(10000, 100, 1e-6, 1e-8, 1e-8);
         model->calibrate(caps, optimizationMethod, endCriteria);
-        EndCriteria::Type ecType = model->endCriteria();
+        //EndCriteria::Type ecType = model->endCriteria();
         //return the result
         Array xMinCalculated = model->params();
 
@@ -114,7 +114,7 @@
         //process capDataDF
         boost::shared_ptr<PricingEngine> engine(
                                                 new JamshidianSwaptionEngine(model));
-        std::vector<boost::shared_ptr<CalibrationHelper>> swaps;
+        std::vector<boost::shared_ptr <CalibrationHelper> > swaps;
         try {
             RcppFrame swapDF(swapDataDF);
             std::vector<std::vector<ColDatum> > table = swapDF.getTableData();
@@ -155,7 +155,7 @@
         LevenbergMarquardt optimizationMethod(1.0e-8,1.0e-8,1.0e-8);
         EndCriteria endCriteria(10000, 100, 1e-6, 1e-8, 1e-8);
         model->calibrate(swaps, optimizationMethod, endCriteria);
-        EndCriteria::Type ecType = model->endCriteria();
+        //EndCriteria::Type ecType = model->endCriteria();
         //return the result
         Array xMinCalculated = model->params();
 

Modified: pkg/RQuantLib/src/zero.cpp
===================================================================
--- pkg/RQuantLib/src/zero.cpp	2010-04-22 02:16:52 UTC (rev 234)
+++ pkg/RQuantLib/src/zero.cpp	2010-04-29 15:34:45 UTC (rev 235)
@@ -21,7 +21,7 @@
         DayCounter dayCounter = getDayCounter(basis);
         Frequency freq = getFrequency(period);
         Period p(freq);
-        double EMR = rparam.getDoubleValue("EMR");
+        //double EMR = rparam.getDoubleValue("EMR");
 
 
         ZeroCouponBond bond(1, calendar, 
@@ -65,7 +65,7 @@
         DayCounter dayCounter = getDayCounter(basis);
         Frequency freq = getFrequency(period);
         Period p(freq);
-        double EMR = rparam.getDoubleValue("EMR");
+        //double EMR = rparam.getDoubleValue("EMR");
 
 
         ZeroCouponBond bond(1, calendar, 100, maturity, Unadjusted, 100.0, settle);
@@ -96,7 +96,7 @@
 
 
         RcppParams rparam(param);
-        double oc = rparam.getDoubleValue("OC");
+        //double oc = rparam.getDoubleValue("OC");
 
         RcppDateVector rmat(MatVec);
         RcppDateVector rsettle(SettlVec);
@@ -173,12 +173,12 @@
             instruments.push_back(helper);
         }
         
+		/*
         bool constrainAtZero = true;
         Real tolerance = 1.0e-10;
         Size max = 5000;
 
-        /*
-	boost::shared_ptr<YieldTermStructure> curve;
+		boost::shared_ptr<YieldTermStructure> curve;
         NelsonSiegelFitting nelsonSiegel;
         boost::shared_ptr<FittedBondDiscountCurve> ts3 (
                                                         new FittedBondDiscountCurve(1,
@@ -204,8 +204,8 @@
         
         RcppFrame frame(colNames);
         Date current = SettleDates[0];
-        int n1 = curve->maxDate() - SettleDates[0];
-        for (int i = 0; i<numberOfBonds;i++){
+        //int n1 = curve->maxDate() - SettleDates[0];
+        for (unsigned int i = 0; i<numberOfBonds;i++){
             std::vector<ColDatum> row(numCol);
             Date d = MatDates[i];
             row[0].setDateValue(RcppDate(d.month(),



More information about the Rquantlib-commits mailing list