Digital Economy Lab · Исследование Digital Economy Lab · Research

Шок по расписанию

Shocks on Schedule

Прогноз потребительских расходов муниципалитетов и раннее обнаружение структурных сдвигов по данным СберИндекса

Forecasting municipal consumer spending and detecting structural breaks early with SberIndex data

полный прогон · 18.09.2026 full run · 18.09.2026 Онлайн-конкурс СберИндекса, направление «Прогнозирование» SberIndex online contest, Forecasting track Итоги — до 9 октября 2026 Final results by 9 October 2026 Код: GitHub · MIT · DOI 10.5281/zenodo.22827296 Code: GitHub · MIT · DOI 10.5281/zenodo.22827296
Коротко In brief

У каждого муниципалитета в данных СберИндекса всего 24 месяца наблюдений, зато муниципалитетов около двух тысяч. Внутри одного ряда нельзя надёжно оценить ни сезонность, ни шум, ни точку разлома. Рабочий тезис: информацию надо занимать поперёк панели, а не вдоль ряда. Полный прогон на всех 2 016 МО его подтверждает — и уточняет, что почти весь выигрыш даёт сама панель, а не выбор модели.

Each municipality in the SberIndex data has only 24 monthly observations, but there are about two thousand municipalities. Within a single series one cannot reliably estimate seasonality, noise or a break point. The working thesis: borrow information across the panel rather than along the series. The full run on all 2,016 municipalities supports it — and shows that almost the entire gain comes from the panel itself, not from the choice of model.

  1. Решает приём, а не модель. Достаточно взять отклонение МО от общероссийской динамики, заморозить его и двигать вместе с ней — модель без единого обученного параметра ошибается на 34 % меньше базовой. Тот же приём на самом Prophet даёт −33 %.
  2. The trick matters, not the model. Freeze a municipality's deviation from the nationwide path and let it move with that path — a model with no fitted parameters has 34 % lower error than the baseline. The same trick applied to Prophet itself gives −33 %.
  3. Сверх панели работает ансамбль. Среднее трёх моделей на отклонении даёт −47 % к Prophet и точнее его в 88 % МО. Отдельные модели поверх приёма между собой статистически неразличимы.
  4. Above the panel, only the ensemble helps. Averaging three models on the deviation gives −47 % versus Prophet and wins in 88 % of municipalities. Individual models on top of the trick are statistically indistinguishable from one another.
  5. Шок виден в сравнении с соседями. Детектор, сопоставляющий МО с другими МО того же месяца, при равной доле ложных тревог находит на 12 пунктов больше шоков, чем ближайший конкурент, и в 5,5 раза превышает уровень случайных тревог.
  6. A shock shows against peers. At an equal false-alarm rate the detector that compares a municipality with its peers finds 12 points more shocks than the runner-up, and beats a random alarm process by a factor of 5.5.
  7. Отрицательный результат, который стоит остальных. У паводков весны 2024 года следа в месячных расходах не нашлось: сдвиг затронутых МО −1,1 п. п. против −0,3 у остальных при разбросе 5,6. Эффект сильнее трёх пунктов исключён, меньший этими данными не проверяется.
  8. A negative result worth the rest. The spring 2024 floods left no trace in monthly spending: affected municipalities shifted by −1.1 pp against −0.3 pp elsewhere, with a spread of 5.6. Effects larger than three points are ruled out; smaller ones cannot be tested on this data.
−47 %
MAE ансамбля к Prophet, 24 192 пары
ensemble MAE vs Prophet, 24,192 pairs
3,5
ложной тревоги на 100 ряд-месяцев у панельного детектора
false alarms per 100 series-months, panel detector
2 016
МО с полной историей 01.2023–12.2024
municipalities with full history 01.2023–12.2024
Что проверено What has been checked

