An open API service indexing awesome lists of open source software.

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

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

[![R-CMD-check](https://github.com/maximilian-muecke/firmValueSim/workflows/R-CMD-check/badge.svg)](https://github.com/maximilian-muecke/firmValueSim/actions)
[![Codecov test coverage](https://codecov.io/gh/maximilian-muecke/firmValueSim/branch/master/graph/badge.svg)](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.