Investor confidence borne from record corporate profits and the prospect of Japan putting its painful period of deflation behind it, helped by companies focusing on improving shareholder returns, all drove the Nikkei stock index to its all-time high.

But analysts believe the market may now consolidate, at least in the short term, before again testing new heights.

The Nikkei index finished at 39,098.68 on Thursday, eclipsing 38,915.87 set on Dec. 29, 1989, when Japan was in the midst of an asset price bubble that ultimately set the market back by decades when it burst.

Photo shows a monitor at a securities firm in Tokyo displaying the Nikkei index's new record closing average of 39,098.68, on Feb. 22, 2024. (Kyodo)

The index has gained nearly 17 percent since the beginning of this year following a 28 percent jump in 2023, which was its fastest rise in a decade. But that frothiness has left little room for upside, analysts say, with the next target at 40,000 for the time being.

"The decisive difference now is that companies aren't overvalued like they were in the bubble (era)," Toshikazu Horiuchi, equity strategist at IwaiCosmo Securities, said.

The market could see another run-up after reaching the all-time high, "so long as companies post strong earnings in the next reporting season," said Horiuchi, who has worked through both market highs.

Major Japanese companies are expected to see about 13 percent growth in combined net profit in the year to March 2024, logging a record for the third straight year, according to SMBC Nikko Securities' earnings forecast for about 1,400 listed companies on the Tokyo bourse.

Real estate companies and banks were among the largest companies by market capitalization in 1989. Today, the biggest contributors include semiconductor makers and other manufacturers.

Investors have snapped up chip-related companies such as Advantest and Tokyo Electron as the artificial intelligence theme drives speculation about higher long-term demand, analysts say.

Exporters like Toyota are well supported by the U.S. dollar, which has remained strong after rising to a 32-year high against the yen in 2022. A weaker yen lifts income earned abroad and strengthens the price competitiveness of Japanese-made products sold overseas.

Buying by foreign investors, who account for around two-thirds of trade on the Tokyo Stock Exchange, was notable in the recent market rally.

Perhaps the most high-profile overseas investor in Japan is billionaire Berkshire Hathaway Chairman and Chief Executive Officer Warren Buffett, who in 2020 bought shares in five major trading houses and in 2023 upped his stakes, putting Japan back on the map for value-seeking investors.

Overseas buyers snapped up a net 2.07 trillion yen ($13.8 billion) in Japanese stocks in January, the seventh-largest monthly accumulation since data became available in 1982, according to the bourse.

Japan Exchange Group Inc. last year called on listed companies to focus more on improving their stock prices and capital efficiency to make themselves more attractive to investors. The request prompted companies to buy back shares and return capital through higher dividend payouts.

Masahiro Yamaguchi, head of investment research at SMBC Trust Bank, said Mitsubishi Corp. is a good example. The company saw its stock price hit all-time highs in early February after its plan to buy back up to 10 percent of outstanding shares attracted attention.

"Companies have realized that the stock exchange is really on their case to improve their offering to investors," Yamaguchi said.

On the macroeconomic front, market participants are betting on Japan ending its decades-long battle with deflation through recent price increases and entering a period of sustainable growth.

But recent strong gains on the market are likely to make short-term investors focus more on locking in profits than on chasing upside, analysts say. In the first half of February, the index soared 2,200 points or 6 percent.

Market players are increasingly cautious about Japan's monetary policy future as many expect the Bank of Japan will phase out its massive monetary stimulus program in the coming months.

The move is widely anticipated to boost the yen and therefore put pressure on exporter profits. But questions remain as to how the market will react.

"While the policy change, when it comes, could strengthen the yen briefly, investors are likely to be reassured that further strengthening can be avoided," Makoto Sengoku, senior equity market analyst at Tokai Tokyo Research Institute, said.

The market is also carefully monitoring whether Japanese companies can offer pay increases that outpace price increases during this year's wage negotiations. Talks between unions and most large companies are expected to conclude by mid-March, with smaller firms completing theirs later.

Inflation-adjusted wages have remained stagnant in Japan. Real wages dropped 2.5 percent in 2023 for the second straight year of decline as salary increases failed to keep up with inflation.

"Once salary discussions are over, the question will be whether they translate to a clear rise in real wages," said Kazuo Kamitani, a strategist at Nomura Securities.

Some investors are also concerned about the result of the U.S. presidential race, as a return of former President Donald Trump could create U.S. foreign and trade policy chaos and pose a considerable challenge in the wake of the November election.

Trump has warned he will no longer defend NATO members who fail to spend 2 percent of GDP on defense, a target Japan is pursuing despite not being a signatory to the treaty. The Republican candidate-in-waiting is also proposing a 10 percent tariff on all imported goods which will hurt demand for Japan-made products.

Despite the external and internal risk factors Japan-focused investors face, analysts are optimistic that this new peak is not another bubble -- and that the market has turned a corner

"Tokyo stocks finally exceeded past glories naturally, suggesting they are liberated from the curse of the past and that we're in a new age for Japanese stocks," said SMBC Trust Bank's Yamaguchi.

Related coverage:

Japan's Nikkei stock index closes at all-time high

Tokyo bourse reclaims top spot for market capitalization in Asia

Dollar rises to 150 yen, 1st since November, after U.S. price data