Все даты в реестре событий сверены по первоисточникам: пресс-релизы Банка России, распоряжение Правительства о тарифах, сообщения о паводках в Оренбургской, Тюменской и Курганской областях. Работу прочитали четыре независимых рецензента; после разбора пересчитаны тесты значимости, добавлены контрольные модели и уровень случайных тревог для детекторов. Ход разбора и список правок — в журнале аудита. Код, отчёт и конфигурации депонированы: DOI 10.5281/zenodo.22827296.

Every date in the event registry is verified against primary sources: Bank of Russia press releases, the government tariff decree, and reports of the floods in the Orenburg, Tyumen and Kurgan regions. Four independent reviewers read the work; after their comments the significance tests were recomputed, control models were added and a random-alarm benchmark was introduced for the detectors. The review log is in the audit note. The code, report and configurations are deposited under DOI 10.5281/zenodo.22827296.

01

Данные

Data

Основной ряд — «Потребительские безналичные расходы на уровне муниципальных образований» СберИндекса: 303 126 наблюдений, январь 2023 — декабрь 2024, шесть категорий (все категории, продовольствие, здоровье, общественное питание, транспорт, маркетплейсы), по 2 190 рядов в каждой. Файл выгрузки зафиксирован контрольной суммой sha256, чтобы результат воспроизводился на той же версии данных.

The core series is SberIndex's "Cashless consumer spending at the municipal level": 303,126 observations, January 2023 to December 2024, six categories (all categories, food, health, restaurants, transport, marketplaces), 2,190 series in each. The data file is pinned by a sha256 checksum so that results reproduce on the same data version.

Три свойства, которые задают дизайн

Three properties that shape the design

  1. Короткая история. Годовой прирост существует только за 2024 год — 12 точек на ряд.
  2. Short history. Year-on-year growth exists only for 2024 — 12 points per series.
  3. Нет кода ряда и региона. В выгрузке только название МО, а одинаковые названия встречаются в разных регионах: 726 рядов носят неуникальные имена. Ряд восстанавливается по сплошному блоку строк в файле.
  4. No series or region code. The file carries only the municipality name, and identical names occur in different regions: 726 series have non-unique names. Each series is recovered as a contiguous block of rows in the file.
  5. Состав меняется. Сайт включает МО, где оценка проходит порог качества; число пропусков по месяцам — от 41 до 118.
  6. Changing coverage. The site includes municipalities whose estimate passes a quality threshold; monthly gaps range from 41 to 118.
02

Прогноз: панель против отдельного ряда

Forecasting: panel versus single series

Скользящий бэктест: прогноз строится из июня, июля, августа и сентября 2024 года на один, два и три месяца вперёд, все 2 016 МО с полной историей, 24 192 пары «МО — точка — горизонт». Каждая модель видит только данные до точки прогноза.

Rolling backtest: forecasts are made from June, July, August and September 2024, one to three months ahead, for all 2,016 municipalities with a full history — 24,192 municipality–origin–horizon pairs. Each model sees only data up to its forecast origin.

Рисунок 1. Средняя абсолютная ошибка прогноза, руб. в месяц
Figure 1. Mean absolute forecast error, RUB per month

Сезонный наивный прогноз (MAE 4 206) не показан: он втрое хуже Prophet и сжал бы шкалу. Бустинг с признаками событий (1 338) не лучше бустинга без них (1 325): в окне прогноза все события федеральные и одинаковы для всех МО.

The seasonal naive forecast (MAE 4,206) is omitted: it is three times worse than Prophet and would compress the scale. Boosting with event features (1,338) is no better than without them (1,325): in the forecast window every event is federal and identical across municipalities.

