getSeries: Download Time-Series Data from Bundesbank

Description Usage Arguments Details Value Author(s) Examples

View source: R/getSeries.R

Description

Download time series from the website of the Bundesbank.

Usage

1
getSeries(series, start = NULL, end = format(Sys.Date(), "%Y-%m"))

Arguments

series

The series name as given by the Bundesbank (e.g. ‘BBK01.ST0316’ for 3-Month EURIBOR).

start

character in format ‘YYYY-MM’. If omitted, the function downloads data from the earliest available date.

end

character in format ‘YYYY.MM’. If omitted, the function downloads data up to the most recent available date.

Details

The data can be downloaded in CSV-format from the Bundesbank's website http://www.bundesbank.de .

Value

A list:

dates

dates (of class Date)

values

numerical values

The list has an attribute info, which is a character vector and holds additional information for series (such as its unit).

Author(s)

Enrico Schumann

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
## Not run: 
series <- "BBK01.QUY229"

series <- "BBK01.ST0304" ## Eonia
res <- getSeries(series) ## retrieve all available data
res <- getSeries(series, start = "2012-01")
res <- getSeries(series, end   = "2012-01")
res <- getSeries(series, start = "2012-01", end = "2012-05")

## create a data.frame
df <- data.frame(res)
head(df)

## make zoo series
require("zoo")
eonia <- zoo(res$values, res$dates)
plot(eonia)

## check comments
writeLines(strwrap(paste("- ", attr(res, "info")), width = 60, exdent = 2))

## End(Not run)

enricoschumann/bundesbank documentation built on May 13, 2017, 6:08 p.m.