[Yield-curve-commits] r42 - pkg/man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Nov 1 17:27:12 CET 2012


Author: guirreri
Date: 2012-11-01 17:27:12 +0100 (Thu, 01 Nov 2012)
New Revision: 42

Modified:
   pkg/man/FedYieldCurve.Rd
   pkg/man/NSrates.Rd
   pkg/man/Nelson.Siegel.Rd
   pkg/man/Srates.Rd
   pkg/man/YieldCurve-package.Rd
Log:


Modified: pkg/man/FedYieldCurve.Rd
===================================================================
--- pkg/man/FedYieldCurve.Rd	2010-12-14 16:50:43 UTC (rev 41)
+++ pkg/man/FedYieldCurve.Rd	2012-11-01 16:27:12 UTC (rev 42)
@@ -12,7 +12,7 @@
 
 \source{
 \acronym{FED}: \url{http://www.federalreserve.gov/}. \cr
-Data set is available for download in Excel format at \url{http://www.guirreri.host22.com/index.php?p=1_2_Documents}. 
+Data set is available for download in Excel format at \url{http://www.guirreri.host22.com/}.
 }
 
 \examples{

Modified: pkg/man/NSrates.Rd
===================================================================
--- pkg/man/NSrates.Rd	2010-12-14 16:50:43 UTC (rev 41)
+++ pkg/man/NSrates.Rd	2012-11-01 16:27:12 UTC (rev 42)
@@ -5,16 +5,15 @@
 Returns the interest rates by Nelson-Siegel's model.
 }
 \usage{
-NSrates(betaCoeff, lambdat, maturity)
+NSrates(Coeff, maturity)
 }
 %- maybe also 'usage' for other objects documented here.
 \arguments{
-  \item{betaCoeff}{ vector or matrix of the beta's coefficients.}
-  \item{lambdat}{ value of the estimated lambda}
+  \item{Coeff}{ Vector or matrix of the beta's coefficients and lambda as the function \code{Nelson.Siegel} returns. }
   \item{maturity}{ maturity of the yield curve of which want to return the interest rates.}
 }
 \details{
-\code{betaCoeff} is a vector or matrix of the three coefficients of the Nelson-Siegel's model
+\code{Coeff} is a vector or matrix of the four coefficients of the Nelson-Siegel's model: \eqn{(\beta_0; \beta_1; \beta_2; \lambda)}.
 }
 \value{
 Return interest rates in matrix object with number of rows equal to \code{nrow(betaCoeff)} and number of columns equal to \code{length(maturity)}.
@@ -30,14 +29,15 @@
 
 \examples{ 
 data(FedYieldCurve)
-b <- c(11.17514, -3.979371, 0.1302654)
-lambda <- c(0.1494588)
-tau <- c(3, 6, 12, 60, 84, 120 )
-y <- NSrates( b, lambda, tau)
+tau <- c(3, 6, 12, 60, 84, 120)
+mediumTerm <- c(12,60,84)
+NSParameters <- Nelson.Siegel( rate=FedYieldCurve[1:10,],
+			maturity=tau, MidTau=mediumTerm )
+Coeff <- NSParameters[10,]
+y <- NSrates( Coeff, tau)
 plot(tau,FedYieldCurve[10,],main="Fitting Nelson-Siegel yield curve", type="o")
 lines(tau,y, col=2)
 legend("topleft",legend=c("observed yield curve","fitted yield curve"),
 col=c(1,2),lty=1)
 grid()
 }
-\keyword{ htest }

Modified: pkg/man/Nelson.Siegel.Rd
===================================================================
--- pkg/man/Nelson.Siegel.Rd	2010-12-14 16:50:43 UTC (rev 41)
+++ pkg/man/Nelson.Siegel.Rd	2012-11-01 16:27:12 UTC (rev 42)
@@ -42,8 +42,7 @@
 mediumTerm <- c(12,60,84)
 NSParameters <- Nelson.Siegel( rate=FedYieldCurve[1:10,], 
 			maturity=tau, MidTau=mediumTerm )
-y <- NSrates(NSParameters[5,1:3],
-	NSParameters$lambda[5],tau)
+y <- NSrates(NSParameters[5,], tau)
 plot(tau,FedYieldCurve[5,],main="Fitting Nelson-Siegel yield curve", type="o")
 lines(tau,y, col=2)
 legend("topleft",legend=c("observed yield curve","fitted yield curve"),

Modified: pkg/man/Srates.Rd
===================================================================
--- pkg/man/Srates.Rd	2010-12-14 16:50:43 UTC (rev 41)
+++ pkg/man/Srates.Rd	2012-11-01 16:27:12 UTC (rev 42)
@@ -5,20 +5,19 @@
 Returns the interest rates by Svensson's model.
 }
 \usage{
-Srates(betaCoeff, lambdaValues, maturity, whichRate = "Forward")
+Srates(Coeff, maturity, whichRate = "Forward")
 }
 %- maybe also 'usage' for other objects documented here.
 \arguments{
-  \item{betaCoeff}{ vector or matrix of the beta's coefficients.}
-  \item{lambdaValues}{ vector or matrix of values of \eqn{\lambda_1} and \eqn{\lambda_2}.}
+  \item{Coeff}{ vector or matrix of the beta's coefficients and of \eqn{\lambda_1} and \eqn{\lambda_2}.}
   \item{maturity}{maturity of the yield curve of which want to return the interest rates.}
   \item{whichRate}{which rate want to return: "Spot" or "Forward" rates. }
 }
 \details{
- \code{betaCoeff} is a vector or matrix of the four coefficients of the Svensson's model, while \code{lambdaValues} is a vector or matrix of two lambda values of Svensson's model.
+ \code{Coeff} is a vector or matrix of the four coefficients of the Svensson's model, while \code{lambdaValues} is a vector or matrix of two lambda values of Svensson's model.
 }
 \value{
-Return interest rates in matrix object with number of rows equal to \code{nrow(betaCoeff)} and number of columns equal to \code{length(maturity)}.
+Return interest rates in matrix object with number of rows equal to \code{nrow(Coeff)} and number of columns equal to \code{length(maturity)}.
 }
 \references{ 
 Svensson, L.E. (1994), Estimating and Interpreting Forward Interest Rates: Sweden 1992-1994, \emph{IMF Working Paper}, \bold{WP/94/114}.
@@ -31,7 +30,7 @@
 data(ECBYieldCurve)
 tauECB <- c(0.25,0.5,1:30)
 Y <- Svensson(ECBYieldCurve[1:10,], tauECB, c(1,4), c(5,8) )
-B <- Srates(Y[,1:4], Y[,5:6], tauECB, whichRate="Spot")
+B <- Srates(Y, tauECB, whichRate="Spot")
 plot(tauECB,ECBYieldCurve[10,],main="Fitting Svensson's yield curve", type="o")
 lines(tauECB,B[10,], col=2)
 legend("topleft",legend=c("observed yield curve","fitted yield curve"),col=c(1,2),lty=1)

Modified: pkg/man/YieldCurve-package.Rd
===================================================================
--- pkg/man/YieldCurve-package.Rd	2010-12-14 16:50:43 UTC (rev 41)
+++ pkg/man/YieldCurve-package.Rd	2012-11-01 16:27:12 UTC (rev 42)
@@ -25,7 +25,7 @@
 \author{
 Sergio Salvino Guirreri
 
-Maintainer: Sergio Salvino Guirreri <sergioguirreri at gmail.com> <guirreri at dssm.unipa.it>
+Maintainer: Sergio Salvino Guirreri <sergioguirreri at gmail.com>
 
 }
 \references{
@@ -49,8 +49,7 @@
 mediumTerm <- c(12,60,84)
 NSParameters <- Nelson.Siegel( rate=FedYieldCurve[1:10,], 
 			maturity=tau, MidTau=mediumTerm )
-y <- NSrates(NSParameters[5,1:3],
-	NSParameters$lambda[5],tau)
+y <- NSrates(NSParameters[5,],tau)
 plot(tau,FedYieldCurve[5,],main="Fitting Nelson-Siegel yield curve", type="o")
 lines(tau,y, col=2)
 legend("topleft",legend=c("observed yield curve","fitted yield curve"),



More information about the Yield-curve-commits mailing list