МодельModel ИдеяIdea MAE R² приростаR² growth
ens3_meanсреднее трёх моделей ниже: Chronos, ETS и наивной с поправкойaverage of the three models below: Chronos, ETS and the corrected naive7620,42
chronos_baseChronos-Bolt на отклонении МО от общей динамики, без обученияChronos-Bolt on the deviation from the common path, zero-shot8860,31
ets_relativeETS на отклонении МО от медианного; сезонность — у панелиETS on the deviation from the median municipality; seasonality from the panel9260,21
factor_onlyконтроль: отклонение заморожено, двигается только общая динамикаcontrol: the deviation is frozen, only the common path moves9390,17
prophet_relativeтот же Prophet, но на отклонении от общей динамикиthe same Prophet, but on the deviation from the common path9590,08
snaive_growthпрошлогодний уровень × годовой прирост за 3 месяцаlast year's level × 3-month average annual growth9950,12
lgbmглобальный бустинг, поправка к предыдущей моделиglobal boosting, a correction to the model above1 338−0,39
prophetProphet на каждом ряду — базовая модель конкурсаProphet per series — the contest baseline1 428−0,71

R² прироста — доля дисперсии годового прироста, объяснённая моделью. R² уровня здесь у всех моделей 0,97–0,99 и ничего не различает.

R² growth is the share of variance in annual growth explained by the model. R² on levels is 0.97–0.99 for every model and does not discriminate.

Сравните две строки таблицы: factor_only — модель без единого обученного параметра, а prophet_relative — та же базовая модель конкурса, но применённая к отклонению. Обе дают около трети выигрыша, и между собой все модели «поверх приёма» статистически неразличимы. Собственный вклад моделирования появляется только у ансамбля: он лучше factor_only на 177 руб. (p = 0,004).

Разрыв растёт с горизонтом: на месяц вперёд панельная модель точнее Prophet на 14 %, на три месяца ошибка Prophet почти вдвое больше. Prophet пытается оценить годовую сезонность по 24 точкам и не справляется — и это не вопрос настройки: из десяти конфигураций Prophet лучшая даёт 1 334 руб., что всё равно на 43 % хуже панельной модели.

О значимости честно: ячеек «точка — горизонт» двенадцать, но целевых месяцев всего шесть, и прогнозы из разных точек метят в один месяц. С поправкой на это перекрытие тест Диболда–Мариано даёт p = 0,18. Поэтому выводы опираются на две другие проверки: доля МО, где модель лучше (86–88 %), и блочный бутстрап по месяцам, интервалы которого не пересекают ноль.

Compare two rows: factor_only has no fitted parameters at all, while prophet_relative is the contest baseline applied to the deviation. Both capture about a third of the gain, and every model built on top of the trick is statistically indistinguishable from the others. Modelling adds something of its own only in the ensemble: it beats factor_only by 177 RUB (p = 0.004).

The gap widens with the horizon: one month ahead the panel model is 14 % more accurate than Prophet; three months ahead Prophet's error is almost twice as large. Prophet tries to estimate annual seasonality from 24 points and fails — and this is not a matter of tuning: across ten Prophet configurations the best gives 1,334 RUB, still 43 % worse than the panel model.

On significance, plainly: there are twelve origin–horizon cells but only six target months, and forecasts from different origins land on the same month. Corrected for that overlap, the Diebold–Mariano test gives p = 0.18. The conclusions therefore rest on two other checks: the share of municipalities where the model wins (86–88 %) and a block bootstrap over months, whose intervals exclude zero.

03

Сдвиги: сравнение с соседями

Breaks: comparing with peers

Все детекторы работают с одним рядом — годовым приростом МО за вычетом прироста медианного МО в том же месяце:

All detectors work on the same series — a municipality's annual growth minus the median municipality's growth in the same month:

di,t = ln(yi,t / yi,t−12) − medianj ln(yj,t / yj,t−12)

Годовой прирост убирает сезонность, вычитание медианы — общероссийские движения. Декабрьский пик или рост ставки, задевший всех, для отдельного МО шоком не считается.

Annual growth removes seasonality; subtracting the median removes nationwide movements. A December peak or a rate hike that hit everyone is not a shock for any single municipality.

