Guru Meditation/work/Trading Sentiment
Applied AI · real-time signals

Trading Sentiment

A real-time financial-sentiment microservice that reads new articles, resolves the companies and tickers behind them, scores each one with a local LLM, and turns it into live trading signals streamed sub-second.

realtimevLLM · GemmaWebSocket + SSENordic + forex

01Overview

Trading Sentiment watches the articles coming out of the content-extraction system, figures out which companies and tickers each one is about, scores it bullish or bearish with a local LLM — confidence and key factors included — and converts that into live BUY / SELL / HOLD calls for stocks and LONG / SHORT for forex, streamed over WebSocket and SSE to trading bots, dashboards and alert systems.

02The problem it solves

News moves markets, but raw news is unstructured, multilingual, and ambiguous about what it's even referring to — "Nokia" might be the Helsinki listing or the town. A trading desk needs the signal, not the article: which instrument, which direction, how confident, and fast enough to act on. This service turns a stream of articles into a stream of structured, instrument-resolved signals, with the LLM running locally so the cost of scoring every article stays bounded.

Result market-moving news becomes a tradeable, instrument-resolved signal in under a second.

03What we built

It polls the content-extraction database roughly every 10 seconds, taking batches of about 20 articles across six languages (en, fi, sv, no, da, de), and runs each through a pipeline:

  • Ticker / company extraction — a dictionary for known Nordic names, regex for explicit tickers like $AAPL or NOKIA.HE, and the LLM for private or implied references.
  • Financial analysis — a local LLM (vLLM serving Gemma) produces a bullish_score, a confidence, and key_factors.
  • Direction classification — >0.6 bullish, <0.4 bearish, otherwise neutral.
  • Signal — the resolved instrument plus direction becomes a tradeable signal.

Markets covered

60+ Nordic stocks across Helsinki (.HE), Stockholm (.ST), Oslo (.OL) and Copenhagen (.CO), US and global stocks, and 14 forex pairs spanning majors, Nordic and crosses.

Outputs

A REST API (flash / latest / tickers / sentiment per ticker plus history), and WebSocket and SSE channels for sub-second updates. Stocks resolve to BUY / SELL / HOLD; forex to LONG / SHORT. The consumers are trading bots, dashboards and alert systems.

04Where it fits

Trading Sentiment is the bridge between two other studio systems: it feeds on the Universal Content Extractor's article stream and produces the kind of structured sentiment a trading agent can fold in as one input among many. It's deliberately a microservice — one job, done in real time, behind a clean API.

05Tech

FastAPI PostgreSQL Redis (pub/sub + cache) vLLM serving Gemma WebSocket SSE 6 languages
CadencePolls DB ~10s, batch ~20
Languagesen · fi · sv · no · da · de
Markets60+ Nordic, US/global, 14 forex pairs
SignalsBUY/SELL/HOLD · LONG/SHORT
DeploymentRealtime microservice

06Highlights

  • Instrument resolution that combines a Nordic-name dictionary, ticker regex and an LLM for implied references.
  • Local-LLM scoring (vLLM / Gemma) returning a bullish score, confidence and key factors.
  • Sub-second delivery over WebSocket and SSE, plus a REST API with per-ticker history.
  • Nordic-focused coverage (Helsinki, Stockholm, Oslo, Copenhagen) plus US/global stocks and 14 forex pairs.
  • Feeds trading bots, dashboards and alert systems from one clean microservice.

Related work