Stocks rose as investors cheered the dovish approach discussed in minutes from the latest Federal Reserve meeting, but the gains were muted by concerns that the partial shutdown of the U.S. government will continue for some time. The dollar fell and Treasuries rose, while oil surged above US$52 a barrel and entered a bull market.

The S&P 500 Index was up for a fourth consecutive day led by energy producers, reaching the highest level in almost a month. The Nasdaq benchmarks were the strongest performers on strength in semiconductors and technology hardware manufacturers.

The Fed minutes showed that many central bankers urged patience on future interest rate hikes, an indication that they’re attentive to recent financial-market volatility and risks to the economic outlook.

“I’m happy to see that there was caution in the minutes because it means that the market didn’t mug the Fed,” Alicia Levine, chief strategist at BNY Mellon Investment Management chief strategist, said on Bloomberg TV. “You want it to be that this is what the FOMC really believes, that caution is warranted, that they’re going to be data-dependent, and there are alternative outcomes that they should be aware of. I take great comfort in these minutes.”

Stocks surged as the minutes were released, but they quickly retreated as President Donald Trump emerged from a meeting with Senate Republicans. Trump said the GOP was “very unified” behind his plan to keep the government closed until he gets funding to build a wall along the Mexican border, which is at the center of the dispute. He then walked out of a meeting with Democratic congressional leaders Nancy Pelosi and Charles Schumer, calling it a “ total waste of time,” which further ate away at the gains.

If the shutdown goes on for months longer “we’re not going to have a budget, and I think we’re going to see a lot of fallout from that point,” said Rich Guerrini, chief executive officer of PNC Investments, which manages US$50 billion. “But I don’t know that I see anything on the short-term other than partisan politics.”

Earlier, equities gained after the Trump administration confirmed that China committed to buy more U.S. agricultural goods, energy and manufactured products. Trump is said to be eager to reach a trade agreement with China to help revive the flagging stock market. However, the countries remain far apart on some key issues. And Chinese and American officials are reportedly coordinating their messaging to make sure markets interpret the results of the meeting optimistically.

Although concerns linger about how protectionist tensions and political instability in the world’s largest economy will affect global growth, they also set up a potential Goldilocks scenario for markets after Fed’s apparent dovish shift.

“A softness in the economy or in some indicators would allow the Fed the space not necessarily to continue to raise,” said Kim Forrest, senior portfolio manager at Fort Pitt Capital Group in Pittsburgh. “That is going to drive the market higher.”

The Stoxx Europe 600 Index climbed to the highest in a month led by carmakers and miners, while Hong Kong stocks set the pace for Asian benchmarks. And most industrial metals advanced after the Asian nation signaled measures to spur consumption.

Elsewhere, emerging-market stocks extended a rally that’s taken MSCI’s gauge to the highest in more than a month. The Bloomberg Commodity Index rose for a sixth straight day, and gold ticked higher.

Here are some events investors may focus on this week:

Fed Chairman Jerome Powell will speak to the Economic Club of Washington D.C. on Thursday. Britain’s Parliament resumes a debate on the Brexit withdrawal bill, with Prime Minister Theresa May seeking to avoid defeat in a vote set for the week of Jan. 14.

These are the main moves in markets:

Stocks

The S&P 500 rose 0.4 per cent to 2,584.96, while the Nasdaq 100 Index gained 0.8 per cent. The Stoxx Europe 600 Index increased 0.5 per cent to the highest in almost four weeks. The MSCI All-Country World Index advanced 1 per cent. The U.K.’s FTSE 100 Index Index climbed 0.7 per cent to the highest in five weeks. The MSCI Emerging Market Index jumped 2.1 per cent to the highest in more than a month.

Currencies

The Bloomberg Dollar Spot Index dropped 0.8 per cent. The euro gained 1 per cent to US$1.1552. The British pound climbed 0.7 per cent to US$1.2801. The Japanese yen rose 0.7 per cent to 108.03 per dollar.

Bonds

The yield on 10-year Treasuries fell one basis point to 2.719 per cent. Britain’s 10-year yield added one basis point to 1.2801 per cent. Germany’s 10-year yield climbed five basis points to 0.279 per cent.

Commodities

The Bloomberg Commodity Index rose 1.2 per cent. West Texas Intermediate crude advanced 5 per cent to US$52.28 a barrel, reaching the highest in a month on its eighth consecutive gain. Gold increased 0.7 per cent to US$1,293.71 an ounce.