Metadata-Version: 2.4
Name: my-stock-analyser
Version: 0.1.1
Summary: A comprehensive stock analysis tool with technical and fundamental analysis capabilities
Home-page: https://github.com/pranavp87/my_stock_analyser
Author: Pranav Phalnikar
Author-email: Your Name <your.email@example.com>
License: MIT
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Financial and Insurance Industry
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: Topic :: Office/Business :: Financial :: Investment
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pandas>=1.3.0
Requires-Dist: numpy>=1.21.0
Requires-Dist: yfinance>=0.1.70
Requires-Dist: plotly>=5.3.0
Requires-Dist: python-dotenv>=0.19.0
Requires-Dist: requests>=2.26.0
Requires-Dist: beautifulsoup4>=4.10.0
Requires-Dist: html5lib>=1.1
Requires-Dist: jinja2>=3.0.0
Requires-Dist: pydantic>=1.8.0
Requires-Dist: python-dateutil>=2.8.2
Requires-Dist: pytz>=2021.3
Requires-Dist: tqdm>=4.62.0
Provides-Extra: dev
Requires-Dist: pytest>=6.2.5; extra == "dev"
Requires-Dist: pytest-cov>=2.12.1; extra == "dev"
Requires-Dist: black>=21.12b0; extra == "dev"
Requires-Dist: isort>=5.10.1; extra == "dev"
Requires-Dist: flake8>=4.0.1; extra == "dev"
Requires-Dist: mypy>=0.910; extra == "dev"
Requires-Dist: pre-commit>=2.15.0; extra == "dev"
Dynamic: author
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-python

# My Stock Analyser

A comprehensive stock analysis tool that provides technical and fundamental analysis of stocks with beautiful visualizations and email reporting capabilities.

## Features

- Fetch historical stock data from multiple sources
- Perform technical analysis (RSI, MACD, Moving Averages, etc.)
- Generate detailed HTML reports with interactive charts
- Email reports with embedded visualizations
- Support for NIFTY 50 index analysis
- Cache system to minimize API calls

## Installation

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

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

3. Install the package in development mode:
   ```bash
   pip install -e .
   ```

## Configuration

1. Copy the example environment file and update it with your API keys:
   ```bash
   cp .env.example .env
   ```

2. Edit the `.env` file with your configuration:
   ```
   # Alpha Vantage API (https://www.alphavantage.co/support/#api-key)
   ALPHA_VANTAGE_API_KEY=your-api-key-here

   # Email Configuration (Gmail recommended)
   SENDER_EMAIL=your-email@example.com
   SENDER_PASSWORD=your-app-password
   ```

   Note: For Gmail, you may need to generate an "App Password" if 2FA is enabled.

## Usage

### Command Line Interface

```bash
# Analyze top 10 BSE stocks and generate a report
stock-analyzer --top 10

# Analyze specific stocks
stock-analyzer --stocks RELIANCE.NS TCS.NS HDFCBANK.NS

# Analyze NIFTY 50 index
stock-analyzer --stocks ^NSEI

# Send report via email
stock-analyzer --stocks RELIANCE.NS --email your-email@example.com

# Set number of days for analysis (default: 365)
stock-analyzer --stocks RELIANCE.NS --days 180
```

### Python API

```python
from my_stock_analyser.analyzer import StockAnalyzer

# Create an analyzer instance
analyzer = StockAnalyzer()

# Analyze a stock
result = analyzer.analyze_stock("RELIANCE.NS", days=365)

# Generate a report
report_path = analyzer.generate_report([result])

# Send report via email
analyzer.send_report("your-email@example.com", [result])
```

## Project Structure

```
my_stock_analyser/
├── src/                    # Source code
│   ├── my_stock_analyser/  # Main package
│   │   ├── __init__.py
│   │   ├── cli.py         # Command line interface
│   │   ├── data_fetcher.py # Data collection
│   │   ├── analysis.py    # Analysis logic
│   │   ├── visualization.py # Chart generation
│   │   ├── report_generator.py # Report creation
│   │   └── email_sender.py # Email functionality
│   └── tests/             # Unit tests
├── data/                  # Data storage
│   └── cache/             # Cached stock data
├── reports/               # Generated reports
│   └── charts/            # Chart visualizations
├── docs/                  # Documentation
├── .env.example           # Example environment variables
├── .gitignore             # Git ignore file
├── setup.py               # Package installation
└── README.md              # This file
```

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

1. Fork the repository
2. Create your feature branch (`git checkout -b feature/AmazingFeature`)
3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request

## License

Distributed under the MIT License. See `LICENSE` for more information.

## Contact

Pranav Phalnikar - pranavphalnikar@gmail.com

Project Link: [https://github.com/pranavp87/my_stock_analyser](https://github.com/pranavp87/my_stock_analyser)
