Computational Approaches to the Non-Observed EconomyMeasuring

Module 5Predicting size and trends

A careful estimate of the hidden share covers a year and arrives a year late, yet a ministry wants this quarter's number now. Thirty invented countries, quarter by quarter, live through a shift to digital payments, a recession and a reform. We line up four forecasters, from simply repeating the latest benchmark to anchoring on it and letting fresh indicators speak only about the change, check them with a rolling origin and real publication lags, test how much history to use, and then follow flexible forecasters into concept drift: three kinds, detected late, and adapted to by kind.

By the end you should be able to tell a nowcast from a forecast, beat a persistence baseline, check forecasts with a rolling origin and publication lags, name the three kinds of drift and the models each breaks, and detect and adapt to drift when the truth arrives late.

Key ideas, one per video

  • Video 10Anchoring on the latest benchmark and letting indicators speak only about the change stayed near 2 points (2.2 overall). Random held-out quarters flattered the regression (3.4 points against 4.9 checked honestly): use a rolling origin and real publication lags.
  • Video 11Trees cannot extrapolate (boosting was 9 points off in the recession), and each kind of drift breaks a different model. With an annual benchmark a year late, the first drift alarm rang three years after the shift began: watch faster signals.

Book: Chapter 5 of Computational Approaches to the Non-Observed Economy: From Theory to Practice (coming soon). The videos and slides follow the chapter’s topics in our own words, figures and simulations; the towns and countries are invented, and nothing is copied from the book.

The title slide of Module 5: Predicting size and trends

24 slides, written to be read on your own, with worked examples, our own small simulations and check-yourself questions (answers at the end). PDF, 2.3 MB.

Watch

2 videos for this module, each about 8 to 11 minutes. Pick one from the list, and open the transcript to read along: each timestamp plays the video from there. The narration is generated with a voice clone of Teddy, used with his permission.

Video 10 · 8:33

Forecasting something you can't see

A careful estimate arrives a year late. Reusing it is off by about 2.8 points; a regression trained in calm years misses by 8 in a recession.

Anchoring on the latest benchmark and letting indicators speak only about the change stayed near 2 points (2.2 overall). Random held-out quarters flattered the regression (3.4 points against 4.9 checked honestly): use a rolling origin and real publication lags.

TranscriptVideo 10
0:00

The number arrives late. The most careful estimate of a country's hidden economy usually arrives late. In our invented world, it covers a whole year, and it's published a year after that year ends. But a ministry wants this quarter's number, now. What do you do? The simplest answer: reuse the latest estimate. Across thirty invented countries and eight years, that's off by about 2.8 points. A model that reads fresh indicators, trained in calm years, does better while things stay calm. Then a recession hits, and it's off by eight points. A third approach, which keeps the old estimate as an anchor and lets the indicators say only how much has changed, stays around two points, even in the recession. This video is about forecasting a quantity nobody observes directly, and checking those forecasts honestly.

0:55

Adding time. Welcome to Module 5: predicting the size and the trend of the non-observed economy. I'm Teddy. In Module 4 we estimated the size for countries without a benchmark. Now we add time. We want the hidden share this quarter, and next year, using only what's known today. Our world is the Archipelago again, now quarter by quarter. Thirty invented countries, forty-eight quarters, with three things that happen along the way: a shift to digital payments, a recession, and a reform.

1:24

Two traditions. Forecasting has two long traditions, and both matter here. The statistical one started with smoothing: give recent observations more weight, and let the level and the trend adapt. Then came models that use past values and past errors, and state-space models. A state-space model fits this field beautifully. It says there's a hidden process that evolves over time, and we only see it through noisy measurements. That's exactly the situation of the hidden economy. The econometric tradition added long-run relationships between series, models that switch regime in a crisis, and panel models that pool many countries. Factor models went further. They compress dozens of indicators into a few. And nowcasting changed the question. Instead of a fixed annual dataset, the information grows release by release, at different frequencies, with different delays. Forecasting becomes a matter of using each piece the moment it arrives. Researchers brought these tools to the hidden economy: long panels of estimates studied as a persistent process, dynamic versions of the cash models, and long-run relationships built into hidden-variable models. The common thread is respect for time. Values persist, they react to shocks with delays, and the rules of the game can change.

2:36

What the analyst sees. Here is what our analyst sees. A careful annual benchmark, close to the truth, but published a year late. And four indicators, every quarter, almost at once: the cash ratio, an electricity gap, unemployment, and the share of digital payments. Mixed frequencies are normal. Some indicators are monthly, some quarterly, the benchmark yearly. And the indicators have problems of their own: they get revised, and their definitions change. So there are two targets. A nowcast is this quarter's hidden share. A forecast looks a year ahead. Both have to be made from today's information only. And there's a catch for checking. The truth is never observed. In practice, you score last year's nowcasts when the benchmark finally arrives. In our world, we can also score them against the truth.

3:19

