README.md

README

About

bondyields is a simple package: it downloads treasury bill and bond yields data from the Bank of Canada website. Quandl does the same thing and is more comprehensive. But with bondyields, the main advantages are twofold: - No limit to api calls (50 a day without an authentication token with Quandl). - Live feed (data is up to date with the website).

Installation

Get it with:

devtools::install_github("vathymut/bondyields")

The package is not available on CRAN. Neither do I intend to make it so.

Usage

To download yield curve data for Canada, use:

# Download
yields_ca <- bondyields::download_yields( )
# Set column date as key to the data.table
yields_ca <- yields_ca[ , dates := lubridate::ymd( dates ) ]
data.table::setkey( yields_ca, 'dates' )


vathymut/bondyields documentation built on May 3, 2019, 4:35 p.m.