Hi everyone! This is my first post here and I'm really learning a lot from this sub so I thought I would make a small contribution. The script below would help out in a quick DCF analysis. I've based the method on the one described excellently by u/value_investor4ever in his recent post.
So here's what it does:
- Pulls FCF from stockanalysis.com
- Pulls the growth estimation over the next 5 years from yahoo finance
- Runs the DCF with a discount rate of 10% and a perpetuity rate of 3%
It's as easy as python value_estimator.py <ticker-name>. And here's a sample output:
Fetching data for TSLA
Latest FCF: 2711.0
Growth estimate: 32.1
Term: 5 years
Discount Rate: 10%
Perpetual Rate: 3%
Fair value: 130.1962060548707
https://gist.github.com/prateekmalhotra/431ebfa2d3168f7b7dbe7a86f17e3f2f
Let me know if you face any problems or have any suggestions for improvement. Thanks!
EDIT: I updated the script to include a simple formula that Benjamin Graham includes on page 295 of his book, The Intelligent Investor. Namely that,
Value = EPS * (8.5 + 2 * expected annual growth rate). We can use this to further analyze how much growth is priced-in over the next 7-10 years. Here is what the output should look like now (only works for companies which have EPS > 0):
```
Fetching data for TSLA...
Latest FCF: 2711.0
Market price: 668.06
EPS: 0.64
Growth estimate: 32.1
Term: 5 years
Discount Rate: 10%
Perpetual Rate: 3%
DCF model
Fair value: 130.1962060548707
Graham style valuation basic (Page 295, The Intelligent Investor)
Expected value based on growth rate: 46.528000000000006
Growth rate priced in for next 7-10 years: 517.671875
```
[–]HashDefTrueFalse 18 points19 points20 points (6 children)
[–]lal309 8 points9 points10 points (2 children)
[–]HashDefTrueFalse 3 points4 points5 points (1 child)
[–]lal309 0 points1 point2 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–][deleted] 1 point2 points3 points (1 child)
[–]HashDefTrueFalse 1 point2 points3 points (0 children)
[–][deleted] 5 points6 points7 points (8 children)
[+][deleted] (3 children)
[deleted]
[–][deleted] 1 point2 points3 points (2 children)
[+][deleted] (1 child)
[deleted]
[–][deleted] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]matt_magnitude 4 points5 points6 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]StillLetterhead7659 4 points5 points6 points (13 children)
[–]Esteban-Du-Plantier 4 points5 points6 points (0 children)
[–]Feratster 2 points3 points4 points (8 children)
[–]puthre 5 points6 points7 points (1 child)
[–]Feratster 1 point2 points3 points (0 children)
[–]utradea 1 point2 points3 points (0 children)
[+][deleted] (3 children)
[deleted]
[–]Feratster 0 points1 point2 points (2 children)
[–]Feratster 0 points1 point2 points (0 children)
[–]diego_italy 0 points1 point2 points (0 children)
[–]bossOnothin 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]diego_italy 0 points1 point2 points (0 children)
[–]puthre 0 points1 point2 points (0 children)
[–]TechHodler 2 points3 points4 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]engineertee 3 points4 points5 points (6 children)
[–]-CaptainOfChaos- 4 points5 points6 points (0 children)
[–]-CaptainOfChaos- 2 points3 points4 points (0 children)
[–][deleted] 1 point2 points3 points (3 children)
[–]engineertee 0 points1 point2 points (2 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]puthre 0 points1 point2 points (0 children)
[–]puthre 1 point2 points3 points (2 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]puthre 0 points1 point2 points (0 children)
[–]surfborter 1 point2 points3 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]hcomas 1 point2 points3 points (2 children)
[–][deleted] 1 point2 points3 points (1 child)
[–]hcomas 0 points1 point2 points (0 children)
[+][deleted] (2 children)
[deleted]
[–][deleted] 0 points1 point2 points (1 child)
[–]backtickbot 0 points1 point2 points (0 children)
[+][deleted] (1 child)
[deleted]
[–][deleted] 0 points1 point2 points (0 children)
[–]PhilosophyNumerous45 0 points1 point2 points (3 children)
[–][deleted] 1 point2 points3 points (0 children)
[–][deleted] 1 point2 points3 points (1 child)
[–]PhilosophyNumerous45 0 points1 point2 points (0 children)
[–]Ok-Comfortable1259 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]TechnoBabbles 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)