The baseline every model must beat.
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.
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.
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
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.
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.
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.
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.
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.
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.
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.
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.
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.
The favourite clue loses its meaning. In fifteen of our invented countries, people switch to digital payments. So does part of the hidden trade. Before the switch, the cash ratio was by far the most important input of our boosted forecaster. Shuffle it, and the error grew by more than twelve points. After the switch, shuffling it adds less than four. The model's favourite clue lost most of its meaning. Nobody told the model. That's concept drift: the world a model learned changes under it. This video is about noticing, and adapting.
Four questions. Welcome back to Module 5. This is video two: flexible forecasters and concept drift. We'll look at what machine learning and deep learning bring to forecasting, the three kinds of drift that matter in this field, how to detect them, and how to adapt.
Flexible forecasters. Machine learning forecasters treat the past as features. Recent values, lags, rolling averages, and the indicators, all fed to a model like gradient boosting. Typical features include last quarter's value, the change since last year, a seasonal pattern, and how old the latest benchmark is. Designing them is most of the work. They can learn interactions and thresholds. But trees have one hard limit: they can't predict outside the range they've seen. In our recession, unemployment went higher than in any training year. The boosted forecaster's error jumped to about nine points. It simply had no leaf for that world. A tree predicts by averaging similar past cases. If no past case had unemployment this high, it averages the most extreme ones it has, which were milder. So it under-reacts, exactly when reacting matters most. Deep learning offers sequence models, like recurrent networks and transformers, that read a whole history and learn their own features. They need many long series to learn from. Thirty countries with a dozen annual benchmarks are not enough. They become useful with monthly data, many regions, or many firms. Whatever the model, the label problem from Module 2 stays. A forecaster trained on a published estimate forecasts the estimate.
Three kinds of drift. Now, drift. The book distinguishes three kinds, and our world has one of each. A technology shift. Digital payments jump in fifteen countries. Cash falls for reasons that have nothing to do with hiding, and hidden trade starts using digital channels too. The meaning of the cash indicator changes. A behaviour shift. The recession raises unemployment, and hiding rises by about two and a half points on average. The relationships may hold, but the inputs move into new territory. A regulation shift. Ten countries introduce e-invoicing. Hiding truly falls, by about three and a half points, and at the same time payments move to cards. Behaviour and observation change together. In the real world, these come in many forms. Mobile money and payment apps, platform work, new reporting rules, crises, inflation. Each one can change what hiding looks like, or what our indicators mean. Each one hurts different models. The regression on levels suffered most in the recession, about eight points. Persistence suffered most after the reform, about four. Anchor and update stayed between about two and three throughout.
Detecting drift. How do you notice drift, when the truth is never observed? The natural signal is each new benchmark release. When it arrives, score last year's nowcasts against it. If the errors grow, raise an alarm. A common recipe adds up the errors as they arrive, and raises the alarm when the running total drifts too far from zero. It catches a slow drift that no single error would reveal. We did that for the regression, with an alarm when the error doubles. The shift to digital payments began in quarter twenty. Pause for a moment. When do you think the first alarm went off? In quarter thirty-two. Three years after the shift began. The benchmark is annual and arrives a year late, so the evidence of drift arrives late too. The scored errors tell the story. About one and a half points for the calm years, then two, then almost five. As the recession began, between five and six, and a year into it, over ten. By the time the alarm rang, the model had been wrong for a long time. When the target is slow to arrive, drift detection has to use faster signals. There are several. Watch whether models that should agree start to disagree. Watch relationships between indicators, like cash against card payments. And fund small, fast direct evidence, like a quarterly survey or a round of random audits, as an early warning.
Adapting. Once you've noticed drift, how do you adapt? The obvious move is a shorter training window, so old relationships fade. As we saw in the last video, that can backfire. The regression got worse with less history. Better moves depend on the kind of drift. For a technology shift, change the inputs: the cash ratio needs a companion, the digital share, and their meaning must be re-estimated after the shift. For a behaviour shift into new territory, prefer models that extrapolate sensibly, like ones built on changes rather than levels, or with a structure from theory. For a regulation shift, model the observation process explicitly, as we said in Module 2, and compare with similar countries that didn't change. Two more tools help in every case. Retrain on a schedule, not only when something breaks. And keep several models trained on different windows, so you can see when they start to disagree. And in every case, anchor on fresh direct evidence whenever it arrives. That's what kept anchor and update steady here. Picture the reform year from the analyst's chair. The cash indicator drops sharply in ten countries. Before reading it as less hiding, check what else changed: the reform moved payments to cards. Hold the nowcast near the anchor, flag it, and wait for direct evidence.
Explanations expire. Drift also changes explanations. Tools like SHAP values, or the simpler shuffle test we used, describe what a model relies on. Before the technology shift, our boosted model leaned on cash above everything. After it, cash mattered about a third as much. And the model's error rose to 4 points, up from 2.3. So explanations have an expiry date. Recompute them after any shift, and never present an old one as a description of today's economy. The same is true of the coefficients of a simple model. A weight estimated before a shift describes the old world. Re-estimate it, and say which period it comes from. And remember, as in Module 4: important to a model is not the same as a lever for policy.
A routine. Here's a practical routine for forecasting the hidden economy. Keep a persistence baseline. Use a rolling-origin check with real publication lags. Prefer models that anchor on the latest careful estimate. Log every benchmark release, and score last year's nowcasts against it. Watch faster signals for drift. And when you find drift, ask which kind it is before you change the model. Report forecasts with ranges, and say how the range was checked. A forecast of something nobody sees deserves more humility, not less. And write down, in advance, what would make you distrust your own forecast. A new payment system, a reform, a crisis. When one of those happens, check the model before you publish its number.
Recap. Let's recap. Flexible forecasters learn interactions, but trees can't extrapolate, and deep models need far more series than thirty countries. Drift comes in three kinds: technology, behaviour and regulation. Each one breaks different models. Benchmarks that arrive late make drift detection late, here by three years, so watch faster signals. Adapt to the kind of drift, anchor on fresh evidence, and recompute explanations after every shift. In the lab, you'll switch the three shifts on and off, watch the alarms, and see which forecaster survives. Next module: where hidden activity happens, and through which links. Spatial dynamics.
8:33Video 10 · 5.1Forecasting something you can't seeAnchoring 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.
8:12Video 11 · 5.2Deep forecasts and concept driftTrees 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.
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.
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.
Learns how indicators relate to past benchmarks.
Old but careful level, timely signals of change.
Running…
Nowcast error, quarter by quarter
Challenges
Each one is checked on your current settings.
- Find the forecaster that is fine in calm years (under 2 points) but off by more than 4 points in the recession.
- Switch the check to random quarters and see the regression look at least half a point better than it really is.
- Switch off all three shifts and run a forecaster whose drift alarm never rings.
- With all three shifts on, get the overall error below 1.7 points.
