Skip to content

News & Sentiment

The News section adds a contextual layer to EPF: a continuously refreshed feed of energy market headlines, each scored by an automated sentiment analysis. It answers a question the price chart cannot — why the market might be moving the way it is.

Where you see it

The news layer appears in three places throughout the dashboard.

1. News panel on the Home page

The right-hand column of the Home page includes a compact Market News panel showing the 10 most recent relevant headlines. Each item displays:

  • A colored sentiment dot (green = positive, grey = neutral, red = negative)
  • The publishing source (e.g. Reuters, Politico, MSN)
  • Relative time (“2h ago”)
  • The headline (clipped to 2 lines)

Click any headline to open the full article in a new tab. Click “View all →” to jump to the dedicated News page.

2. The dedicated News page

Accessible from the sidebar (newspaper icon, between Price Drivers and Storage), the Market News page is a full-width view of all collected articles with:

  • A 24-hour sentiment summary bar at the top showing the average sentiment label, article count, and the dominant tags (e.g. #gas #outage #renewable)
  • A filter bar to narrow the feed:
    • Source dropdown (filter by publisher)
    • Date range buttons (Today / Last 7 days / Last 30 days)
    • Tag chips for multi-select tag filtering
  • An article list showing each item with sentiment, source, time, sentiment score, tags, headline, and a 2-line body excerpt

3. Sentiment badge on Price Drivers

The Price Drivers page includes an inline pill in the summary panel header that surfaces the 24-hour sentiment at a glance:

📰 News NEGATIVE · 9 #gas #outage

The badge color matches the sentiment label. Clicking it routes to the full News page. It hides itself if zero articles have been collected in the last 24 hours.

How sentiment is calculated

EPF uses a fully local, zero-cost natural language pipeline. No external AI APIs are called — every score is computed on the EPF server using two open-source components.

Step 1: Source ingestion

Two Google News RSS queries are polled every 15 minutes:

Query focusCatches
Iberian electricity marketSpain power, OMIE, “iberian market” coverage from Reuters, Politico, MSN, Recharge News, Euractiv, etc.
Operators & regulatorsRed Eléctrica, ENTSO-E reports, regulatory announcements

Google News is used as the aggregator because direct publisher RSS feeds are either offline (ENTSO-E) or paywalled (Reuters Energy). The actual publisher name is parsed from each article title.

Step 2: Relevance filtering

Each fetched article is scored against a curated keyword dictionary spanning 5 categories:

CategoryExample keywords
Core electricityelectricity, power, grid, kWh, MWh, blackout, outage
Fuelgas, TTF, LNG, coal, carbon, ETS, oil, Brent
Renewableswind, solar, hydro, photovoltaic, battery, storage
Nuclearnuclear, reactor, EDF, uranium
MarketsOMIE, EPEX, ENTSO-E, interconnection, day-ahead, intraday, balancing

To pass the filter, an article must:

  1. Mention at least one Spain-specific keyword (Spain, Spanish, Iberian, OMIE, Red Eléctrica, etc.)
  2. Match at least 2 of the 5 categories

This combination filters out roughly 90% of the raw RSS feed (sports, politics unrelated to energy, US-only headlines, etc.) while keeping the signal-rich Iberian energy news.

The article’s relevance_score is the fraction of categories matched (0.0 to 1.0). Higher scores indicate more deeply on-topic articles.

Step 3: Sentiment scoring

Each kept article’s headline is scored by VADER (Valence Aware Dictionary and sEntiment Reasoner), a rule-based sentiment analyzer designed for short-form text like news headlines.

VADER returns a compound score between −1.0 (most negative) and +1.0 (most positive), based on a lexicon of words with associated valence weights and a set of grammatical rules for negation, intensifiers (“very”, “extremely”), and contrastive conjunctions (“but”). EPF then maps the compound score to a label:

Compound scoreLabelColor
≥ +0.05POSITIVEGreen
−0.05 to +0.05NEUTRALGrey
≤ −0.05NEGATIVERed

VADER scores the headline only, not the article body. RSS bodies tend to be either boilerplate or truncated, and the headline is what an analyst actually reads when scanning a feed.

Step 4: Tag extraction

A keyword-to-tag dictionary assigns each article one or more tags from a fixed vocabulary:

TagTriggers on
nuclearnuclear, reactor, uranium
gasgas, TTF, LNG
renewablewind, solar, photovoltaic
regulationregulator, policy, subsidy, tariff, law
outageoutage, blackout, shutdown, maintenance, force majeure
weatherheatwave, cold snap, storm, drought
carboncarbon, ETS, emissions
interconnectioninterconnection, interconnector, cross-border
intradayintraday, balancing, ancillary
spikesurge, spike, record high, soar
negativenegative price

An article can carry multiple tags. Tags drive the filter chips on the News page and the dominant-tags display in the sentiment badge.

How to read the sentiment label

The sentiment label is a sentiment about the news content itself, not a direct prediction of price direction. Headlines with negative sentiment (outages, blackouts, regulatory penalties, supply disruptions) often correlate with upward price pressure, but the relationship is not mechanical.

A few examples to build intuition:

HeadlineVADER labelWhat it suggests
”Spain has Europe’s cheapest electricity”NEGATIVEVADER reads “cheapest” as a negative valence word, even though the market implication is positive. Read scores in context — sentiment ≠ price direction.
”Iberian blackout caused by voltage control failure”NEGATIVEA genuinely negative event with likely upward price impact.
”Spain announces tax cuts on fuel and electricity”POSITIVEGenuinely positive — relief measures during a crisis.
”Wind and solar break new generation record”POSITIVERenewable surplus typically pushes prices down.

This is why the dashboard shows the label, the article count, and the dominant tags together — the tags often clarify what kind of story is driving the sentiment in either direction. A “NEGATIVE / 12 articles / #gas #outage” snapshot is more actionable than the label alone.

What it is not (yet)

The current News & Sentiment layer is display-only. The model that produces the day-ahead and strategic price forecasts does not consume sentiment as a feature. EPF deliberately ships the data layer first so the team can validate offline whether sentiment movements actually predict price residuals before wiring them into the model.

If validation shows a useful signal, a future version of the production model may incorporate sentiment as one of its inputs. Until then, the news feed is exactly what it appears to be: a contextual reference for human analysts working alongside the forecast.

Refresh cadence

LayerFrequency
Backend collection cronEvery 15 minutes
Frontend polling (all 3 surfaces)Every 5 minutes

If a story breaks and matches the relevance filter, it will appear in the dashboard within ~20 minutes of publication on the originating site (Google News indexing latency + EPF cron + frontend poll).

Coverage and limitations

  • Spain only. Multi-country news (Portugal, France, Germany) is on the roadmap for the next phase.
  • English-language sources. The Google News queries are configured for English coverage; Spanish-language outlets are surfaced when an English version exists. A Spanish-language pass is on the wishlist.
  • Headlines, not full articles. Sentiment is scored on headlines only. The body excerpt shown on the News page is whatever the RSS feed exposes (usually a 1–2 sentence summary).
  • VADER is a rule-based scorer. It catches sentiment about 70% of the time on news headlines and can be fooled by industry-specific jargon (the “cheapest electricity” example above). Treat the label as a hint, not an oracle.
  • Price Drivers — commodities, weather, generation mix, and demand. The sentiment badge in the Price Drivers header summarizes the 24-hour news context for the same period.
  • Market Price — the forecast itself. Sentiment is currently a sibling, not an input.