-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathREADME.Rmd
55 lines (34 loc) · 1.8 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-"
)
```
# waccR
`waccr` is an R package for the analysis of [Aswath Damodaran's](http://people.stern.nyu.edu/adamodar/New_Home_Page/home.htm) weighted cost of capital (WACC) [data](http://people.stern.nyu.edu/adamodar/New_Home_Page/datafile/wacc.htm). It simply downloads Professor Damodaran's data set into R and tidies it.
## installation and usage:
```{r, eval = F}
devtools::install_github("RobertMyles/waccR")
library(waccR)
w_data <- wacc()
```
## WACC
The Weighted Average Cost of Capital (WACC) represents the average cost of financing a
company's debt and equity. There are two approches to calculating it, one based on the "Build-up" approach, the other on the Capital Assets Pricing Model (CAPM) approach.
$$\text{WACC} = C_e \times E + C_d \times D$$
where $C_d$ is the after-tax cost of debt, E and D the proportion of equity and debt in a firm based on market value, and $C_e$ is the cost of equity, which, using the CAPM approach, is calculated with:
$$C_e = R_f + \beta(R_m) + R_s + \text{Risk} + \text{Firm Risk}$$
where $R_f$ is risk-free rate, $R_m$ is the market premium, $R_s$ is the company size premium, *Risk* the [country risk premium](https://github.com/RobertMyles/riscoBrasil), *Firm Risk* the firm-specific risk and $\beta$ is a measure of the systematic risk, usually of the industry sector, in comparison to the market as a whole.
$\beta$ for various sectors of US industry is available with:
```{r, echo=FALSE}
library(waccR)
```
```{r}
betas()
```
For more, see Professor Damodaran's webpage: [http://people.stern.nyu.edu/adamodar/](http://people.stern.nyu.edu/adamodar/)