RiskPremium

Measuring the market risk premium
Log | Files | Refs

commit 4cbf5365743d5953354914b2b826f40129c2999e
parent 5c772597840b6dd5d1e5c1db49ef3a6d5d5ae21e
Author: Erik Loualiche <[email protected]>
Date:   Tue,  4 Jun 2019 14:33:55 -0400

Clean citation

Diffstat:
Mlog/R-session-info.log.R | 65+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mlog/rp_measure.log.R | 11+++++++----
Mreadme.md | 5++---
Msrc/readme_in.md | 5++---
Msrc/rp_measure.R | 7+++++--
5 files changed, 81 insertions(+), 12 deletions(-)

diff --git a/log/R-session-info.log.R b/log/R-session-info.log.R @@ -128,3 +128,68 @@ withr 2.1.2 2018-03-15 CRAN (R 3.5.1) zeallot 0.1.0 2018-01-28 CRAN (R 3.5.1) zoo * 1.8-3 2018-07-16 CRAN (R 3.5.1) + + +# ----- +# Session info for rp_measure.csv + + setting value + version R version 3.5.1 (2018-07-02) + system x86_64, darwin15.6.0 + ui X11 + language (EN) + collate en_US.UTF-8 + tz America/New_York + date 2019-06-04 + + package * version date source + assertthat 0.2.0 2017-04-11 CRAN (R 3.5.1) + backports 1.1.2 2017-12-13 CRAN (R 3.5.1) + base * 3.5.1 2018-08-05 local + colorspace 1.3-2 2016-12-14 CRAN (R 3.5.1) + compiler 3.5.1 2018-08-05 local + crayon * 1.3.4 2019-05-19 Github (gaborcsardi/crayon@84be620) + data.table * 1.12.3 2019-06-03 local + datasets * 3.5.1 2018-08-05 local + devtools * 1.13.6 2018-06-27 CRAN (R 3.5.1) + digest 0.6.15 2018-01-28 CRAN (R 3.5.1) + dplyr 0.8.0.9010 2019-03-31 Github (tidyverse/dplyr@6832c62) + ggplot2 * 3.1.0.9000 2019-03-31 Github (tidyverse/ggplot2@230e8f7) + glue 1.3.0 2018-07-17 CRAN (R 3.5.1) + graphics * 3.5.1 2018-08-05 local + grDevices * 3.5.1 2018-08-05 local + grid 3.5.1 2018-08-05 local + gtable 0.2.0 2016-02-26 CRAN (R 3.5.1) + lattice 0.20-35 2017-03-25 CRAN (R 3.5.1) + lazyeval 0.2.1 2017-10-29 CRAN (R 3.5.1) + lmtest * 0.9-36 2018-04-04 CRAN (R 3.5.1) + lubridate * 1.7.4 2018-04-11 CRAN (R 3.5.1) + magrittr 1.5 2014-11-22 CRAN (R 3.5.1) + matrixStats 0.54.0 2018-07-23 CRAN (R 3.5.1) + memoise 1.1.0 2017-04-21 CRAN (R 3.5.1) + methods * 3.5.1 2018-08-05 local + munsell 0.5.0 2018-06-12 CRAN (R 3.5.1) + parallel 3.5.1 2018-08-05 local + pillar 1.4.0.9002 2019-05-19 Github (r-lib/pillar@5ded57f) + pkgconfig 2.0.2 2019-05-19 Github (r-lib/pkgconfig@5453f79) + purrr 0.2.5 2018-05-29 CRAN (R 3.5.1) + R6 2.2.2 2017-06-17 CRAN (R 3.5.0) + Rcpp 1.0.1.3 2019-05-19 Github (RcppCore/Rcpp@6062d56) + rlang 0.3.4.9003 2019-05-19 Github (r-lib/rlang@6a232c0) + sandwich * 2.4-0 2017-07-26 CRAN (R 3.5.1) + scales 1.0.0.9000 2019-03-31 Github (r-lib/scales@c374014) + stargazer * 5.2.2 2018-05-30 CRAN (R 3.5.1) + statar * 0.6.5 2017-07-06 CRAN (R 3.5.1) + stats * 3.5.1 2018-08-05 local + stringi 1.2.4 2018-07-20 CRAN (R 3.5.1) + stringr * 1.3.1 2018-05-10 CRAN (R 3.5.1) + tibble 2.1.1.9000 2019-05-19 Github (tidyverse/tibble@71b8ff6) + tidyr 0.8.3.9000 2019-05-19 Github (tidyverse/tidyr@b6ec78b) + tidyselect 0.2.5.9000 2019-05-19 Github (tidyverse/tidyselect@19150c0) + tools 3.5.1 2018-08-05 local + utils * 3.5.1 2018-08-05 local + vctrs 0.1.0.9003 2019-05-19 Github (r-lib/vctrs@b1e6b81) + wesanderson * 0.3.6 2018-04-20 CRAN (R 3.5.1) + withr 2.1.2 2018-03-15 CRAN (R 3.5.1) + zeallot 0.1.0 2018-01-28 CRAN (R 3.5.1) + zoo * 1.8-3 2018-07-16 CRAN (R 3.5.1) diff --git a/log/rp_measure.log.R b/log/rp_measure.log.R @@ -36,7 +36,7 @@ Type 'q()' to quit R. Log file for code executed at > message(format(Sys.time(), "%a %b %d %X %Y")) -Tue Jun 04 12:52:01 2019 +Tue Jun 04 14:33:17 2019 > ################################################################################## > > @@ -197,7 +197,7 @@ Notes: ***Significant at the 1 percent level. > # PLOT > dt_plot <- dt_exp_rmrf[, .(date=as.Date(ISOdate(str_sub(dateym,1, 4), str_sub(dateym, 5, 6), 1)), + dp, cay, rf, rmrf_y3, exp_rmrf)] -> dt_plot +> dt_plot[] date dp cay rf rmrf_y3 exp_rmrf 1: 1952-01-01 0.05812871 0.01646544 0.0157 0.17701996 0.201294617 2: 1952-02-01 0.05899675 0.02551783 0.0154 0.19964326 0.222836429 @@ -211,6 +211,7 @@ Notes: ***Significant at the 1 percent level. 255: 2015-03-01 0.02111608 -0.02656083 0.0003 0.08734601 0.025601134 256: 2015-04-01 0.02109137 -0.03519129 0.0002 0.08565438 0.007723565 > +> > p0 <- dt_plot[, .(date, dp, cay, rf, rmrf_y3) ] %>% + melt(id.vars="date") %>% + ggplot(aes(date, value, colour = variable)) + @@ -230,12 +231,14 @@ Notes: ***Significant at the 1 percent level. + values = c(wes_palette("Zissou1")[1], wes_palette("Zissou1")[5]), + labels=c("Expected", "Realized")) + + guides(colour = guide_legend(nrow = 1)) -> > ggsave("./output/predict.png", p1, width = 8, height=6) +> ################################################################################## > > +> ################################################################################## +> > > > proc.time() user system elapsed - 2.500 0.207 2.776 + 2.539 0.266 2.953 diff --git a/readme.md b/readme.md @@ -3,12 +3,11 @@ ![](output/predict.png) -This code updates the measure of equity risk premium from the paper **Buyout Activity: the Impact of Aggregate Discount Rates** in the *Journal of Finance* - -Authors: Valentin Haddad, Erik Loualiche & Matthew Plosser. +This code updates the measure of equity risk premium. We use the dividend-price ratio, cay and the three-month T-bill to predict future excess returns ++ *Haddad Valentin, Erik Loualiche, and Matthew Plosser*: **Buyout Activity: the Impact of Aggregate Discount Rates**; Journal of Finance, February 2017, 72:1 + [Download the paper](http://loualiche.gitlab.io/www/abstract/LBO.html) + [Download the data](https://github.com/eloualiche/RiskPremium/releases) diff --git a/src/readme_in.md b/src/readme_in.md @@ -3,12 +3,11 @@ ![](output/predict.png) -This code updates the measure of equity risk premium from the paper **Buyout Activity: the Impact of Aggregate Discount Rates** in the *Journal of Finance* - -Authors: Valentin Haddad, Erik Loualiche & Matthew Plosser. +This code updates the measure of equity risk premium. We use the dividend-price ratio, cay and the three-month T-bill to predict future excess returns ++ *Haddad Valentin, Erik Loualiche, and Matthew Plosser*: **Buyout Activity: the Impact of Aggregate Discount Rates**; Journal of Finance, February 2017, 72:1 + [Download the paper](http://loualiche.gitlab.io/www/abstract/LBO.html) + [Download the data](https://github.com/eloualiche/RiskPremium/releases) diff --git a/src/rp_measure.R b/src/rp_measure.R @@ -78,7 +78,8 @@ fwrite(dt_exp_rmrf, "./output/predict.csv") # PLOT dt_plot <- dt_exp_rmrf[, .(date=as.Date(ISOdate(str_sub(dateym,1, 4), str_sub(dateym, 5, 6), 1)), dp, cay, rf, rmrf_y3, exp_rmrf)] -dt_plot +dt_plot[] + p0 <- dt_plot[, .(date, dp, cay, rf, rmrf_y3) ] %>% melt(id.vars="date") %>% @@ -99,8 +100,10 @@ p1 <- dt_plot[, .(date, exp_rmrf, rmrf_y3) ] %>% values = c(wes_palette("Zissou1")[1], wes_palette("Zissou1")[5]), labels=c("Expected", "Realized")) + guides(colour = guide_legend(nrow = 1)) - ggsave("./output/predict.png", p1, width = 8, height=6) +################################################################################## +################################################################################## +