Commit Graph

5 Commits (c3a266f6d92313e804312ad98e39d178ff47b076)

Author SHA1 Message Date
Amir Alexander Abdelbaki c3a266f6d9 Backfill a week of market history on first startup; UI polish
Backend: backfill_market_history() fetches 7 days of hourly price bars per
instrument on first container start (skipped once an instrument has more
than a day of real history, so restarts don't re-run it) and runs the same
spike-detection logic retroactively, so the Economic Incident History view
is already populated instead of empty for a week. Runs as a genuine
one-time APScheduler job, separate from the recurring polls.

Also: FROZEN/ERROR overlay badges on market ticker items (MOEX's known-stale
Yahoo feed, and any instrument whose last poll actually failed), each
labeled with the instrument name; a big magenta date/time heading per
economic incident; and the incident article list is now a collapsed
fold-out (some incidents merge to 60 stories) instead of always fully
expanded.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Um48tTvZDrEgDeweFyhPYC
2026-07-20 15:44:53 +02:00
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 8e2c5efdbe Add flights overlay, globe icon sprites, and economic incident history
Flights: live OpenSky global air traffic as airplane-icon sprites, magenta
for heuristically-flagged military aircraft vs. globe-tint violet for
civilian, with a military-only filter and hover tooltips.

Globe rendering: news clusters and conflict events switch from three-globe's
built-in point/ring primitives to a custom Sprite-based objects layer so
they render as tinted newspaper/helmet icons respectively, while keeping
existing click/hover behavior and the conflict pulsing-ring effect.

Economic Incident History: a dedicated view (new top-left "i" button) listing
every detected market spike with a full-clock-hour correlation window and
the complete list of articles published in it, not just a relevance-capped
preview.

Also: LXC/Proxmox deployment scripts (deploy/lxc/) driven by a gitignored
prebuild-config.json, and three additional RSS sources (CNN, Jacobin, Der
Standard).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Um48tTvZDrEgDeweFyhPYC
2026-07-20 14:31:21 +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