Site icon R-bloggers

Treasury yield curve from the Volcker era through Greenspan,…

[This article was first published on isomorphismes, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.



2006–2014 using FRBData


2006–2014 using FRBData package

Treasury yield curve from the Volcker era through Greenspan, Bernanke, and Yellen.

require(YieldCurve)
data(FedYieldCurve)
maturities <- c(3/12,6/12,1,2,3,5,7,10)
howmany=NROW(FedYieldCurve)
require(animation)
saveGIF({
    for (i in 1:howmany) {
        plot(maturities, FedYieldCurve[i,], type="o",lwd=3, col="#333333", xlab="Maturities structure in years", ylab="Interest rates values",ylim=c(0,15) )
        title(main=paste("Federal Reserve yield curve observed at", time(FedYieldCurve[i])))
        grid()
        }
    },interval=.05,movie.name="yield curve evolution.gif", ani.width=300,ani.height=300)

I can’t upload a larger view, but just run that code with a bigger width & height, you might get a ~10MB gif. I shrank it further with gifsicle.

Here’s the animated history of the ECB yield curve, as well:

To leave a comment for the author, please follow the link and comment on their blog: isomorphismes.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.