Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

📈 DCF Valuation Automator — Intrinsic Value Calculator

A Python implementation of Discounted Cash Flow (DCF) analysis that calculates the intrinsic value per share of a company using the Gordon Growth Model for terminal value.

About Me

I am a Mechatronics Engineering graduate and a postgraduate in Finance from Henley Business School, looking to enter the field of finance in data science, machine learning, or quantitative finance.


What Is a DCF?

A Discounted Cash Flow model calculates what a company's future earnings are worth in today's money. Money today is worth more than the same money tomorrow — due to both inflation and investment risk. The DCF discounts each future cash flow back to its present value using a rate (WACC) that captures both factors combined.

Add up all the discounted cash flows and you get the intrinsic value of the company — what it should theoretically be worth regardless of what the market currently prices it at.


What Is Terminal Value?

A company doesn't stop generating cash after year 10. Terminal value captures all cash flows from year 11 to infinity in a single number, using the Gordon Growth Model:

Terminal Value = Final Year FCF × (1 + g) / (WACC - g)

Where g is the long-term growth rate (typically 2-3%, in line with GDP). Terminal value typically accounts for 60-80% of total intrinsic value — which is why assumptions matter enormously. A 1% change in WACC can swing the valuation by hundreds of billions.


Results — Apple (AAPL)

Input Value
Current FCF $108.8B
Growth Rate (10yr) 8%
WACC 9%
Terminal Growth Rate 2.5%
Shares Outstanding 15.4B
Output Value
Projected FCF Range $117.5B → $234.9B
Terminal Value $3,704.1B
Total Intrinsic Value $2,599.2B
Intrinsic Value Per Share $168.78
Current Market Price ~$220
Verdict Overvalued

What this tells us: Our base case suggests Apple trades at a premium to its intrinsic value. However, a DCF is only as reliable as its assumptions. As George Box said — "all models are wrong, but some are useful." This model is a framework for thinking about value, not a definitive sell signal. Apple's brand strength and ecosystem may justify a market premium.


Key Concepts

WACC — Weighted Average Cost of Capital. The discount rate representing the minimum return required given the risk of investing in this company. WACC and intrinsic value move in opposite directions — lower WACC means future cash flows are worth more today.

Free Cash Flow — cash a company actually generates after capital expenditure, as opposed to accounting profit which can be manipulated. FCF is what funds dividends, buybacks, and growth.

Sensitivity — small changes in WACC or growth rate produce large changes in valuation. Always treat DCF outputs as a range, not a single number.


How To Run

git clone https://github.com/sauravsen3/dcf-valuation.git
cd dcf-valuation
pip install -r requirements.txt
python dcf.py

Project Structure

dcf-valuation/
│
├── dcf.py                # DCF logic, terminal value, chart
├── requirements.txt      # Python dependencies
└── dcf_valuation.png     # Generated on first run

Tech Stack

  • pandas / numpy — cash flow calculations
  • matplotlib — projected vs discounted FCF bar chart

Part of a series of quantitative finance projects. Previous: Pairs Trading Strategy. Next: Comparable Companies Analysis.

About

A Python implementation of Discounted Cash Flow (DCF) analysis that calculates the intrinsic value per share of a company using the Gordon Growth Model for terminal value.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages