An AI-related concept ranks second on the one-hour heat board and eleventh on the three-day board. Is that a sudden burst, or a theme cooling off? Usually it is neither. It is two rolling windows measuring different things, and the gap only becomes a story when someone compares them without checking that the comparison is valid.

This article treats a sector heat rolling window comparison like code under test. Instead of a reading checklist, we write assertions: a capture function that pulls all windows for one theme, a set of checks that must pass before anyone describes the result, and a small vocabulary for describing the shape once it does. The examples use Lava's concept heat board, and every number is illustrative.

The Data: Concept Heat Board Windows

The entry point is GET /hot/concepts, exposed to agents as the MCP tool get_market_hot_concepts.

Parameter / field Meaning Default Note
window 1h, 4h, 18h, 24h, 3d 24h no 7d on concepts
min_score count only mentions from institutions/KOLs scoring at least this unset scores roughly 450–1500; ~1000 is mid, 1050 is about the top 10%
limit 1–200 50 no offset
mentions times the concept was mentioned in the window — concept-level count
agencies distinct institutions/KOLs mentioning it — deduplicated by anonymous agency_id
heat_chg_1d, heat_chg_3d, heat_z20 statistics — exact formulas in OpenAPI

Three properties matter for cross-window work:

  1. Windows roll back from meta.server_time. 1h is the last hour, 3d the last 72 hours. Short windows are more sensitive to a single long post or one concentrated burst.
  2. The longest concept window is 3d. For weekly or longer views, switch to the daily panel /panel/daily with type=concept.
  3. Overly generic terms are removed before ranking. Names on the board are canonical and can be passed to drill-down endpoints. Removed generic terms never appear in any window, so a cross-window gap is never "explained" by them.

The board refreshes about every 2 minutes. The concept member ranking /concepts/stocks refreshes about every 10 minutes. That timing gap alone explains many "the numbers don't match" reports.

Step 1: Capture All Windows in One Round

# ai_theme_windows.py - illustrative; base URL and token are placeholders import os, requests BASE = os.environ.get("LAVA_BASE", "<YOUR_LAVA_BASE>/subscribe/v1") HEADERS = {"Authorization": "Bearer " + os.environ.get("LAVA_API_KEY", "<YOUR_TOKEN>")} WINDOWS = ("1h", "4h", "18h", "24h", "3d") TARGET = "<canonical concept name copied from the board>" def capture(target, min_score=None, limit=200): snap = {} for w in WINDOWS: params = {"window": w, "limit": limit} if min_score is not None: params["min_score"] = min_score resp = requests.get(BASE + "/hot/concepts", params=params, headers=HEADERS, timeout=60).json() assert resp["ok"], resp.get("code") data = resp["data"] rows = data if isinstance(data, list) else data.get("list", []) # concept-name column assumed to be "concept"; confirm in OpenAPI hit = next(((i + 1, r) for i, r in enumerate(rows) if r.get("concept") == target), None) snap[w] = { "params": params, "server_time": resp["meta"]["server_time"], "request_id": resp["meta"]["request_id"], "rank": hit[0] if hit else None, "mentions": hit[1].get("mentions") if hit else None, "agencies": hit[1].get("agencies") if hit else None, "heat_z20": hit[1].get("heat_z20") if hit else None, } return snap snap = capture(TARGET) 

A rank of None means "not in the top 200 for this window". Record it that way, never as zero.

Step 2: Assertions That Must Pass Before Interpretation

import pandas as pd def check(snap): times = [pd.Timestamp(s["server_time"]) for s in snap.values()] assert max(times) - min(times) < pd.Timedelta(minutes=5), "windows from different rounds" scores = {s["params"].get("min_score") for s in snap.values()} assert len(scores) == 1, "min_score differs across windows" assert all(s["params"]["limit"] == 200 for s in snap.values()), "limit too small" present = [w for w, s in snap.items() if s["rank"] is not None] assert present, "target not found in any window - check the exact name" return True check(snap) 

What each assertion protects against:

  • Same round. Mixing captures from different rounds turns elapsed time into a fake window difference. The five-minute tolerance here is a local choice, not an API rule.
  • Same min_score. One window with a threshold and one without compares two different populations of sources.
  • limit=200. In long windows an AI theme can fall outside the default top 50 and silently disappear.
  • Exact name. Hand-typed aliases such as "AI" versus a longer canonical name fail exact matching. Copy the string from the board and reuse it for /concepts/stocks (concept, up to 30 characters).

