[Rquantlib-commits] r320 - pkg/RQuantLib/man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat Sep 10 16:36:23 CEST 2011


Author: edd
Date: 2011-09-10 16:36:23 +0200 (Sat, 10 Sep 2011)
New Revision: 320

Modified:
   pkg/RQuantLib/man/Bond.Rd
   pkg/RQuantLib/man/DiscountCurve.Rd
   pkg/RQuantLib/man/FixedRateBond.Rd
   pkg/RQuantLib/man/FloatingRateBond.Rd
Log:
add calls setEvaluationDate() 
also shift one date by one day
comment out spline discount curve as it is unstable


Modified: pkg/RQuantLib/man/Bond.Rd
===================================================================
--- pkg/RQuantLib/man/Bond.Rd	2011-09-10 13:22:26 UTC (rev 319)
+++ pkg/RQuantLib/man/Bond.Rd	2011-09-10 14:36:23 UTC (rev 320)
@@ -42,6 +42,7 @@
                dt=.25,
                interpWhat="discount",
                interpHow="loglinear")
+setEvaluationDate(as.Date("2004-11-22"))
 
 ## We got numerical issues for the spline interpolation if we add
 ## any on of these three extra futures, at least with QuantLib 0.9.7
@@ -86,7 +87,7 @@
 # price a floating rate bond
 bondparams <- list(faceAmount=100, issueDate=as.Date("2004-11-30"),
              maturityDate=as.Date("2008-11-30"), redemption=100, 
-             effectiveDate=as.Date("2004-11-30"))
+             effectiveDate=as.Date("2004-12-01"))
 
 dateparams <- list(settlementDays=1, calendar="us", dayCounter = 1, period=3, 
                    businessDayConvention = 1, terminationDateConvention=1,

Modified: pkg/RQuantLib/man/DiscountCurve.Rd
===================================================================
--- pkg/RQuantLib/man/DiscountCurve.Rd	2011-09-10 13:22:26 UTC (rev 319)
+++ pkg/RQuantLib/man/DiscountCurve.Rd	2011-09-10 14:36:23 UTC (rev 320)
@@ -118,6 +118,7 @@
                dt=.25,
                interpWhat="discount",
                interpHow="loglinear")
+setEvaluationDate(as.Date("2004-11-22"))
 
 ## We get numerical issue for the spline interpolation if we add
 ## any on of these three extra futures -- the original example
@@ -156,7 +157,8 @@
 
 # Spline interpolation of discount factors
 params$interpHow="spline"
-curves <- DiscountCurve(params, tsQuotes, times)
+## NB Commented out for numerical issues under current parameterisation
+#curves <- DiscountCurve(params, tsQuotes, times)
 plot(curves,setpar=FALSE)
 
 par(savepar)

Modified: pkg/RQuantLib/man/FixedRateBond.Rd
===================================================================
--- pkg/RQuantLib/man/FixedRateBond.Rd	2011-09-10 13:22:26 UTC (rev 319)
+++ pkg/RQuantLib/man/FixedRateBond.Rd	2011-09-10 14:36:23 UTC (rev 320)
@@ -166,6 +166,7 @@
                dt=.25,
                interpWhat="discount",
                interpHow="loglinear")
+setEvaluationDate(as.Date("2004-11-22"))
 
 discountCurve.flat <- DiscountCurve(params, list(flat=0.05))
 FixedRateBond(bond, coupon.rate, discountCurve.flat, dateparams)

Modified: pkg/RQuantLib/man/FloatingRateBond.Rd
===================================================================
--- pkg/RQuantLib/man/FloatingRateBond.Rd	2011-09-10 13:22:26 UTC (rev 319)
+++ pkg/RQuantLib/man/FloatingRateBond.Rd	2011-09-10 14:36:23 UTC (rev 320)
@@ -136,6 +136,7 @@
                dt=.25,
                interpWhat="discount",
                interpHow="loglinear")
+setEvaluationDate(as.Date("2004-11-22"))
 
 tsQuotes <- list(d1w  =0.0382,
                  d1m  =0.0372,



More information about the Rquantlib-commits mailing list