(Reuters) - An agreement by oil-producing nations on Sunday to cut output by a record amount may sustain a recent bounce in stocks, although stay-at-home restrictions and closures tied to the coronavirus pandemic still weigh on the global economy.

FILE PHOTO: The sun is seen behind a crude oil pump jack in the Permian Basin in Loving County, Texas, U.S., November 22, 2019. REUTERS/Angus Mordant

OPEC and allies led by Russia agreed to cut oil output by a record amount - representing around 10% of global supply - to support oil prices amid the pandemic, although sources told Reuters that effective cuts could amount to as much as 20%.

S&P futures ESC1 were down on Sunday evening, while U.S. crude futures CLc1 and Brent LCOc1 opened higher before paring gains.

The deal could buoy oil prices over the longer term and boost stocks, since talks between producers had hit roadblocks late last week, some analysts said.

“The broader market will see this as another point of stabilization as the economy, primed by favorable fiscal and monetary policies, seems to be avoiding the worst-case market scenarios,” said Rick Meckler, a partner at Cherry Lane Investments in New Jersey.

Oil prices have been slammed recently by concerns about demand because of virus-related restrictions, with U.S. crude ending Friday's trade at $22.76, down 62.7% year-to-date. The S&P 500 energy sector .SPNY has fallen about 43% this year.

Some analysts cautioned that some hopes of an accord had already been factored into stock prices. The S&P 500 rose 12% last week, notching its best weekly gain since 1974.

At the same time, many believe that the scope of any rally - whether in oil or stocks - will be limited by the coronavirus-related shutdowns that have slowed economic activity around the world.

Measures to slow the spread of the respiratory virus have destroyed demand for fuel and driven down oil prices, straining budgets of oil producers and hammering the U.S. shale industry, which is more vulnerable to low prices due to its higher costs.

If the global economy stays closed for another few months, “this 9.7 million (bpd) reduction will be meaningless because people aren’t driving,” said Peter Cardillo, chief market economist at Spartan Capital Securities. He added, however, that the prospect of deeper cuts would likely be welcomed.

Edward Moya, senior market analyst at Oanda in New York, wrote that the deal would help support oil prices.

“Despite the skepticism that this production deal will not see a high-level of compliance, it should end calls for oil prices to fall to single digits,” Moya said.