[Yield-curve-commits] r51 - pkg/man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sat Jan 19 13:00:00 CET 2013
Author: guirreri
Date: 2013-01-19 13:00:00 +0100 (Sat, 19 Jan 2013)
New Revision: 51
Modified:
pkg/man/FedYieldCurve.Rd
pkg/man/NSrates.Rd
pkg/man/Nelson.Siegel.Rd
pkg/man/YieldCurve-package.Rd
Log:
Adjusting to fit the xts dataset
Modified: pkg/man/FedYieldCurve.Rd
===================================================================
--- pkg/man/FedYieldCurve.Rd 2013-01-19 11:58:29 UTC (rev 50)
+++ pkg/man/FedYieldCurve.Rd 2013-01-19 12:00:00 UTC (rev 51)
@@ -3,21 +3,35 @@
\docType{data}
\title{Federal Reserve interest rates }
\description{
-3 months, 6 months, 1 year, 5 year, 7 year and 10 year monthly interest rate of the Federal Reserve from Janury 1982 to June 2009.
+The data-set contains the interest rates of the Federal Reserve, from January 1982 to December 2012.
+The interest rates are Market yield on U.S. Treasury securities constant maturity (CMT)
+(more information on the Treasury yield curve can be found at the following website
+\url{http://www.treasury.gov/resource-center/data-chart-center/interest-rates/Pages/yieldmethod.aspx})
+at different maturities (3 months, 6 months, 1 year, 2 years, 3 years, 5 years, 7 years and 10 years),
+quoted on investment basis and have been gathered with monthly frequency.
}
\usage{data(FedYieldCurve)}
\format{
- An object with class attributes \code{ts}, \code{mts}.
+ An object with class attributes \code{xts}.
}
-
\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/}.
+\acronym{FED}: \url{http://www.federalreserve.gov/datadownload/Build.aspx?rel=H15}.
}
\examples{
+require(xts)
+require(YieldCurve)
data(FedYieldCurve)
-tau <- c(3, 6, 12, 60, 84, 120 )
-plot(tau, FedYieldCurve[1,], type="o")
+
+first(FedYieldCurve,'3 month')
+last(FedYieldCurve,'3 month')
+mat<-c(3/12, 0.5, 1,2,3,5,7,10)
+
+par(mfrow=c(2,3))
+for( i in c(1,2,3,370,371,372) ){
+plot(mat, FedYieldCurve[i,], type="o", xlab="Maturities structure in years", ylab="Interest rates values")
+title(main=paste("Federal Reserve yield curve obeserved at",time(FedYieldCurve[i], sep=" ") ))
+grid()
}
-\keyword{datasets}
+}
+\keyword{datasets}
\ No newline at end of file
Modified: pkg/man/NSrates.Rd
===================================================================
--- pkg/man/NSrates.Rd 2013-01-19 11:58:29 UTC (rev 50)
+++ pkg/man/NSrates.Rd 2013-01-19 12:00:00 UTC (rev 51)
@@ -29,8 +29,8 @@
\examples{
data(FedYieldCurve)
-maturity.Fed <- c(3, 6, 12, 60, 84, 120)
-NSParameters <- Nelson.Siegel( rate=FedYieldCurve[1:10,], maturity=maturity.Fed )
+maturity.Fed <- c(3/12, 0.5, 1,2,3,5,7,10)
+NSParameters <- Nelson.Siegel( rate = first(FedYieldCurve,'10 month'), maturity=maturity.Fed )
y <- NSrates(NSParameters[5,],maturity.Fed)
plot(maturity.Fed,FedYieldCurve[10,],main="Fitting Nelson-Siegel yield curve", type="o")
lines(maturity.Fed,y, col=2)
Modified: pkg/man/Nelson.Siegel.Rd
===================================================================
--- pkg/man/Nelson.Siegel.Rd 2013-01-19 11:58:29 UTC (rev 50)
+++ pkg/man/Nelson.Siegel.Rd 2013-01-19 12:00:00 UTC (rev 51)
@@ -37,8 +37,8 @@
\seealso{ NelsonSiegel, Svensson}
\examples{
data(FedYieldCurve)
-maturity.Fed <- c(3, 6, 12, 60, 84, 120)
-NSParameters <- Nelson.Siegel( rate=FedYieldCurve[1:10,], maturity=maturity.Fed)
+maturity.Fed <- c(3/12, 0.5, 1,2,3,5,7,10)
+NSParameters <- Nelson.Siegel( rate=first(FedYieldCurve,'10 month'), maturity=maturity.Fed)
y <- NSrates(NSParameters[5,], maturity.Fed)
plot(maturity.Fed,FedYieldCurve[5,],main="Fitting Nelson-Siegel yield curve",
xlab=c("Pillars in months"), type="o")
Modified: pkg/man/YieldCurve-package.Rd
===================================================================
--- pkg/man/YieldCurve-package.Rd 2013-01-19 11:58:29 UTC (rev 50)
+++ pkg/man/YieldCurve-package.Rd 2013-01-19 12:00:00 UTC (rev 51)
@@ -15,8 +15,8 @@
\tabular{ll}{
Package: \tab YieldCurve\cr
Type: \tab Package\cr
-Version: \tab 4.0\cr
-Date: \tab 2012-11-03\cr
+Version: \tab 4.1\cr
+Date: \tab 2013-01-19\cr
License: \tab GPL (>= 2)\cr
LazyLoad: \tab yes\cr
}
@@ -46,8 +46,8 @@
\examples{
### Nelson.Siegel function and Fed data-set ###
data(FedYieldCurve)
-rate.Fed = FedYieldCurve[1:5,]
-maturity.Fed <- c(3, 6, 12, 60, 84, 120)
+rate.Fed = first(FedYieldCurve,'5 month')
+maturity.Fed <- c(3/12, 0.5, 1,2,3,5,7,10)
NSParameters <- Nelson.Siegel( rate= rate.Fed, maturity=maturity.Fed )
y <- NSrates(NSParameters[5,], maturity.Fed)
plot(maturity.Fed,rate.Fed[5,],main="Fitting Nelson-Siegel yield curve", type="o")
More information about the Yield-curve-commits
mailing list