Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AutoDCF

Automated Discounted Cash Flow (DCF) valuation model for any publicly traded company. Enter a ticker and get a full valuation with WACC decomposition, FCF projections, and sensitivity analysis — the same framework used in investment banking.

What it does

  1. Fetches real financials from Yahoo Finance — free cash flow history, market cap, debt, beta, shares outstanding
  2. Calculates WACC using CAPM for cost of equity and historical interest expense for cost of debt
  3. Projects FCF forward using a user-adjustable growth rate (defaults to historical CAGR)
  4. Discounts to present value and adds terminal value via the Gordon Growth Model
  5. Outputs intrinsic value per share vs current market price with upside/downside
  6. Sensitivity table — intrinsic value across a grid of growth rate and WACC combinations (standard IB output)

Setup

git clone https://github.com/akshatg10104/autodcf.git
cd autodcf
pip install -r requirements.txt
streamlit run app.py

Python 3.10+ required.

Usage

Enter any valid ticker (AAPL, MSFT, JPM, etc.) and click Run DCF. Adjust assumptions in the sidebar:

  • FCF growth rate — projected annual growth for years 1–N (defaults to historical CAGR)
  • Terminal growth rate — perpetuity growth rate after projection period (typically ~2.5%)
  • Projection years — 3 to 10 years
  • Risk-free rate — 10-year Treasury yield
  • WACC override — manually set the discount rate if needed

Methodology

Component Method
Cost of Equity CAPM: Rf + β × ERP (ERP = 5.5%, Damodaran)
Cost of Debt Interest Expense / Total Debt × (1 − Tax Rate)
WACC Weighted by market-value capital structure
Terminal Value Gordon Growth Model: FCF × (1+g) / (WACC − g)
Intrinsic Value (PV of FCFs + PV of TV − Net Debt) / Shares Outstanding

Project Structure

autodcf/
├── app.py                  # Streamlit dashboard
├── utils/
│   ├── data_fetch.py       # yfinance wrapper
│   ├── wacc.py             # WACC components
│   └── dcf.py              # DCF engine + sensitivity analysis
└── requirements.txt

Disclaimer: For educational purposes only. Does not constitute investment advice.

About

Automated DCF valuation model with WACC decomposition, EV→equity bridge, football field chart, and dual sensitivity analysis for any public company

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages