```
from random import randint
= range(0,6)
year = .082
interestRate
= [ randint(0, 300) for _ in range(5)]
predictions = [-500] + predictions
cashFlow cashFlow
```

`[-500, 195, 127, 44, 42, 196]`

Not Sure I Trust This

python

code

finanical

analyst

Published

November 9, 2022

Among the list of formulas I learned in the Financial Analyst coures, this is valuation is the one I instintively distrusted. **Discounted Cash Flows** is a way to evaluate the future returns on an investement based on: 1. The initial Investment. 2. The Expected Cashflow per each year.

The problem I have here is that the *Expected Cashflows* are purely guesses about what we belive the numbers to be in the future. While the example in the class picked - as far as I can tell - random numbers to fill them in, I would hope that the numbers provided here would be based on research of other similar projects. At least, I would hope in the real world this is was happens.

The formula for this is: > \(DCF= (CF_1)/(1 + r)^1 + (CF_2)/(1 + r)^2 + .. + (CF_n)/(1 + r)^n\)

… where:

**CF**stands for*Cash Flow***r**is the interest rate**n**is the period of discount.

This all follows from the simple idea that money now is more valuble than money in the future. If given the choice between `$100`

now and `$100`

in a year then you’d obviously take the `$100`

now. This also applies to money we earn in the future: `$60`

now is better than the `$60`

we’d earn in the future. So, example time.

We’re going to use a similar example to the class: Imagine that we’re considering inveseting money into a venture. We’re going to do something a bit more modern and say we’re investing in a growing Online Streamer with the expectation that we’ll get some of the money in turn. A deal is worked out and you’ll be getting some kind of slice of the money they make in exchange. They’re going to ask for `$500`

in investment. For the interest rate, we’ll use the **Inflation Rate** since this is not a loan. Right now, it’s `8.2%`

so we’ll use that as our Interest Rate; Sometimes this also called the **Discount Rate** and *Inflation* certainly applies.

We’ll use random numbers over the span of 6 years and then calculate if this was a good idea.

```
from random import randint
year = range(0,6)
interestRate = .082
predictions = [ randint(0, 300) for _ in range(5)]
cashFlow = [-500] + predictions
cashFlow
```

`[-500, 195, 127, 44, 42, 196]`

We’ll need a function to calculate the **Present Value** for each term in the formula. For this, we’ll just write up a quick lambda function in python.

We’ll usually see this in a table so we’ll add all this to a Data frame.

Year | Cash | Pv | |
---|---|---|---|

0 | 0 | -500 | 0 |

1 | 1 | 195 | 0 |

2 | 2 | 127 | 0 |

3 | 3 | 44 | 0 |

4 | 4 | 42 | 0 |

5 | 5 | 196 | 0 |

… and now we can iterate through the rows and fill in the *Present Value* per year.

Lastly, we’ll take the sum to see if it was worth it.

Looks like we lost about $14 which is not that surprising since making money in Streaming can be quite challenging.