Metadata-Version: 2.1
Name: stockholm-finance
Version: 1.0.8
Summary: Advanced financial sentiment analysis tool with policy impact assessment
Home-page: https://github.com/aykaym/stockholm
Author: Andrew Farney
Author-email: Andrew <contact@andrewfarney.net>
Maintainer-email: Andrew <contact@andrewfarney.net>
License: MIT License
        
        Copyright (c) 2025 Andrew Farney
        
        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/yourusername/stockholm
Project-URL: Documentation, https://github.com/yourusername/stockholm/blob/main/docs/README.md
Project-URL: Repository, https://github.com/yourusername/stockholm
Project-URL: Bug Tracker, https://github.com/yourusername/stockholm/issues
Project-URL: Changelog, https://github.com/yourusername/stockholm/blob/main/CHANGELOG.md
Keywords: finance,sentiment-analysis,nlp,market-analysis,policy-analysis,trading,investment
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: Intended Audience :: Developers
Classifier: Topic :: Office/Business :: Financial :: Investment
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Text Processing :: Linguistic
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: textblob>=0.17.1
Requires-Dist: yfinance>=0.2.18
Requires-Dist: requests>=2.31.0
Requires-Dist: numpy>=1.24.0
Requires-Dist: feedparser>=6.0.10
Requires-Dist: textual>=0.41.0
Requires-Dist: rich>=13.5.0
Requires-Dist: textual-plotext>=0.2.0
Requires-Dist: python-dateutil>=2.8.2
Requires-Dist: pytz>=2023.3
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
Requires-Dist: pytest-xdist>=3.0.0; extra == "dev"
Requires-Dist: black>=23.0.0; extra == "dev"
Requires-Dist: isort>=5.12.0; extra == "dev"
Requires-Dist: flake8>=6.0.0; extra == "dev"
Requires-Dist: mypy>=1.0.0; extra == "dev"
Requires-Dist: bandit>=1.7.0; extra == "dev"
Requires-Dist: safety>=2.3.0; extra == "dev"
Provides-Extra: docs
Requires-Dist: sphinx>=6.0.0; extra == "docs"
Requires-Dist: sphinx-rtd-theme>=1.2.0; extra == "docs"
Requires-Dist: myst-parser>=1.0.0; extra == "docs"
Provides-Extra: performance
Requires-Dist: pytest-benchmark>=4.0.0; extra == "performance"
Requires-Dist: memory-profiler>=0.60.0; extra == "performance"
Requires-Dist: psutil>=5.9.0; extra == "performance"

# 📊 Stockholm Finance

> **Note**: Pre-commit hooks are now active! 🎉

