A late-afternoon burst of buying helped stock indexes close mostly higher on Wall Street Monday, snapping a five-day losing streak for the S&P 500.

The benchmark index shook off an afternoon slump to finish 0.2% higher. Banks, energy companies and communication stocks accounted for much of the index’s broad gains. Health care and utilities stocks fell. The S&P 500 was coming off its biggest weekly drop since June.

The price of U.S. crude oil rose 1% and crossed back above $70. It hasn’t closed above that level since early August. Natural gas prices jumped 5.9% and are at their highest levels since the middle of 2014. The solid gains helped lift energy stocks, including a 2.6% rise for Exxon Mobil and a 7.2% jump for Marathon Oil.

Stocks have traded in a narrow range for several weeks as most investors are sitting on the sidelines waiting to get a fuller understanding of where the economy is headed and how the pandemic is impacting corporations.

“Interestingly it’s all still within this narrow band that we’ve been seeing in the markets” said Greg Bassuk, CEO of Axs Investments. “Investors are still looking to hang their hats on more outsized or more significant news relating to the economic recovery.”

The S&P 500 rose 10.15 points to 4,468.73. Despite it’s pullback last week and modest gain Monday, the index remains just 1.5% below the all-time high it set on Sept. 2.

The Dow Jones Industrial Average rose 261.91 points, or 0.8%, to 34,869.63, while the Nasdaq slipped 9.91 points, or 0.1%, to 15,105.58.

Bond yields edged lower. The yield on the 10-year Treasury fell to 1.32% from 1.34% late Friday.

Several key pieces of news helped lift some companies and sectors.

Spirit Aerosystems, which is a key parts supplier to Boeing, rose 4.7% following the announcement of more government support for the industry. The Biden administration is making $482 million available to aviation industry manufacturers to help them avert job or pay cuts in the pandemic. Parker-Hannifin rose 1.9%.

Kansas City Southern rose 0.5% and Canadian Pacific was flat after Kansas City said a $31 billion bid from Canadian Pacific is superior to a rival one from Canadian National.

TransUnion fell 2% after announcing a deal to buy data services company Neustar.

Investors have been dealing with choppy trading for weeks as they try to assess how the economic recovery moves forward with rising COVID-19 cases hurting consumer spending and employment growth, while raising prices on goods. Wall Street is also closely watching how the Federal Reserve reacts to the changing pace of economic growth with its plans to eventually taper support for low interest rates.

“The major market triggers going back to COVID-19, the Fed, and geopolitics are going to continue in the immediate term to show mixed signals and that will create more investor uncertainty,” Bassuk said.

Wall Street will have several key pieces of data to review this week. The Labor Department will release its consumer price index for August on Tuesday, which will give investors another update on inflation as businesses and consumers face higher prices because of supply constraints.

The Commerce Department will release retail sales data for August on Thursday to a market still trying to determine the full impact of rising COVID-19 cases on consumer spending.