Настоящих дат шоков по МО нет, поэтому проверка полусинтетическая: в половину из 2 016 реальных рядов вносится ступенька уровня на ±5, ±10 или ±20 % в случайный месяц апреля–декабря 2024 года, три повтора.

There are no true shock dates for municipalities, so the test is semi-synthetic: half of 2,016 real series receive a level step of ±5, ±10 or ±20 % in a random month of April–December 2024, three repeats.

Таблица. Детекторы на полусинтетических шоках, допуск 2 месяца
Table. Detectors on semi-synthetic shocks, 2-month tolerance
ДетекторDetector ТочностьPrecision ПолнотаRecall СлучайныйRandom Ложных на 100False per 100

«Ложных на 100» — тревоги на 100 ряд-месяцев в рядах без внесённого шока. В этих рядах есть и собственные настоящие шоки, поэтому точность занижена. «Случайный» — полнота детектора, который даёт тревоги с той же частотой, но наугад: без этого ориентира полнота не читается. Строка «+ новости» — тот же BOCPD, которому заранее сообщают о возможном событии (60 % шоков имеют новость, 5 % новостей ложные, дата известна с точностью до месяца).

"False per 100" counts alarms per 100 series-months in series with no injected shock. Those series contain genuine shocks of their own, so precision is understated. "Random" is the recall of a detector that fires at the same rate but at random: without that benchmark recall cannot be read. The "+ news" row is the same BOCPD told in advance about a possible event (60 % of shocks come with news, 5 % of news items are false, the date known to within a month).

Шоки от 10 % обнаруживаются в месяц появления. Панельный детектор находит 93–96 % шоков в 20 % и 51–65 % шоков в 10 %, но почти не видит сдвиги в 5 %: на коротком ряду они неотличимы от шума.

Пороги подбирались отдельно: каждый детектор прогнан по сетке своих настроек. При одинаковой доле ложных тревог около трёх на сто ряд-месяцев полнота панельного детектора 0,60, у PELT и BinSeg 0,48. У остальных на сетке вовсе нет настройки с такой долей. Панельный детектор превосходит их не в удачно выбранной точке, а на всей кривой.

Shocks of 10 % or more are detected in the month they occur. The panel detector finds 93–96 % of 20 % shocks and 51–65 % of 10 % shocks, but hardly sees 5 % shifts: on a short series they are indistinguishable from noise.

Thresholds were tuned separately: every detector was run across a grid of its own settings. At an equal false-alarm rate of about three per hundred series-months, the panel detector's recall is 0.60 against 0.48 for PELT and BinSeg; the rest have no setting on the grid that reaches that rate at all. The panel detector wins across the whole curve, not at one lucky point.

04

Реальный случай: паводки весны 2024 года

A real case: the spring 2024 floods

В апреле 2024 года паводок прошёл по Оренбургской, Тюменской и Курганской областям: прорыв дамбы в Орске 5 апреля, режим ЧС в двух других регионах с 8 апреля, эвакуации, выплаты пострадавшим. Все даты сверены по первоисточникам. Под события попадают 15 МО. Если бедствие такого масштаба видно в расходах, прирост затронутых МО относительно медианного должен заметно сдвинуться.

In April 2024 floods swept the Orenburg, Tyumen and Kurgan regions: a dam burst in Orsk on 5 April, states of emergency in the other two regions from 8 April, evacuations and payments to those affected. All dates are verified against primary sources. Fifteen municipalities fall under these events. If a disaster of that scale shows up in spending, the growth of affected municipalities relative to the median should shift visibly.

Рисунок 2. Годовой прирост расходов относительно медианного МО, п. п., 2024 год
Figure 2. Annual spending growth relative to the median municipality, pp, 2024

Не сдвинулся. Средний сдвиг затронутых МО за апрель–июнь против января–марта составил −1,1 п. п. против −0,3 п. п. у остальных при разбросе 5,6 п. п.; разность −0,8 п. п. с интервалом от −3,2 до +1,5. Внутри группы разброс огромен и разнонаправлен: Звериноголовский округ −9,8 п. п., Новотроицк −7,4, Ишим −5,0, а Сладковский район +3,8 и Макушинский +3,5.