[![CI/CD Pipeline](https://github.com/aykaym/stockholm/actions/workflows/ci.yml/badge.svg)](https://github.com/aykaym/stockholm/actions/workflows/ci.yml)
[![PyPI version](https://badge.fury.io/py/stockholm-finance.svg)](https://badge.fury.io/py/stockholm-finance)
[![Python 3.8+](https://img.shields.io/badge/python-3.8+-blue.svg)](https://www.python.org/downloads/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Docker](https://img.shields.io/badge/docker-supported-blue.svg)](https://github.com/aykaym/stockholm/pkgs/container/stockholm)

> **Advanced financial sentiment analysis tool with policy impact assessment, intelligent caching, and professional dashboard interface.**

## 🚀 Quick Start

### Installation

```bash
# From PyPI
pip install stockholm-finance

# From source
git clone https://github.com/aykaym/stockholm.git
cd stockholm
pip install -e .
```

### Docker

```bash
# Run with Docker
docker run -it ghcr.io/aykaym/stockholm:latest

# Development environment
docker-compose up dev
```

### Command Line Usage

```bash
# Launch the interactive financial analysis dashboard
stockholm-finance

# With options
stockholm-finance --quick      # Quick mode for faster startup
stockholm-finance --verbose    # Verbose output with debug info
```

### Python API Usage

```python
# Launch the dashboard programmatically
from src.core.financial_analyzer import main
main()

# Or use the dashboard directly
from src.ui.textual_dashboard import run_textual_dashboard
run_textual_dashboard()

# With configuration options
from src.ui.textual_dashboard import run_enhanced_textual_dashboard
run_enhanced_textual_dashboard(quick_mode=True, verbose=True)
```

## ✨ Features

### 🎯 **Core Analysis**
- **Sentiment Analysis**: Advanced NLP for market sentiment from news articles
- **Policy Analysis**: Government policy impact assessment on markets
- **Multi-Ticker Support**: Analyze sentiment across multiple stocks simultaneously
- **Real-time Data**: Live market data integration with yfinance

### 💾 **Smart Caching**
- **TTL-based Caching**: Intelligent cache expiration (15min news, 5min prices)
- **Performance Optimization**: 50+ cache reads/second, 20+ writes/second
- **Storage Efficiency**: Compressed JSON storage with automatic cleanup

### 📊 **Interactive Dashboard**
- **Professional TUI**: Rich terminal interface with real-time updates
- **Multiple Views**: Ticker info, earnings data, price charts, sentiment analysis
- **Responsive Design**: Adaptive layouts for different terminal sizes

### 🧪 **Enterprise Testing**
- **37+ Tests**: Comprehensive test suite with 100% pass rate
- **Coverage**: 80% cache manager, 68% policy analyzer, 39% sentiment analyzer
- **Performance**: Benchmarked at 10+ articles/second processing

## 📋 Requirements

- **Python**: 3.8 or higher
- **Dependencies**: See `requirements.txt`
- **Optional**: Docker for containerized deployment

## 🏗️ Architecture

```
stockholm/
├── src/
│   ├── core/           # Core analysis engines
│   ├── data/           # Data fetching and caching
│   ├── ui/             # User interface components
│   └── config/         # Configuration management
├── tests/              # Comprehensive test suite
├── docs/               # Documentation
├── scripts/            # DevOps and utility scripts
└── .github/            # CI/CD workflows
```

## 🧪 Testing

```bash
# Run all tests
python -m pytest tests/ -v

# With coverage
python -m pytest tests/ --cov=src --cov-report=html

# Performance tests
python -m pytest tests/test_performance.py -v

# Use the coverage checker
python check_coverage.py
```

## 🚀 Development

### Local Setup

```bash
# Clone repository
git clone https://github.com/yourusername/stockholm.git
cd stockholm

# Create virtual environment
python -m venv venv
source venv/bin/activate  # Linux/Mac
venv\Scripts\activate     # Windows

# Install dependencies
pip install -r requirements.txt
pip install -e ".[dev]"

# Run tests
python -m pytest tests/ -v
```

### Docker Development

```bash
# Development environment
docker-compose up dev

# Run tests in container
docker-compose up test

# Code quality checks
docker-compose up quality
```

## 📦 Releases

### Automated Releases

The project uses automated versioning and releases:

```bash
# Create new release
python scripts/release.py

# Choose release type:
# - patch: Bug fixes (1.0.0 → 1.0.1)
# - minor: New features (1.0.0 → 1.1.0)  
# - major: Breaking changes (1.0.0 → 2.0.0)
```

### CI/CD Pipeline

- ✅ **Automated Testing**: All Python versions (3.8-3.12)
- ✅ **Security Scanning**: Bandit + Safety vulnerability checks
- ✅ **Code Quality**: Black, isort, flake8, mypy
- ✅ **Docker Images**: Multi-platform builds
- ✅ **GitHub Releases**: Automatic changelog generation

## 📊 Performance

### Benchmarks

- **Sentiment Analysis**: 10+ articles/second
- **Cache Performance**: 50+ reads/second, 20+ writes/second
- **Memory Usage**: <100MB for 1000 articles
- **Test Suite**: 37 tests in <1 second

### Scalability

- **Concurrent Processing**: Multi-threaded analysis support
- **Batch Operations**: Efficient bulk data processing
- **Memory Efficient**: Optimized for large datasets

## 🔒 Security

- **Dependency Scanning**: Automated vulnerability checks
- **Code Analysis**: Static security analysis with Bandit
- **Input Validation**: Sanitized data processing
- **No Secrets**: No hardcoded API keys or credentials

## 📖 Documentation

- **[Complete Documentation](docs/README.md)**: Comprehensive user guide
- **[Testing Guide](docs/TESTING.md)**: Testing strategy and coverage
- **[DevOps Guide](docs/DEVOPS.md)**: CI/CD and deployment
- **[Coverage Report](docs/COVERAGE.md)**: Code coverage analysis

## 🤝 Contributing

1. **Fork** the repository
2. **Create** a feature branch (`git checkout -b feature/amazing-feature`)
3. **Make** your changes with tests
4. **Run** quality checks (`black src/ tests/ && pytest`)
5. **Commit** your changes (`git commit -m 'Add amazing feature'`)
6. **Push** to the branch (`git push origin feature/amazing-feature`)
7. **Open** a Pull Request

## 📄 License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## 🙏 Acknowledgments

- **TextBlob**: Natural language processing
- **yfinance**: Financial data API
- **Textual**: Modern terminal UI framework
- **Rich**: Beautiful terminal formatting
- **pytest**: Testing framework

## 📞 Support

- **Issues**: [GitHub Issues](https://github.com/aykaym/stockholm/issues)
- **Discussions**: [GitHub Discussions](https://github.com/aykaym/stockholm/discussions)
- **Documentation**: [Project Docs](docs/README.md)

---

**Built with ❤️ for the financial analysis community**
