wiki_attention_anchor
This gate lets your bot trade only on days when a topic you pick is spiking in public attention — measured by how many people read that topic's English Wikipedia article today, against how many read it on an average day over the previous month. Pick Jerome Powell, set the dial to 1.5×, and the bot sits on its hands until the day Powell's article gets half again its usual traffic. It is the only signal we have for politics, it runs on a genuinely free feed, and the idea behind it is sound. The trouble is the measurement. The same 1.5× dial asks for a routine Tuesday from one topic and a once-in-years event from another — and on the topic that trips it more often than any other, 96% of the "attention" on its biggest day was not people.
- Bots using it
- 0 — live, out-of-sample, draft and archived (all 76 checked)
- Data source
- Wikimedia Pageviews REST API — free, keyless, no account
- Poller · cron
- wiki_pageviews_poller · 11 */3 * * * (the registry says there is no poller — wrong)
- Table it reads
- wiki_attention · 32 rows, one per topic, overwritten every run
- How often it opens
- 6.7% of topic-days at 1.5× — and 3.1% on the topic we ship as the default
- Backtest-replayable
- No — and there is no history to replay it against even in principle
Every other signal in this library reads a measurement of the world: a temperature, a price, a barrel count. This one reads a measurement of us — how many people went looking something up. That makes it the most intuitive signal we ship and the hardest one to get right, because the number moves for reasons that have nothing to do with whether your market is going to settle YES.
Where the number actually comes from
One feed, no key, no account, no bill. predictive/wiki_pageviews_poller.py asks the
Wikimedia Pageviews REST API —
wikimedia.org/api/rest_v1/metrics/pageviews/per-article/en.wikipedia/…/daily/… — for the last
50 days of daily view counts on each of 32 watchlist articles. For each one it keeps three numbers: the
most recent complete day's views, the mean of the 30 days before that, and the ratio between them. That
ratio is the whole signal. It runs on cron 11 */3 * * * — eight times a day, at eleven minutes
past every third hour — and writes into the wiki_attention table in
predictive.db: 32 rows, one per topic.
The watchlist is hand-picked and lives in quants/wiki_attention_anchor.ARTICLES: twenty US
political figures and election pages, extended in June to cover world leaders and geopolitical flashpoints
— Russia–Ukraine, the Gaza war, Iran, Taiwan, NATO — plus Jerome Powell and the Federal Reserve. You pick
from that list in the builder; the bot never guesses which article your market is "about". That is a good
design decision and worth saying so: the fuzzy market-to-topic matching that would be required otherwise is
exactly where this kind of signal usually goes wrong.
Our own registry says this signal has no poller and no table. It has both, and has had since roughly mid-June. This is the third time in a row that the "orphaned, no poller running" label has turned out to be wrong — after funding_anchor and sports_anchor. The registry resolves a poller by pattern-matching the module's docstring; this poller's docstring names the table in prose the pattern doesn't catch. The crontab is the source of truth, and the crontab has the job.
What it does for your bot
It is a global switch, not a filter on individual markets. When the gate is shut your bot does nothing at all that day — every market it would otherwise consider is dropped, whatever your price band or category rules say. When it is open, your bot's ordinary rules run as normal. So the practical effect of adding this signal is to convert a bot that trades every day into one that trades on a handful of days, and to hand the choice of which days to a pageview count.
It fails closed, which is the right default: an unknown topic, a missing row, a database it can't read, or data more than three days stale all return False. Your bot stands down rather than guessing. Nothing here will trade on bad data — it will just stop trading, quietly, and you will not be told.
The catch
1. On the topic it likes best, the attention is not human
The poller asks the API for all-agents traffic. That path segment has four options —
all-agents, user, spider, automated — and
user is the one that means people. On most topics the difference is a rounding error. On the
Supreme Court of the United States it is the entire signal: over the last 40 days,
80% of its counted views were not human. On 19 July the article recorded 50,315 views,
of which 1,766 were readers and 48,390 were traffic Wikimedia labels automated. The gate
scored that 6.54× — the single biggest reading in the entire watchlist — while actual human attention sat
at 0.52×, below its own average.
Count only people and this topic's 14 gate-openings drop to 6. It is the topic that opens the gate more often than any other in the list, and more than half of that is a crawler. The fix is one word in one URL, on the same free endpoint.
2. The same dial means something different for every topic
"1.5× its 30-day norm" sounds like one setting. It is 32 different settings. For the Supreme Court, 1.5× is 0.4 standard deviations of its normal day-to-day wobble — it happens roughly every fifth day. For Israel, 1.5× is 5.6 standard deviations, and it has not happened once in 65 days. Five topics — Israel, Taiwan, Putin, Xi Jinping and Pope Leo XIV — never opened the gate at all at the default setting.
The bottom panel above shows the consequence: how often a topic fires tracks how jumpy its pageview series is (ρ = 0.85), not how much news it makes or how much traffic it gets (ρ = −0.18). Pick a topic from the dropdown and you are not choosing what to watch so much as choosing how often your bot is allowed out.
3. The default we ship almost never opens
The builder defaults to Donald Trump at 1.5×, and so does the one-click starter on the site. Over the last 65 days that combination would have opened the gate on two days — 3.1% of the time. Trump has the highest raw traffic in the watchlist by a distance, and that is precisely why: his baseline is already saturated, so a big news day barely moves the ratio. Across all 32 topics the default setting is open on 6.7% of topic-days.
4. A big story blinds the gate for the month that follows
The denominator is a mean, so one enormous day poisons it for thirty days. Keir Starmer's article took 521,785 views on 22 June, against a normal day of about 14,000. For the next month his "norm" sat above 40,000 — and the gate went deaf exactly when you would most want it listening:
| Keir Starmer | views that day | its "30-day norm" | ratio | gate at 1.5× |
|---|---|---|---|---|
| 18 June — an ordinary news day | 16,540 | 10,838 | 1.53 | OPEN |
| 22 June — the big one | 521,785 | 15,271 | 34.17 | OPEN |
| 17 July — 3× a normal day | 49,486 | 45,594 | 1.09 | SHUT |
| 21 July — 4× a normal day | 56,307 | 50,128 | 1.12 | SHUT |
Read the first and third rows together. A day with three times the views of a day that opened the gate did not open it. Nothing about the world changed; the arithmetic did. A median, or a spike-censored baseline, would not do this — a mean does.
5. It is part calendar
Wikipedia is quieter at weekends, and a 30-day mean blends about 22 weekdays with 8 weekend days, so the bar is set at neither. Across all 32 topics and 2,080 topic-days, the gate opened on 8.7% of Mondays and 9.1% of Wednesdays but only 3.8% of Fridays and Saturdays — you are more than twice as likely to be allowed to trade on a Monday, before any news has happened. Worth knowing too that the median topic-day scores 0.91, not 1.00: because the mean is dragged up by spikes, a typical day already looks quiet by this measure.
6. There is no history, so none of this can be checked from our own data
wiki_attention has article as its primary key and the poller writes with
INSERT OR REPLACE. There are 32 rows and there will only ever be 32 rows. Yesterday's ratio
is gone. That means the backtester cannot replay this signal — it flags
wiki_attention_anchor in unsupported_rules and then runs the backtest
without the gate anyway, returning a curve for a strategy you did not describe. It also means
nobody can audit, from our own database, whether the gate ever opened. Every number on this page had to
be recomputed from the Wikimedia API directly, because our own record of it does not exist.
7. The health check watches a column that cannot go stale
signal_health.py monitors this feed on fetched_at with an 8-hour threshold.
fetched_at is stamped with the current time on every successful poll, whether or not
Wikimedia published a new day — while the value the gate actually tests is as_of_date, which
nothing monitors. If the source froze, the dashboard would stay green for as long as the poller kept
running, and the gate would quietly fail closed three days later. (The completeness check is deliberately
skipped here, correctly, because overwriting rows makes the cycle count meaningless.) Separately,
68 of 465 poll attempts have died outright on database is locked — about
one run in seven.
8. Nobody has ever used it — and half the universe it asks for is empty
Zero bots reference this signal: not one of the 76 strategies on the platform, in any state, including drafts and archived. There is a finished one-click starter for it on the site ("Politics In-The-News") and nobody has ever launched it. We poll the feed eight times a day regardless.
And that starter asks for politics markets on both books. Kalshi has never listed a
single market our system files under politics — 546,444 rows in kalshi_markets
across crypto, weather, sports, economics and other, and not one politics. So this signal reaches
Polymarket only, where there are 1,116 open politics markets. That is still a real universe; it is just
half of what the starter implies.
What it gets right
The design decisions are better than the measurement. You choose the topic from a fixed list instead of the system guessing which article your market is about — that avoids the failure mode that usually sinks news-based signals. It fails closed on every error path, and the code says so plainly. The data is free, keyless and public, so anyone can check every claim on this page. And the module's own docstring already tells you the honest limit: "pageviews are an attention/news-intensity proxy, NOT a prediction of the market's outcome." That is true and it is the right thing to have written down.
Even taken at face value, an attention spike tells you a market is likely to be busier, not that it is mispriced. Attention and news arrive together, the data lands about a day late, and by then the book has usually moved. Treat this as a switch that puts your bot into crowded, fast-moving markets — and make sure that is what you want, because that is what it does.
If you want to use it anyway
Pick a topic with a quiet, stable baseline and check the bottom panel first — a topic sitting far
to the right will almost never let your bot out, and one on the far left will let it out constantly. Avoid
the Supreme Court until the all-agents issue is fixed. Expect the gate to be open on a small
minority of days, and remember that a backtest of a strategy containing this rule is a backtest of a
different strategy.
Related: sentiment_anchor is the other "what is the crowd doing" gate we ship, and gdpnow_anchor is the other signal that short-circuits a whole bot rather than filtering markets one at a time.
Sources for every figure on this page: the production crontab and
predictive/wiki_pageviews_poller.py; quants/wiki_attention_anchor.py;
the wiki_attention, kalshi_markets and polymarket_markets tables in
predictive.db; the strategies table in quants.db;
quants/backtest.py; signal_health.py; and the
Wikimedia Pageviews REST API,
queried directly on 13 August 2026 for the 95 days to 12 August, giving 65 scoreable days per topic.
Chart coordinates are generated from that data rather than hand-placed.
Read the rest of the Trade Bot Dictionary.