Metadata-Version: 2.2
Name: fin-insight
Version: 0.1.2
Summary: A financial analysis tool for stock sentiment and rating
Author-email: Spock Stein <spockstein@example.com>
License: MIT License
        
        Copyright (c) 2025 Spock Stein and Sasank
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/spockstein/fin_insight
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Office/Business :: Financial :: Investment
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: yfinance>=0.2.38
Requires-Dist: requests>=2.31.0
Requires-Dist: vaderSentiment>=3.3.2
Requires-Dist: pandas>=1.3
Provides-Extra: dev
Requires-Dist: pytest>=7.4.4; extra == "dev"
Requires-Dist: twine>=4.0.2; extra == "dev"

# Financial Insight Stock Analysis Tool

## Overview
Financial Insight is a Python-based stock analysis tool that provides comprehensive insights into stock performance by combining financial data, news sentiment, and intelligent rating generation.

## Features
- Fetch real-time stock data using Yahoo Finance
- Retrieve latest financial news articles
- Perform sentiment analysis on news articles
- Generate stock ratings (Buy/Sell/Hold)
- Detailed financial highlights
- JSON output for easy integration

## Prerequisites
- Python 3.8+
- NewsAPI API Key

## Installation

1. Clone the repository:
```bash
git clone https://github.com/yourusername/fin_insight.git
cd fin_insight
```

2. Create a virtual environment:
```bash
python -m venv venv
source venv/bin/activate  # On Windows use `venv\Scripts\activate`
```

3. Install dependencies:
```bash
pip install -r requirements.txt
```

4. Set up NewsAPI Key:
```bash
export NEWS_API_KEY='your_newsapi_key_here'  # On Windows use `set NEWS_API_KEY=your_key`
```

## Usage
```bash
python fin_insight.py AAPL  # Replace AAPL with desired stock ticker
```

## Example Output
```json
{
    "ticker": "AAPL",
    "latest_price": 175.23,
    "sentiment_summary": "Positive sentiment in news articles",
    "financialHighlights": {
        "revenueGrowthPercentage": "12.50%",
        "earningsGrowthPercentage": "15.75%",
        "forwardPERatio": "22.30",
        "debtToEquityRatio": "1.10"
    },
    "rating": "Buy"
}
```

## Components
- `get_stock_data()`: Retrieves stock financial data
- `get_financial_news()`: Fetches recent news articles
- `analyze_sentiment()`: Performs sentiment analysis
- `generate_rating()`: Calculates stock recommendation

## Configuration
Adjust rating thresholds and weights in `generate_rating()` function for custom analysis.

## Error Handling
- Validates ticker symbols
- Checks for missing API keys
- Provides detailed error messages

## Dependencies
- yfinance: Stock data retrieval
- requests: News article fetching
- vaderSentiment: Sentiment analysis
- pandas: Data manipulation

## Contributing
1. Fork the repository
2. Create your feature branch
3. Commit your changes
4. Push to the branch
5. Create a Pull Request

## License
MIT License

## Disclaimer
This tool provides financial insights for informational purposes only. Always conduct your own research and consult financial advisors before making investment decisions.
