Noureddine RAMDI / PokieTicker: layered AI-driven stock market analysis with sentiment and XGBoost

Created Tue, 05 May 2026 13:37:39 +0000 Modified Sat, 23 May 2026 20:41:27 +0000

owengetinfo-design/PokieTicker

PokieTicker tackles a common challenge in algorithmic trading and financial analysis: how to correlate stock price movements with news events effectively, without relying on costly real-time APIs or overly complex setups. Its approach combines several AI techniques in a layered pipeline that balances cost, accuracy, and depth of insight.

What PokieTicker does and how it is built

At its core, PokieTicker is a full-stack application for stock market analysis that merges price data with news-driven sentiment analysis to predict short-term price directions. It uses Python for the backend and React with Vite and D3.js for a responsive frontend visualization.

The backend is powered by FastAPI and backed by a SQLite database preloaded with a substantial historical dataset: over 51,000 OHLC (open-high-low-close) price rows, 61,000 raw news articles, and almost 100,000 processed analysis results. This means users can run the system locally without needing API keys or external data sources.

The news processing pipeline is the standout architectural feature. It processes news in three layers:

  • Layer 0: Rule-based filtering rejects about 17% of articles upfront based on heuristics, reducing noise early.

  • Layer 1: A batch sentiment analysis using Anthropic’s Claude Haiku model scores batches of 50 articles, providing a scalable way to process sentiment efficiently.

  • Layer 2: On-demand deep analysis with Claude Sonnet offers a more nuanced sentiment and thematic understanding for selected articles.

These layers feed into an XGBoost classifier that ingests 31 engineered features combining news sentiment scores and technical indicators. This model predicts whether the stock price will move up or down at future horizons of 1, 3, and 5 days.

Additionally, the system uses cosine similarity pattern matching to find historical analogs, helping contextualize current movements with past events.

The frontend visualizes all this with interactive candlestick charts overlaid with news events, powered by D3.js, making the data accessible and actionable.

The layered AI pipeline and practical tradeoffs

What distinguishes PokieTicker is its pragmatic multi-layer news processing pipeline. Instead of an expensive real-time LLM call for every article, it filters and batches intelligently:

  • The rule-based filter is a low-cost, high-speed gatekeeper removing irrelevant news early, which improves overall precision.

  • The batch sentiment scoring balances throughput and cost by analyzing articles in groups rather than individually.

  • The on-demand deep analysis is reserved for cases where more detailed sentiment understanding is valuable, optimizing resource use.

This approach is a clear tradeoff: it reduces API calls and cost while retaining depth where it counts. The code quality appears solid, with clear separation of concerns between these layers visible in the backend modules.

The use of XGBoost for price direction prediction is a sensible choice given its efficiency and strong performance on tabular data. Combining 31 features blending news sentiment and technical indicators illustrates a thoughtful feature engineering effort.

Limitations include the reliance on pre-existing historical data, which means the system is not designed for real-time trading out of the box. Also, sentiment analysis depends heavily on Claude models, so the quality and biases of those models influence results.

Overall, PokieTicker exemplifies how to build a cost-effective, AI-powered financial analysis tool without the complexity or expense of continuous real-time data feeds.

Quick start with PokieTicker

The repo ships with a pre-built SQLite database (pokieticker.db) containing extensive historical price and news data plus analysis results, allowing you to run the app immediately.

To get started:

git clone https://github.com/owengetinfo-design/PokieTicker.git
cd PokieTicker

This minimal setup avoids the usual hassle of API keys or data ingestion.

Once running, explore the FastAPI backend endpoints and the React frontend to visualize price movements linked with sentiment signals and news overlays.

Verdict: a practical AI-driven stock analysis toolkit for practitioners

PokieTicker is a solid example of combining LLM-driven sentiment analysis with traditional machine learning for stock price prediction, wrapped in a full-stack app with local execution.

It’s particularly relevant for developers and data scientists who want a ready-to-run system demonstrating layered AI pipelines and thoughtful feature engineering without relying on costly real-time APIs.

The tradeoff is clear: it’s not a high-frequency trading system but a research and analysis toolkit designed for post-facto or near-term horizon predictions.

If you’re interested in exploring how to integrate LLM sentiment analysis into financial ML workflows with practical cost controls, PokieTicker is worth your time. The pre-built database and local execution mean you can focus on understanding the AI layers and prediction mechanics rather than data plumbing.

The codebase is approachable for Python developers familiar with FastAPI and React, and the layered design offers a valuable blueprint for scalable LLM integration in other domains.


→ GitHub Repo: owengetinfo-design/PokieTicker ⭐ 676 · Python