Three forecasters. Let's line up the forecasters. The first is persistence: the latest published benchmark, unchanged. It's the baseline every model must beat. It sounds naive, but hidden shares move slowly, so last year's careful number is often close. In calm periods here, it was off by only about one and a half points. The second is smoothing with a trend. It extrapolates the benchmark series. Here, it did slightly worse than persistence, about 3.3 points. Trends in a short annual series are noisy. The third is a regression. Learn how the indicators relate to the benchmark in past years, then apply that to this quarter's indicators. Each past quarter gets the benchmark of its year as a label, so the model learns from hundreds of quarter-country pairs, even though the benchmark is annual. In calm periods it's as good as anything, about one and a half points. But in the recession, its error jumps to eight. Overall, it's the worst of the three, at about five. Why? Because it learned levels. Unemployment rose beyond anything in the training years, and the link between cash and hiding changed in half the countries. A model of levels has nothing to hold on to.

4:28

Anchor and update. The fourth forecaster keeps the best of both. Take the latest benchmark as the level. Then use the indicators only to estimate how much has changed since that benchmark's year. Call it anchor and update. It's the state-space idea in plain form: a precise but old measurement, plus timely but noisy signals about the change. An example with made-up numbers. Say last year's benchmark for a country was twenty percent. Since then, unemployment rose and cash use moved in a way that, in past years, went with one more point of hiding. The nowcast is twenty-one. When the next benchmark arrives, the anchor moves to it, and the update starts again from there. Errors can't pile up for long. Its overall error is about 2.2 points. It stays near two through the technology shift and the recession, and rises to about three during the reform. A year ahead, everything gets harder. Persistence and anchor and update are both about three points off. The regression, about six. Ranges should widen with the horizon too. For anchor and update, the typical miss grew from about two points for this quarter to about three for next year. A forecast without a range hides that. When the target is hidden and arrives late, an old but careful measurement is worth more than it looks. Use new signals for the change, not for the level.

5:46

Checking forecasts honestly. Now, how should forecasts be checked? The tempting way is to hold out random quarters and train on the rest. Before the numbers, guess. Will the random check make the regression look better, or worse, than it really is? Better. With random quarters held out, the regression scores about 3.4 points. Checked the honest way, it's about 4.9. For boosting, the gap is wider: 2.9 on random quarters, 5.3 honestly. Random holes let a model peek at the quarters around the hole, including the future. The honest check is called rolling origin. Stand at a date, use only what was known then, forecast, move forward one quarter, and repeat. It's slower, and it's the only check that matches how forecasts are used. And respect the publication lag. A benchmark for a year can't be used until it was actually published. Training on it earlier is leakage, even if the number is in your file. In real life you can only score against the benchmark, a year later. That's slow, and noisy. Keep a log of every forecast you made, with its date, so you can score it honestly when the truth, or the best estimate of it, arrives.

6:58

How much history. How much history should a forecaster use? More data usually helps. But old data come from a world that may have changed. We tried windows of two, three and five years, and all the history. For the regression, shorter windows made things worse, not better. With two years of data, its recession error doubled. It saw too little to learn anything stable. For anchor and update, a short window helped a little, especially during the technology shift. It only learns changes, which need less data, and recent changes are the relevant ones. So the right amount of history depends on what the model learns. Test it with the same rolling check, don't assume it.

7:37

Recap. Let's recap. Forecasting the hidden economy means forecasting a quantity that arrives late, if at all. Persistence is the baseline. A regression on levels did well in calm times and failed in the recession. Anchoring on the latest benchmark and updating with indicators was the most robust. Check with a rolling origin, respect publication lags, and test how much history to use. In the lab, you'll run all four forecasters through the Archipelago's shocks, and change how much history they see. Next video: flexible forecasters, and what happens when the world they learned stops existing.

Interactive lab

The forecast desk

Nowcast the hidden share of thirty invented countries with persistence, a regression on levels or anchor-and-update. Change how much history each sees, switch the digital-payments shift, the recession and the reform on and off, compare an honest rolling check with random held-out quarters, and watch the drift alarms.

The countries are simulated in your browser (a benchmark that covers a year and is published a year later, and quarterly indicators). Four challenges are checked as you go.

Simple math

The forecast desk: a careful number, a year late

Thirty invented countries, quarter by quarter. A careful benchmark covers a year and is published a year after it ends; four quarterly indicators arrive at once (cash ratio, unemployment, digital payments). Three things happen along the way, each of which you can switch off: digital payments take over in half the countries, a recession, and an e-invoicing reform.

Persistence
ŝₜ = latest published benchmark

The baseline every model must beat.

Regression on levels
ŝₜ = f(indicatorsₜ)

Learns how indicators relate to past benchmarks.

Anchor and update
ŝₜ = Bᵧ + g(indicatorsₜ − indicatorsᵧ)

Old but careful level, timely signals of change.

Overall error
–
Calm years
–
In the recession
–
First drift alarm
–

Running…

Nowcast error, quarter by quarter

Challenges

Each one is checked on your current settings.

  1. Find the forecaster that is fine in calm years (under 2 points) but off by more than 4 points in the recession.
  2. Switch the check to random quarters and see the regression look at least half a point better than it really is.
  3. Switch off all three shifts and run a forecaster whose drift alarm never rings.
  4. With all three shifts on, get the overall error below 1.7 points.