|
| 1 | +# Stock Valuation Dashboard |
| 2 | + |
| 3 | +## Overview |
| 4 | + |
| 5 | +This project is a web-based stock valuation dashboard that helps investors analyze dividend growth stocks. It provides insights into stock quality and valuation based on historical financial data. |
| 6 | + |
| 7 | +Key features: |
| 8 | +- Fetches financial data from Financial Modeling Prep API |
| 9 | +- Calculates growth rates for revenue, dividends, cash flow, and other metrics |
| 10 | +- Determines if a stock is a quality dividend growth stock |
| 11 | +- Assesses whether a stock is undervalued or reasonably valued |
| 12 | +- Visualizes key metrics and growth rates |
| 13 | + |
| 14 | +## Tech Stack |
| 15 | + |
| 16 | +- Python 3.11+ |
| 17 | +- FastAPI: Web framework for building APIs |
| 18 | +- Dash: React-based framework for building analytical web applications |
| 19 | +- Polars: Fast DataFrame library for data manipulation |
| 20 | +- Pydantic: Data validation using Python type annotations |
| 21 | +- PyArrow: Efficient data interchange format |
| 22 | +- DuckDB: Embedded analytical database |
| 23 | +- uv: Python packaging and dependency management tool |
| 24 | +- Docker: Containerization |
| 25 | +- GitHub Actions: CI/CD pipeline |
| 26 | + |
| 27 | +## Project Structure |
| 28 | + |
| 29 | +stock_valuation_app/ |
| 30 | +├── .github/workflows/ # CI/CD configuration |
| 31 | +├── src/ |
| 32 | +│ └── stock_valuation_app/ |
| 33 | +│ ├── api/ # FastAPI routes |
| 34 | +│ ├── data/ # Data fetching and processing |
| 35 | +│ ├── models/ # Pydantic models |
| 36 | +│ ├── services/ # Business logic |
| 37 | +│ └── ui/ # Dash dashboard |
| 38 | +├── tests/ # Unit and integration tests |
| 39 | +├── Dockerfile |
| 40 | +├── docker-compose.yml |
| 41 | +├── pyproject.toml # Project metadata and dependencies |
| 42 | +├── README.md |
| 43 | +└── uv.lock # Dependency lock file |
| 44 | + |
| 45 | + |
| 46 | + |
| 47 | +## Setup and Installation |
| 48 | + |
| 49 | +1. Clone the repository: |
| 50 | +git clone https://github.com/dimtics/stock_valuation_app.git |
| 51 | +cd stock_valuation_app |
| 52 | + |
| 53 | +2. Install uv and project dependencies: |
| 54 | +pip install uv |
| 55 | +uv pip install -e . |
| 56 | + |
| 57 | +3. Set up environment variables: |
| 58 | +Create a `.env` file in the project root and add your Financial Modeling Prep API key: |
| 59 | +FMP_API_KEY=your_api_key_here |
| 60 | + |
| 61 | +4. Run the application: |
| 62 | +uvicorn stock_valuation_app:app --reload |
| 63 | + |
| 64 | +5. Open your browser and navigate to `http://localhost:8000/dashboard` to view the dashboard. |
| 65 | + |
| 66 | + |
| 67 | +## Docker Deployment |
| 68 | + |
| 69 | +To run the application using Docker: |
| 70 | + |
| 71 | +1. Build the Docker image: |
| 72 | +docker build -t stock-valuation-app . |
| 73 | +docker run -p 8000:8000 -e FMP_API_KEY=your_api_key_here stock-valuation-app |
| 74 | + |
| 75 | +Alternatively, use Docker Compose: |
| 76 | +docker-compose up |
| 77 | + |
| 78 | + |
| 79 | + |
| 80 | +## Usage |
| 81 | + |
| 82 | +1. Enter a stock symbol in the input field on the dashboard. |
| 83 | +2. Click the "Analyze" button to fetch and analyze the stock data. |
| 84 | +3. View the growth rates, quality assessment, and valuation results. |
| 85 | + |
| 86 | +## Contributing |
| 87 | + |
| 88 | +Contributions are welcome! Please feel free to submit a Pull Request. |
| 89 | + |
| 90 | +## License |
| 91 | + |
| 92 | +This project is licensed under the MIT License - see the LICENSE file for details. |
0 commit comments