Metadata-Version: 2.3
Name: tickermood
Version: 0.19.0
Summary: 
Author: aan
Author-email: andoludovic.andriamamonjy@gmail.com
Requires-Python: >=3.10,<4.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Dist: alembic (>=1.14.0,<2.0.0)
Requires-Dist: googlesearch-python (>=1.3.0,<2.0.0)
Requires-Dist: langchain (>=0.3.25,<0.4.0)
Requires-Dist: langchain-ollama (>=0.3.3,<0.4.0)
Requires-Dist: langchain-openai (>=0.3.18,<0.4.0)
Requires-Dist: langgraph (>=0.4.7,<0.5.0)
Requires-Dist: lxml (>=5.4.0,<6.0.0)
Requires-Dist: lxml-html-clean (>=0.4.2,<0.5.0)
Requires-Dist: newspaper3k (>=0.2.8,<0.3.0)
Requires-Dist: ollama (>=0.4.8,<0.5.0)
Requires-Dist: openai (>=1.79.0,<2.0.0)
Requires-Dist: pandas (>=2.1.4,<3.0.0)
Requires-Dist: pydantic (>=2.5.3,<3.0.0)
Requires-Dist: pydotenv (>=0.0.7,<0.0.8)
Requires-Dist: python-dotenv (>=1.0.1,<2.0.0)
Requires-Dist: selenium (>=4.32.0,<5.0.0)
Requires-Dist: sqlmodel (>=0.0.22,<0.0.23)
Requires-Dist: typer (>=0.13.1,<0.14.0)
Requires-Dist: undetected-chromedriver (>=3.5.5,<4.0.0)
Requires-Dist: webdriver-manager (>=4.0.2,<5.0.0)
Requires-Dist: yfinance (>=0.2.63,<0.3.0)
Description-Content-Type: text/markdown

# Tickermood

**Tickermood** is a Python package that provides market sentiment analysis for stock tickers based on news from multiple sources. It combines web scraping techniques with large language models (LLMs) using the [LangChain](https://www.langchain.com/) and [LangGraph](https://www.langgraph.dev/) frameworks to generate sentiment scores for given tickers.

---

## 📦 Installation

Install Tickermood via pip:

```bash
pip install tickermood
```

> **Note**: To use Tickermood locally, [Ollama](https://ollama.com/) must be installed and qwen3:4b model needs to be available.

```bash
ollama pull qwen3:4b
```
---

## 🚀 Usage

### Programmatic Usage

```python
from tickermood import TickerMood

ticker_mood = TickerMood.from_symbols(["AAPL", "GOOGL", "MSFT"])
ticker_mood.run()
```

### CLI Usage

```bash
tickermood AAPL GOOGL MSFT
```

This will:
- Fetch the latest news for the specified tickers
- Run LLM agents to analyze the news
- Provide a sentiment score for each ticker

Results are stored in a SQLite database.

![Tickermood Output](docs/img/img.png)

---

## 🗃️ Database

Tickermood creates a SQLite database in the current directory named `tickermood.db` if it doesn't already exist. It includes:
- Sentiment ratings (e.g., Buy, Hold, Sell)
- Price targets
- Summaries of the fetched news articles

---

## ⚙️ LLM Backend Options

### Default: Local LLM (Ollama)
- Runs LLMs locally for free
- Performance depends on your hardware

### Optional: OpenAI API
- Requires setting the `OPENAI_API_KEY` environment variable

Or, pass the key via CLI:

```bash
tickermood AAPL GOOGL MSFT --openai_api_key_path /path/to/openai_api_key.txt
```

---

## 📝 License

MIT License