Экономически это объяснимо: эвакуация и порча имущества расходы снижают, выплаты пострадавшим и восстановительные покупки поднимают, и в месячной сумме силы гасят друг друга. Методически вывод осторожный: эффект сильнее примерно трёх процентных пунктов исключён, меньший на пятнадцати МО не проверяется. Детекторы ловят часть затронутых рядов — z-score 47 %, панельный 13 %, — и порядок обратный полусинтетической проверке. Это не довод в пользу z-score: реальные шоки такого типа по величине сравнимы с обычным разбросом ряда, поэтому их находит только детектор с низким порогом, а вместе с ними и шум.

It did not. The average shift of affected municipalities over April–June versus January–March was −1.1 pp against −0.3 pp elsewhere, with a spread of 5.6 pp; the difference is −0.8 pp with an interval from −3.2 to +1.5. Within the group the spread is large and two-sided: Zverinogolovsky −9.8 pp, Novotroitsk −7.4, Ishim −5.0, while Sladkovsky is +3.8 and Makushinsky +3.5.

Economically this makes sense: evacuation and property damage push spending down, payments and rebuilding push it up, and in a monthly total the two cancel out. Methodologically the claim is cautious: effects larger than about three percentage points are ruled out, smaller ones cannot be tested on fifteen municipalities. Detectors catch part of the affected series — z-score 47 %, the panel detector 13 % — the reverse of the semi-synthetic ranking. That is not an argument for z-score: real shocks of this kind are comparable in size to a series' ordinary spread, so only a low-threshold detector finds them, along with the noise.

На рисунке показаны три МО Оренбургской области; полный перечень затронутых МО и расчёт — в репозитории.

The figure shows three municipalities of the Orenburg region; the full list of affected municipalities and the calculation are in the repository.

05

Новости: как согласовать их с месячными данными

News: aligning it with monthly data

Источников два. Первый — реестр решений с ссылкой на первоисточник у каждой записи: восемь решений Банка России по ставке, окончание массовой льготной ипотеки, индексация платы за ЖКУ, пять эпизодов паводков. Второй — открытый поток GDELT: 731 дневной архив за 2023–2024 годы, 5,9 ГБ, контрольная сумма у каждого файла, разметка правилами без языковых моделей.

There are two sources. The first is a registry of decisions, each with a link to a primary source: eight Bank of Russia rate decisions, the end of the mass subsidised mortgage, the utility tariff indexation and five flood episodes. The second is the open GDELT stream: 731 daily archives for 2023–2024, 5.9 GB, a checksum for every file, labelled by rules without language models.

Поток проверку не прошёл. Из восьми решений по ставке он находит одно: денежно-кредитная политика в кодах событий GDELT не кодируется, а доля российских доменов в потоке 0,2 %. К муниципалитетам привязались 239 новостей, и 231 из них — апрель 2024 года. То есть за два года открытый геокодированный поток дал один локальный шок, и тот уже был в реестре. Это честный отрицательный результат: федеральные решения остаются за реестром первоисточников, а расширять охват нужно русскоязычными источниками.

