- About
- Technical Stack
- Project Architecture
- Prerequisites
- Installation
- Usage
- Features
- Output Format
- DCF Model Methodology
- Future Enhancements
- Contributing
- License
- Contact
The Intrinsic Value Calculator is a sophisticated Python-based financial analysis tool that calculates the intrinsic value of stocks using the Discounted Cash Flow (DCF) model. By leveraging real-time financial data from Yahoo Finance and risk-free rates from the FRED API, this tool provides investors and analysts with automated, data-driven insights for stock valuation.
- Python 3.8+ - Core programming language
- pandas - Data manipulation and analysis
- yfinance - Real-time stock data retrieval
- fredapi - Federal Reserve Economic Data integration
- numpy - Numerical computations
- python-dotenv - Environment variable management
- concurrent.futures - Parallel processing implementation
Intrinsic Value Calculator
│
├── Data Collection
│ ├── Yahoo Finance API (Stock Data)
│ └── FRED API (Risk-free Rates)
│
├── Processing
│ ├── DCF Calculation
│ ├── Data Validation
│ └── Parallel Processing
│
└── Output
├── CSV Export
└── JSON Export
Before you begin, ensure you have:
- Python 3.8 or higher installed
- A FRED API key (Get it here)
- Basic understanding of DCF valuation concepts
- Git installed (for cloning the repository)
- Real-time Data Integration
- Yahoo Finance API for current stock data
- FRED API for up-to-date risk-free rates
- Advanced Valuation Methods
- Discounted Cash Flow (DCF) modeling
- Automated growth rate calculations
- Risk adjustment factors
- Efficient Processing
- Parallel processing for batch analysis
- Robust error handling
- Data validation checks
- Flexible Output Options
- Structured CSV export
- JSON format for API integration
- Detailed analysis reports
-
Clone the Repository
git clone https://github.com/your-username/Intrinsic-Value-Calculator.git cd Intrinsic-Value-Calculator
-
Set Up Virtual Environment
python -m venv venv # macOS/Linux source venv/bin/activate # Windows venv\Scripts\activate
-
Install Dependencies
pip install -r requirements.txt
-
Configure Environment Variables
# Create .env file touch .env # Add your FRED API key echo "FRED_API_KEY=your_fred_api_key_here" >> .env
python intrinsic_value_calculator.py
# Enter ticker when prompted: AAPL
python intrinsic_value_calculator.py
# Enter tickers separated by spaces: AAPL MSFT GOOGL
Field | Description |
---|---|
Ticker | Stock symbol |
Company Name | Full company name |
FCF | Free Cash Flow |
Market Price | Current stock price |
Intrinsic Value | Calculated DCF value |
Timestamp | Analysis timestamp |
{
"AAPL": {
"company_name": "Apple Inc.",
"fcf": 100000000000,
"market_price": 150.00,
"intrinsic_value": 165.50,
"timestamp": "2024-03-21T10:00:00Z"
}
}
The calculator implements a sophisticated DCF model that:
- Projects future cash flows using historical growth rates
- Applies a calculated discount rate based on:
- Risk-free rate from FRED
- Market risk premium
- Company-specific risk factors
- Incorporates terminal value calculation
- Adjusts for current debt and cash positions
- 🔹 Advanced Features
- CLI argument support
- Automated data updates via GitHub Actions
- Machine learning-based growth predictions
- 🔹 UI/UX Improvements
- Interactive web interface
- Real-time visualization
- PDF report generation
- 🔹 Additional Analysis
- Sensitivity analysis
- Peer comparison
- Multiple valuation methods
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Brandon Shay - bpshay13@gmail.com
Project Link: https://github.com/your-username/Intrinsic-Value-Calculator
Last Updated: March 2025