A beautiful web application that calculates the fair value of any stock using Discounted Cash Flow (DCF) analysis. Just type in a company ticker, and it instantly tells you if the stock is undervalued or overvalued!
Open a terminal in the DCF folder and run:
python app.pyThe server will start at http://localhost:5000
The app should automatically open in your browser. If not, go to: http://localhost:5000
- Type a company ticker (e.g., AAPL, MSFT, GOOGL, TSLA)
- Click "Calculate Fair Value" or press Enter
- See the results!
- Recommendation: Strong Buy, Buy, Hold, Sell, or Strong Sell
- Upside/Downside: Percentage difference between fair value and current price
- Fair Value: Calculated price per share (DCF method)
- Current Price: Current market price
- Enterprise Value: Total company value
- Market Cap: Current market capitalization
Click "View Calculation Parameters" to see:
- Revenue (TTM)
- Growth rates (Years 1-5 and 6-10)
- Terminal growth rate
- WACC (Discount rate)
- FCF Margin
- Fetches Data: Gets financial data from Yahoo Finance API
- Applies DCF Formula: Uses your Excel DCF model formulas
- Calculates Fair Value: Projects 10 years of cash flows + terminal value
- Shows Recommendation: Compares fair value vs market price
The app uses analyst-based growth assumptions by default:
- Gets analyst growth estimates from Yahoo Finance
- Calculates WACC based on company beta
- Uses industry-standard FCF margins
- AAPL - Apple Inc.
- MSFT - Microsoft
- GOOGL - Google (Alphabet)
- TSLA - Tesla
- AMZN - Amazon
- META - Meta (Facebook)
Press Ctrl+C in the terminal to stop the server.
dcf_calculator.html- Web interfaceapp.py- Flask backend serverdcf_engine.py- DCF calculation logicHOW_TO_USE.md- This guide
Problem: Server won't start
- Solution: Make sure Flask is installed:
pip install flask flask-cors
Problem: Can't fetch company data
- Solution: Check your internet connection and verify the ticker symbol is correct
Problem: Calculation error
- Solution: Some companies may not have complete financial data available
Enjoy calculating fair stock values! 📈