The Bank of Japan headquarters. (Kiyoshi Ota/Bloomberg News)

The world needs a new poster child for failure.

For a long time, you see, that was supposed to be Japan. The conventional wisdom was that its timid response to its own great crash turned what should have been a few bad years into a lost decade — a period from which it never fully recovered. But while this was true up to a point, it's not anymore. Its economy has done so well the last few years that it has almost entirely made up all the ground it really did lose during its protracted slump in the 1990s. The only reason that's hard now to tell is because of a statistical illusion.

Japan, then, is the rare cautionary tale that's turned into a success story.

Now, whether we're talking about robots, smartphones or housing bubbles, Japan is where the future happens first. In particular, when it comes to that last one, its boom-and-bust cycle happened a full 16 years before the rest of the world's did. Not only that, but it was far larger than anything that followed it. To give you an idea of the scale of it, Japan's stock market peaked in 1989 at what's still an all-time high of 38,916; today, it's  22,475. Indeed, according to Nomura economist Richard Koo, Japan's crash wiped out three times more wealth as a share of its economy than the United States' did in 1929.

When you put it that way, it's pretty impressive that Japan's economy didn't shrink at all in the 1990s but only stopped growing for a few years. That, of course, came at the cost of running up a lot of debt on  stimulus projects, but better that than letting things get so bad that you'd wind up doing the same on unemployment benefits instead. Japan, in other words, did well to only fall behind as much as it did.

But Japan has done even better to make it all up. That it has isn't obvious, though, because of another one of the country's firsts: its shrinking working-age population. That makes it impossible to judge Japan's economy by its GDP, at least in comparison to others, because you wouldn't expect it to be growing very much, if at all, when its workforce isn't. Looking at its GDP per capita gives you a better idea of how it's doing, but even that's still slightly misleading since so many of its people are retired. It's hardly a knock on Japan that its 70-year-olds aren't producing a lot of economic output. So, to adjust for the graying of its population, you need to look at its GDP per working-age adult instead. That tells you how much it's producing relative to how much it could reasonably be expected to — and by that measure it's doing very well indeed.

Japan, as you can see below, really did grow about 14 percent less than the United States did during the 1990s, but it has erased almost all of that gap since then. If Japan lost a decade, it has found it now.

This is really two stories. The first is that Japan wasn't doing as badly as we thought 15 years ago — that's when it really started to catch up — and the second is that it's been doing even better than we realized the last five years. That period, not so coincidentally, is when Prime Minister Shinzo Abe started saying he'd do whatever it took to revive the country's economic fortunes. Now, he's made a lot of promises during this time, but what he's doing isn't all that complicated: He's printing a lot of money to give the economy a chance to grow as much as possible, and then helping women enter the workforce to make sure it does.

It turns out this is a great plan.

Consider this: The share of 25-to-54-year-old women who, for the most part, should be too old to still be in school but too young to be retired and are in fact working, has increased from just under 70 percent when Abe took office at the end of 2012 to 77.6 percent today. That's the biggest increase over any 5½-year period since records began in the early 1980s. And it's been enough to push the share of all 25-to-54-year-olds who have a job up to an all-time high of 85.2 percent. Considering that the unemployment rate is 2.5 percent, it's safe to say that almost everyone who wants a job in Japan has one.

That's not to say that Japan has fixed all of its problems. It hasn't. Despite what can only be described as an extremely tight labor market, workers are still getting the smallest of raises for reasons that remain largely mysterious. Which, in turn, has prevented inflation from rising to a healthier level.

Still, it's worth taking a minute to appreciate everything they have done. They managed to weather one of the biggest shocks in financial history without letting unemployment exceed 6 percent (which is still impressive even when you take into account the fact that theirs tends to be lower for cultural and institutional reasons) and then caught back up not too long after. The world, as Paul Krugman has been pointing out for a while, probably owes Japan an apology.

If Japan was a policymaking failure, everyone should hope to be so unlucky.