It’s hard to believe that Japan was once what China is today — the land of opportunity, where young people from all over the world flocked to study, work and make their fortunes.

Everything seemed possible in the booming economy of the late 1980s. As a rookie correspondent in Tokyo I was as amazed by the crazy intricacies of Japanese electronics, the perfection of the £100 melons and the sheer extravagance of gold-flecked sushi.

It all ended in a financial earthquake so bad that the aftershocks are still with us. Japan is no longer the youthful, confident country it was. It has grown old and grey, burdened with debt and fearful of change.

It might seem therefore that today’s Japan has little to offer foreign investors. But as an investment proposition it is a lot better than it looks.

In the past decade Japan has been quietly remodelling itself, with economic reforms led by former prime minister Shinzo Abe and his successor, Yoshihide Suga. Crucially, corporate governance is being improved and Japan’s notoriously opaque boards are subject to greater scrutiny.

Investors have taken note, driving the Nikkei index of leading shares to its highest levels since 1991, this month reaching over 28,500.

But there is still plenty of headroom, with the Nikkei far short of its all-time 1989 record of 39,815. While valuations are higher now than a decade ago, at 14 times earnings share prices are about the same as western Europe’s and considerably below stratospheric US levels. As Matt Brett, manager of Baillie Gifford Japan, an investment trust, says: “It’s not something which keeps me awake at night — valuations in Japan.”

Whatever the pricing of the overall market, there are still bargains in the many sub-segments of this complex economy, with a choice of no fewer than 3,700 companies on the Tokyo Stock Exchange.

The stock picking top-performing UK-listed Japan investment trust — JPMorgan Japan — delivered total returns, including dividends, of 60.9 per cent last year, according to the Association of Investment Companies (AIC) and Morningstar, the data group.

The truth is that, while Japan’s weaknesses as an investment destination often loom large, its strengths have often been overlooked.

Clearly, the demographic outlook is difficult with the population ageing sooner than in other developed countries, due to a particularly sharp drop in births and draconian immigration policies.

Held back by the growing ranks of non-working, non-spending pensioners, gross domestic product has long been stagnant, even before last year’s Covid-induced estimated 5 per cent drop. Companies sit on cash piles, wary of investing, leaving the government to prop up output with public works.

It gets worse. The economic rise of rival Asian states, especially China, has undermined confidence. While few Japanese were ever outward-looking, they have withdrawn further from the world. For example, there aren’t many countries where the number of young people studying abroad has dropped in the past 20 years.

This is not the whole story. Japan is a land of huge scale and sophistication, with 126m people and the world’s third-largest economy. Well-educated workers, life-long corporate training regimes, effective public transport and well-established institutions make Japan a safe and efficient place to work — and invest. Yes, the rules often favour the locals, but where do they not?

Also, investing in Japanese stocks is not investing in Japanese demographic decline or GDP stagnation. It’s putting money into companies with a range of technologies and prospects, which are not necessarily dependent on domestic demand. On average, listed groups make more than 60 per cent of their revenues overseas.

These companies benefit greatly from their proximity to China and other Asian growth markets. While some big names have been eclipsed by foreign rivals — Sony by South Korea’s Samsung, for instance — Japan has a host of manufacturers that remain technological leaders. Nidec in electric motors, for example, Keyence in sensors, and Fanuc in robots.

Alongside these groups stand consumer-oriented companies, known in Asia as quality brands in everything from cosmetics (Shiseido) to baby bottles (Pigeon). In services too there are class acts, such as Rakuten (Japan’s Amazon) and Don Quijote, an innovative discount store chain with a market stall vibe.

Of course, not everything works well. Battered by the country’s post-1989 crisis, banks retain a Dickensian reliance on paperwork. The internet is chronically under-developed, held back by conservative laws and habits.

The pandemic is finally accelerating change, with companies and consumers going online and switching from cash to cards.

However, with ecommerce far ahead in China, the US and most of Europe, Japan is playing catch-up. For go-ahead Japanese that’s a disadvantage — but for internet investors it’s a gift. Nobody needs to reinvent the wheel. As Nicholas Weindling, manager of the JPMorgan Japan investment trust, says: “It’s like a film where you have already seen the end but Japan is only just getting the opening credits.”

Companies he likes include GMO, a cashless payment provider, Bengo4.com, a legal document exchange service, and M3, an online medical diagnostics company.

Alongside such growth stocks, Japan also offers solid cyclical companies such as Toyota Motor, Sony and construction equipment maker Kubota.

Some Japanese groups even function as income stocks. The dividend yield on the broad Topix index is 1.9 per cent, compared with 1.5 per cent on the US S&P 500. With bond yields low, these look a useful alternative. Buying individual Japanese shares can be complicated but UK investors can easily access the market through UK-quoted investment trusts and funds.

JPMorgan was not alone in performing well last year. The six Japan trusts covered by AIC/Morningstar data, generated average total returns to UK shareholders of 34.6 per cent. Over 10 years to 2020, the six trusts delivered average returns of 316 per cent.

Open-ended funds also did well, with the leading 10 Japanese company funds tracked by Morningstar delivering average returns of 36.2 per cent last year, and the top fund, Comgest Growth Japan, 40.6 per cent. Altogether 154 large Japanese company funds returned 11.4 per cent. These results directly reflect the performance of the shares bought. The investment trust performance has been better because their own share prices have also risen on top of the portfolio gains.

These managers comfortably beat the market — the Topix index doubled over 2011-20, including a 4.8 per cent rise last year. That’s no guarantee of future performance, of course, but for the past decade the managers earned their keep.

While timing a market is always a gamble, Tokyo now has promising tailwinds. Japan has managed the pandemic effectively, is implementing vaccination and looks well-placed to join the economic recovery gathering pace in east Asia. The Bank of Japan is not only pouring cheap money into the economy like other central banks, but also buying huge chunks of listed stocks through liquidity-creating funds. Analysts expect upward corporate earnings revisions.

It won’t bring back the 1980s. But it could be enough to create interesting investment opportunities.

Stefan Wagstyl is editor of FT Money and FT Wealth. Email:  Twitter: