Commit Graph

3 Commits (main)

Author SHA1 Message Date
Amir Alexander Abdelbaki 54022ad66f Volatility-adaptive spike detection + multi-instrument overlay charts
Spike detection now requires a move to clear an absolute floor AND (once
there's enough price history) be a configurable multiple of that
instrument's own recent typical move — MARKET_SPIKE_VOLATILITY_MULTIPLIER,
_recent_volatility() in markets.py — so a routinely volatile instrument
needs a bigger move to register than a normally-calm one, instead of one
fixed percentage for everything. Falls back to the floor alone until
there's enough history.

Economic Incident History: each incident gets two lazy-loaded overlay
charts (all tracked instruments, and just the incident's own), each
instrument normalized to % change from the window start so they're
comparable despite very different price scales/currencies — makes it easy
to see whether a move was isolated or broad, and to spot counter-reactions.
Backend: /api/markets/history now accepts an explicit start/end window
alongside the existing hours= param.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Um48tTvZDrEgDeweFyhPYC
2026-07-20 15:21:37 +02:00
Amir Alexander Abdelbaki b8adc70092 Add heuristic incident correlation, IRNA source, flatten news icon color
Economic Incident History: each spike now gets "likely factors" — plain
word-frequency across every headline in its window, stopwords dropped
(English + German), no AI/LLM involved (new backend/app/textutil.py, shared
with the existing cluster-topic labeling). Spikes across instruments within
an hour of each other now merge into one incident (new
GET /api/markets/incidents) rather than showing WTI/Brent-style correlated
moves as separate entries.

Also: IRNA (Iranian state news agency) added as a source; news cluster
icons flattened from a violet->pink gradient to a single bright magenta for
legibility against the globe's own violet tint (size still scales with
article count); lightweight column-migration mechanism in db.py so the new
MarketSpike field doesn't break existing deployments' SQLite files.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Um48tTvZDrEgDeweFyhPYC
2026-07-20 14:49:09 +02:00
Amir Alexander Abdelbaki d52cb8b12e Initial commit: NewsAtlas news globe
nginx-fronted stack that pulls RSS from an ideologically mixed set of
outlets, geocodes stories onto a 3D globe with zoom-adaptive clustering,
tracks market/oil prices with spike-to-article correlation, and overlays
weather, conflict events, Wikipedia lookups, and parliament diagrams.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Um48tTvZDrEgDeweFyhPYC
2026-07-20 13:49:00 +02:00