Japan’s biggest firms are taking different views on the state of the economy as clouds gather over global growth while opened borders and relaxed restrictions offer renewed opportunities at home.

An index of confidence among the country’s biggest manufacturers edged down to 7 in December from 8, while the reading for large service sector and construction firms rose, according to the Bank of Japan’s quarterly tankan report released Wednesday. Both results were stronger than expected by economists. A positive figure means optimists outnumber pessimists.

The fourth straight quarterly fall for manufacturers was largely led by makers of oil and coal products, but the improvement in a range of other sectors suggested that firms’ pessimism wasn’t deepening across all sectors.

Nonmanufacturers, on the other hand, took a much more positive view amid Japan’s reopening to international visitors and an improved outlook for virus cases after the summer’s surge. The index for confidence improved to 19 from 14.

"Manufacturers, especially the auto sector, are cautious because of slowdown risks in the United States and Europe,” said Nobuyasu Atago, chief economist at Ichiyoshi Securities and a former BOJ official. "On the other hand, nonmanufacturers are getting a lift from the end of COVID restrictions.”

Reflecting the improved domestic environment, the mood among personal service and hospitality providers improved markedly. Sentiment among large hotels and restaurants turned neutral after 11 quarters of deep pessimism during the pandemic. Japan’s borders had been closed to tourists for more than two years.

Active corporate investment driven by the softer currency and pent-up demand are other positive factors. The yen’s plunge has helped exporters boost their profitability and created room for more investment. The government also booked ¥7 trillion ($51.2 billion) in its most recent extra budget to encourage companies to spend more, especially on digitalization and decarbonization.

A separate report showed that the country’s machine orders rose 5.4% in October from the previous month, also pointing to resilient capital investment in the current quarter.

"Weaker external demand probably weighed on manufacturers. Nationwide travel subsidies and relaxed border restrictions for inbound travelers probably supported the service industry," said Yuki Masujima, economist at Bloomberg Economics.

Still, the edging down in sentiment for goods producers suggests that Japanese manufacturers remain on alert for a possible worldwide slowdown of economies. Following the Federal Reserve’s rapid tightening of monetary policy, more economists are saying the U.S. will likely have a recession next year.

Uncertainty continues to hang over China’s virus-related policies, though it has finally begun a relaxation of restrictions. Data earlier this month showed Japan’s factory output fell more than analysts estimated in October, likely due in part to weaker demand from the world’s second-largest economy.

Accelerating price hikes also remain a worry. Japan’s inflation hit a four-decade high in October, while real wages declined for the seventh straight month.

Prime Minister Fumio Kishida’s administration aims to protect consumers from the damage of accelerating inflation through its latest economic stimulus measures. The package, worth ¥39 trillion ($288 billion) in fiscal spending, includes anti-inflationary measures and various aids for businesses to keep growing amid rising uncertainty.

The tankan survey showed Japanese companies expect the exchange rate to be ¥130.75 against the dollar this fiscal year, compared with ¥125.71 in the previous survey. The yen has made gains in recent weeks, and got a further boost overnight after weaker than expected U.S. inflation figures put the possibility of a pause from the Fed’s interest-rate hikes in view.

The BOJ will take the tankan outcome into account at its the upcoming policy meeting scheduled for Dec. 19 and 20.

"There’s continued concern within the manufacturing industry about a downturn due to the global economic slowdown,” said Shumpei Fujita, economist at Mitsubishi UFJ Research & Consulting. "The BOJ won’t halt monetary easing here but will continue to address future risks with monetary policy.”