Beyond A Stock Ticker: Build An ESP32 AI Stock Analyzer
Updated: Sep 25

Build a DIY ESP32 stock analyzer that turns one ticker into a structured fundamental report on an NM-CYD-C5 touchscreen and in Telegram.
Unlike a basic ESP32 stock ticker that only displays price, this system retrieves current financial data, calculates a transparent score, identifies strengths and risks, and uses local Ollama to explain the verified result.
This beginner guide covers the complete build, from installation to first analysis (Code, calculation logic and a step-by-step guide are included).
Key Takeaways
One ESP32 stock-analysis engine serves two interfaces: a Telegram bot on your phone and an NM-CYD-C5 touchscreen powered by USB or a power bank.
Python calculates the 0–100 fundamental score from financial data; Ollama only explains the verified result and cannot change the rating.
The CYD stores no FMP or Telegram secrets. Those remain in a private .env file on the Mac.
The finished project evaluates quality, financial health, valuation, cash generation, and analyst-target context while clearly reporting its limitations.
Why I Built This Project
I worked as an investment analyst for many years across investment banks, second-tier banks, and brokerage companies. During that time, I analyzed listed businesses, financial statements, valuation multiples, balance-sheet risk, and market expectations. I also built several tools for equity investors, including the Stocks2Buy platform and app.
More recently, I started learning electronics. The NM-CYD-C5 immediately suggested a useful experiment: could I combine my finance background with a compact ESP32 touchscreen and a local language model? The result moves beyond a novelty stock-market display. It is a working fundamental-analysis terminal with the same output available through Telegram.
The project is designed for traders, investors, investment analysts, and electronics beginners. It demonstrates APIs, Python services, local AI, secure configuration, Wi-Fi communication, ESP32 programming, touch interfaces, and practical debugging in one build.
Final device demo

Device video demo
What This AI Stock Analyzer Does
The user enters a ticker such as AAPL, MSFT or KO. The Mac requests three datasets from the API endpoint, applies a fixed scoring model, and sends the verified data to Ollama for a short interpretation.
The report contains a 0–100 score, an overall conclusion, data coverage, quality, leverage, liquidity, valuation and cash-flow metrics, rule-based strengths and risks, unscored analyst-target context, an Ollama interpretation, and explicit limitations.
Telegram and the CYD call the same AnalysisService, so the calculation is consistent across both interfaces. A ten-minute cache also prevents the same ticker from unnecessarily consuming another full set of API requests. The result combines a DIY stock ticker, a Telegram stock bot, and local AI stock analysis in one practical build.
How The ESP32 Stock Analyzer Works
Component | Responsibility |
API endpoint provider. | Supplies current TTM metrics, ratios, and price-target summaries |
Python service on the Mac | Validates tickers, requests financial data, calculates the score, caches results, and serves both interfaces |
Ollama | Runs the local analyst model and explains the verified result |
Telegram bot | Accepts tickers remotely and returns the complete report |
NM-CYD-C5 | Provides Wi-Fi setup, an on-screen ticker keyboard, and paginated results |
The CYD is a client, not the server. After flashing, it can run from a power bank without a USB connection to the Mac. The Mac must remain on, awake, online, and running Ollama plus bot.py.
Telegram works differently. Your phone can be outside the house and connected through mobile data because Telegram carries the message to the bot process running on the Mac. The Mac still has to remain online.



