Skip to content

πŸ“° Tickermood – Python-powered 🐍 sentiment engine for stocks πŸ“Š. Scrapes news 🌐, uses local LLMs πŸ€– to summarize & rate sentiment πŸ˜ƒπŸ˜‘, gives buy/sell calls πŸ’Ή with targets 🎯, and stores results πŸ“‚ for screening βš‘β€”all on Ollama πŸ¦™.

Notifications You must be signed in to change notification settings

andoludo/tickermood

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

103 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

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 and LangGraph frameworks to generate sentiment scores for given tickers.


πŸ“¦ Installation

Install Tickermood via pip:

pip install tickermood

Note: To use Tickermood locally, Ollama must be installed and qwen3:4b model needs to be available.

ollama pull qwen3:4b

πŸš€ Usage

Programmatic Usage

from tickermood import TickerMood

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

CLI Usage

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


πŸ—ƒοΈ 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:

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

πŸ“ License

MIT License

About

πŸ“° Tickermood – Python-powered 🐍 sentiment engine for stocks πŸ“Š. Scrapes news 🌐, uses local LLMs πŸ€– to summarize & rate sentiment πŸ˜ƒπŸ˜‘, gives buy/sell calls πŸ’Ή with targets 🎯, and stores results πŸ“‚ for screening βš‘β€”all on Ollama πŸ¦™.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published