The stream failed the test. Of eight rate decisions it finds one: monetary policy is not encoded in GDELT's event codes, and Russian domains make up 0.2 % of the stream. Only 239 news items map to municipalities, and 231 of those are April 2024. In two years the open geocoded stream produced a single local shock, one already in the registry. That is an honest negative result: federal decisions stay with the primary-source registry, and widening coverage requires Russian-language sources.

  1. Время — момент публикации, а не вступления в силу. Для прогноза из месяца T используются только новости, опубликованные до конца T.
  2. Timing is the publication date, not the effective date. A forecast made in month T uses only news published by the end of T.
  3. Лаг подбирается на обучающем окне отдельно для каждого типа события: ставка, льготные программы, тарифы, выплаты, ЧС.
  4. The lag is chosen on the training window separately for each event type: key rate, subsidy programmes, tariffs, payments, emergencies.
  5. География: федеральные решения относятся ко всем МО, региональные — к МО региона, местные — к МО по названию с проверкой одноимённости.
  6. Geography: federal decisions apply to all municipalities, regional ones to the region's municipalities, local ones by name with a check for duplicate names.
  7. Контроль: абляции (без событий, только реестр решений, только новостной поток), плацебо со сдвигом на полгода назад и сравнение затронутых МО с незатронутыми того же месяца.
  8. Controls: ablations (no events, decisions registry only, news stream only), a placebo shifted six months back, and a comparison of affected with unaffected municipalities in the same month.
06

Границы

Limitations

Что пока нельзя утверждать What cannot be claimed yet
  1. Целевых месяцев всего шесть, ячеек «точка — горизонт» двенадцать, и они перекрываются. С поправкой на перекрытие тест Диболда–Мариано даёт p = 0,18; выводы опираются на долю выигранных МО и бутстрап по месяцам.
  2. There are only six target months and twelve overlapping origin–horizon cells. Corrected for the overlap, the Diebold–Mariano test gives p = 0.18; the conclusions rest on the share of municipalities won and a bootstrap over months.
  3. Состав ансамбля и рабочие пороги детекторов выбраны на тех же данных, где считаются метрики. Смещение отбора измерено на отдельном окне и составляет около 1 %.
  4. The ensemble composition and the detector thresholds were chosen on the same data where the metrics are computed. The selection bias was measured on a separate window and is about 1 %.
  5. Выигрыш от новостей измерен на смоделированных новостях: это проверка механизма, а не оценка вклада реальных новостей. Реальный поток GDELT для этого слишком беден.
  6. The gain from news is measured on simulated news: it tests the mechanism, not the contribution of real news. The real GDELT stream is too thin for that.
  7. Отрицательный результат по паводкам означает «эффект сильнее трёх пунктов исключён», а не «эффекта нет»: затронутых МО пятнадцать.
  8. The negative result on floods means "effects larger than three points are ruled out", not "there is no effect": only fifteen municipalities were affected.
  9. Chronos требует внешних весов. Ансамбль без него даёт 793 руб. вместо 762 — на 4 % хуже, но без внешних зависимостей.
  10. Chronos needs external weights. Without it the ensemble gives 793 RUB instead of 762 — 4 % worse, but with no external dependencies.
07

Воспроизведение

Reproduction

Все числа этой страницы получены конфигурацией configs/full.yaml: загрузка с проверкой sha256, прогнозы, объединение с моделями-основами, ансамбли, детекторы, кривые по порогам, рисунки. Параметры лежат в YAML, зерно фиксировано, версии пакетов закреплены, сырые данные СберИндекса в репозиторий не кладутся: их скачивает загрузчик. Код, методологический отчёт на русском и журнал аудита — в репозитории github.com/rav11l/sberindex-shocks.

Every figure on this page comes from the configs/full.yaml configuration: download with a sha256 check, forecasts, merging with foundation models, ensembles, detectors, threshold curves and charts. Parameters live in YAML, the seed is fixed, package versions are pinned, and raw SberIndex data is not stored in the repository but fetched by the loader. The code, the methodology report in Russian and the audit log are at github.com/rav11l/sberindex-shocks.

Digital Economy Lab · Равиль Ахтямов, к. э. н. · ORCID 0000-0002-0783-8573
Данные: СберИндекс, sberindex.ru. Код — MIT, текст — CC BY 4.0.

Digital Economy Lab · Ravil Akhtyamov, PhD in Economics · ORCID 0000-0002-0783-8573
Data: SberIndex, sberindex.ru. Code under MIT, text under CC BY 4.0.

Made on
Tilda