Step 3: Describe the Shape with Counts, Not Ranks

Ranks depend on every other concept on the board. mentions and agencies belong to the concept itself, so compute shape from them:

def shape(snap): m24 = snap["24h"]["mentions"] or 0 share_1h = (snap["1h"]["mentions"] or 0) / m24 if m24 else None r1, r3 = snap["1h"]["rank"], snap["3d"]["rank"] if share_1h is not None and share_1h >= 0.15 and (r3 is None or (r1 and r1 < r3)): label = "short-window concentrated" elif r1 and r3 and abs(r1 - r3) <= 3: label = "multi-window aligned" elif r3 and (r1 is None or r3 < r1): label = "long-window accumulated" else: label = "mixed" return share_1h, label 

The 0.15 and 3 thresholds are illustrative; set your own. Keep the vocabulary to these labels. They describe a shape and do not predict what happens next.

Also compare agencies with mentions. High short-window mentions with few agencies means a small number of sources posting heavily. When both rise together, participation is actually broadening.

heat_z20 is window-specific. Always write "24h heat_z20", and never average z-scores across windows, since each comes from a different interval.

Example Readout

window mentions agencies rank
1h 36 9 2
4h 74 21 4
18h 150 52 6
24h 180 63 7
3d 410 118 11

share_1h = 36 / 180 = 0.2, and the short-window rank sits above the long-window rank. A correct description: "1h accounts for about 20% of 24h mentions, with 9 agencies in the hour; shape is short-window concentrated." Anything about where heat "is heading" goes beyond the data.

Step 4: Drill Down Without Breaking the Definition

  • Member stocks: get_concept_stock_heat (/concepts/stocks) uses a day-based days lookback (default 30, max 365), not a rolling window. Pair it with the 24h board using days=1 and with the 3d board using days=3, and state the mapping in your output.
  • Concentration: if the top three members account for most of the concept's mentions, the concept reading is mostly driven by individual-stock events.
  • Double counting: use get_stock_concept_heat (/concepts/by-stock) to see whether a key stock sits under several AI-related concepts at once. Do not add mentions across related concepts, because one message can hit several.
  • Multi-day series: get_stock_heat_panel(type="concept", names=...) on /panel/daily returns calendar-day mentions, agencies and weighted_heat for up to 92 days. Plot it separately; it does not splice onto the rolling 3d window.

Step 5: Persist Every Round

Minimum fields per round: window, min_score, limit, meta.server_time, meta.request_id, concept name, mentions, agencies, heat_chg_1d, heat_chg_3d, heat_z20, rank, plus the computed share_1h and label. Five windows means five billed calls at 0.005 yuan each (non-2xx not billed); get_account (/account) is free and shows the balance.

Agent Version

Run a five-window consistency check for <concept>: 1. get_market_hot_concepts for window=1h/4h/18h/24h/3d, limit=200, same min_score 2. record rank, mentions, agencies, heat_z20, server_time; outside top 200 = "not ranked" 3. compute share_1h = mentions_1h / mentions_24h; label: short-window concentrated / multi-window aligned / long-window accumulated 4. for members, use get_concept_stock_heat with days matched to the window and say so 5. describe the statistical shape only; no forecasts, no trading implications 

FAQ

Why is a concept top-5 at 1h but missing from the 3d top 50?
The 3d window accumulates 72 hours, so steadily discussed concepts dominate it. Raise limit to 200 before concluding anything.

Should I merge near-duplicate AI concept names?
Show them side by side with a local alias map, but do not sum their mentions.

Conclusion

Every window on the concept heat board is valid on its own; errors come from comparing them carelessly. Capture in one round, assert identical parameters, describe shape with counts and agencies, map days explicitly when drilling down, and persist the metadata. Then an AI theme's multi-window heat can be described precisely and reproduced by anyone. For a ready-made view of the same theme, see the AI board heat monitor.

中文简介:AI 主题在 1h 窗口排前列、3d 却排中段,往往不是「爆发」或「退潮」,而是滚动窗口口径不同。本文把熔岩概念热榜 get_market_hot_concepts(/hot/concepts)五档窗口的对比写成「单元测试」:同轮取数、min_score 一致、limit=200、概念名精确匹配四条断言,再用 mentions/agencies 与 share_1h 给出短窗集中 / 多窗同步 / 长窗累积三种形态描述,并说明下钻 /concepts/stocks 时 days 与窗口的换算、日频面板分开展示。熔岩是量化交易必备的机构/大V 热度监测工具。