Shiller: Download Robert Shiller's Data

View source: R/market_data.R

ShillerR Documentation

Download Robert Shiller's Data

Description

Download the data provided by Robert Shiller and transform them into a data frame.

Usage

Shiller(dest.dir,
        url = "http://www.econ.yale.edu/~shiller/data/ie_data.xls")

Arguments

dest.dir

character: a path to a directory

url

the data URL

Details

The function downloads US stock-market data provided by Robert Shiller which he used in his book ‘Irrational Exhuberance’. Since the data are provided in Excel format, package readxl is required.

The downloaded Excel gets a date prefix (today in format YYYYMMDD) and is stored in directory dest.dir. Before any download is attempted, the function checks whether a file with today's prefix exist in dest.dir; if yes, the file is used.

Value

a data.frame:

Date

end of month

Price

numeric

Dividend

numeric

Earnings

numeric

CPI

numeric

Long Rate

numeric

Real Price

numeric

Real Dividend

numeric

Real Earnings

numeric

CAPE

numeric

Author(s)

Enrico Schumann

References

Gilli, M., Maringer, D. and Schumann, E. (2019) Numerical Methods and Optimization in Finance. 2nd edition. Elsevier. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1016/C2017-0-01621-X")}

Schumann, E. (2023) Financial Optimisation with R (NMOF Manual). http://enricoschumann.net/NMOF.htm#NMOFmanual

Shiller, R.J. (2015) Irrational Exhuberance. Princeton University Press. 3rd edition.

See Also

French

Examples

## Not run: 
archive.dir <- "~/Downloads/Shiller"
if (!dir.exists(archive.dir))
    dir.create(archive.dir)
Shiller(archive.dir)

## End(Not run)

enricoschumann/NMOF documentation built on March 27, 2024, 2:23 p.m.