Download Robert Shiller's Data
Download the data provided by Robert Shiller and transform them into a data frame.
Shiller(dest.dir, url = "http://www.econ.yale.edu/~shiller/data/ie_data.xls")
dest.dir |
character: a path to a directory |
url |
the data URL |
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.
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 |
Enrico Schumann
Gilli, M., Maringer, D. and Schumann, E. (2019) Numerical Methods and Optimization in Finance. 2nd edition. Elsevier. https://www.elsevier.com/books/numerical-methods-and-optimization-in-finance/gilli/978-0-12-815065-8
Schumann, E. (2019) Financial Optimisation with R (NMOF Manual). http://enricoschumann.net/NMOF.htm#NMOFmanual
Shiller, R.J. (2015) Irrational Exhuberance. Princeton University Press. 3rd edition.
## Not run: archive.dir <- "~/Downloads/Shiller" if (!dir.exists(archive.dir)) dir.create(archive.dir) Shiller(archive.dir) ## End(Not run)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.