[Uwgarp-commits] r211 - in pkg/GARPFRM: R man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Jul 30 17:34:48 CEST 2014


Author: tfillebeen
Date: 2014-07-30 17:34:48 +0200 (Wed, 30 Jul 2014)
New Revision: 211

Modified:
   pkg/GARPFRM/R/discountFactorArbitrage.R
   pkg/GARPFRM/man/bondPrice.Rd
Log:
latent build error find lead to example fix

Modified: pkg/GARPFRM/R/discountFactorArbitrage.R
===================================================================
--- pkg/GARPFRM/R/discountFactorArbitrage.R	2014-07-24 23:40:43 UTC (rev 210)
+++ pkg/GARPFRM/R/discountFactorArbitrage.R	2014-07-30 15:34:48 UTC (rev 211)
@@ -49,6 +49,7 @@
 #' @examples
 #' time = seq(from=0.5, to=2, by=0.5)
 #' bond = bondSpec(time, face=100, m=2, couponRate = 0.0475)
+#' DF = rbind(0.968,0.9407242,0.9031545,0.8739803)
 #' price = bondPrice(bond,DF)
 #' @author Thomas Fillebeen
 #' @export
@@ -215,10 +216,10 @@
 #' @param time increments of time when discount factors are estimated
 #' @param DF discount factor for during time increments
 #' @examples 
-#' spotRates = matrix(0,length(time),1)
-#' for(i in 1:(length(time))){
-#'  spotRates[i] = (2-2*DF[i]^(1/(2*time[i]))) / DF[i]^(1/(2*time[i]))
-#' }
+#' DF = c(0.996489, 0.991306, 0.984484, 0.975616, 0.964519)
+#' time = seq(from=0.5, to=2.5, by=0.5)
+#' rates = spotForwardRates(time,DF)
+#' rates
 #' @author Thomas Fillebeen
 #' @export
 spotForwardRates = function(time, DF){

Modified: pkg/GARPFRM/man/bondPrice.Rd
===================================================================
--- pkg/GARPFRM/man/bondPrice.Rd	2014-07-24 23:40:43 UTC (rev 210)
+++ pkg/GARPFRM/man/bondPrice.Rd	2014-07-30 15:34:48 UTC (rev 211)
@@ -20,6 +20,7 @@
 \examples{
 time = seq(from=0.5, to=2, by=0.5)
 bond = bondSpec(time, face=100, m=2, couponRate = 0.0475)
+DF = rbind(0.968,0.9407242,0.9031545,0.8739803)
 price = bondPrice(bond,DF)
 }
 \author{



More information about the Uwgarp-commits mailing list