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 and LangGraph frameworks to generate sentiment scores for given tickers.
Install Tickermood via pip:
pip install tickermoodNote: To use Tickermood locally, Ollama must be installed and qwen3:4b model needs to be available.
ollama pull qwen3:4bfrom tickermood import TickerMood
ticker_mood = TickerMood.from_symbols(["AAPL", "GOOGL", "MSFT"])
ticker_mood.run()tickermood AAPL GOOGL MSFTThis 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 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
- Runs LLMs locally for free
- Performance depends on your hardware
- Requires setting the
OPENAI_API_KEYenvironment variable
Or, pass the key via CLI:
tickermood AAPL GOOGL MSFT --openai_api_key_path /path/to/openai_api_key.txtMIT License
