https://github.com/m-muecke/firmvaluesim
Monte Carlo simulation for company valuation
https://github.com/m-muecke/firmvaluesim
financial-analysis monte-carlo-simulation r risk-management valuation wacc
Last synced: over 1 year ago
JSON representation
Monte Carlo simulation for company valuation
- Host: GitHub
- URL: https://github.com/m-muecke/firmvaluesim
- Owner: m-muecke
- License: other
- Created: 2018-03-04T22:06:39.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2022-09-26T17:50:53.000Z (almost 4 years ago)
- Last Synced: 2025-04-01T23:14:14.753Z (over 1 year ago)
- Topics: financial-analysis, monte-carlo-simulation, r, risk-management, valuation, wacc
- Language: R
- Homepage:
- Size: 14.8 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE
Awesome Lists containing this project
README
---
output: github_document
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# firmValueSim
[](https://github.com/maximilian-muecke/firmValueSim/actions)
[](https://codecov.io/gh/maximilian-muecke/firmValueSim?branch=master)
## Overview
To minimize the downside of the assumptions made in an intrinsic valuation approach, the possibility exists to model the risk via a Monte Carlo simulation. Each variable in the model that is derived through assumption that can be stochastically modeled. The main purpose of a Monte Carlo in the context of a valuation is to achieve a risk management component, by integrating the expected value of multiple parameter outcomes. The two main approaches of risk management in valuation are either via a tree-based or simulation approach. The advantages of using simulations instead of decision-trees is that the flexibility of not only choosing a binary input approach, but instead choosing an underlying distribution. The first-step in the simulation is assigning a distribution of the variable, either through historical data, most likely outcome or market consensus. After the distributions are assigned, a single value of each parameter distribution gets sampled and the valuation is done as per usual.
## Installation
```{r eval = FALSE}
devtools::install_github("maximilian-muecke/firmValueSim")
```
## Usage
```{r}
library(firmValueSim)
library(ggplot2)
# simulate stock prices via the Gordon Growth model
prices <- ddm_sim(
1.5, r = 0.07, g_mu = 0.03, g_sigma = 0.01, n_sim = 10000, seed = 12345
)
# visualize distribution of prices
df <- data.frame(prices = prices)
ggplot(df, aes(x = prices)) +
geom_histogram(binwidth = 5)
```
## References
- Abrams, J. B. (2001). Quantitative business valuation. New York: McGraw-Hill.