For all the obsessing over central banks, in the end it was another week where oil played a key role in calling the shots for U.S. equities.

Commodity producers helped send the Standard & Poor’s 500 Index up 1.1 percent to 2,022.19, the highest close of the year, as crude rallied 7.2 percent. Even amid signs oil’s correlation with equities is weakening, both have now risen for four straight weeks, the longest concerted advance since 2013.

While Mario Draghi’s European Central Bank dominated headlines by adding to stimulus that has underpinned the S&P 500’s seven-year bull market, evidence of stability in crude also helped. A settling-down in energy prices that have swung wildly for 20 months is a bullish signal for banks, the credit market and an oil industry whose finances have been ravaged as crude lost 76 percent from July 2014 to February.

“Anytime a central banker speaks it monopolizes the market’s attention, but the energy issue is very important in terms of the wheels of the market turning,” Joe Sowin, head of global equity trading at Dallas, Texas-based Highland Capital Management LP, said by phone. “The message is consumers and companies are feeling more comfortable now that the large rate of change is behind them.”

The S&P 500’s gain gives it the longest run of weekly gains since November and trimmed its 2016 loss to 1.1 percent. The gauge fell 11 percent in the first six weeks of the year in the worst start on record. Oil has recouped its losses this year, after slumping to a 12-year low last month, amid speculation stronger demand and falling production will ease a supply glut.

Energy shares, the worst performer in the S&P 500 last year with a 24 percent rout, continued to be among the leaders during the month-long resurgence. The group’s 1.9 percent advance pushed the gain since markets bottomed on Feb. 11 to 14 percent, just behind surges among banks and raw-materials producers. Chevron Corp. rallied 7.6 percent in the five days to lead the Dow Jones Industrial Average, which also capped a fourth straight weekly gain.

“Who would have thought at the end of last year that large-cap energy could be an outperformer versus the S&P as a whole,” Nicholas Colas, chief market strategist at Convergex Group LLC, said in an interview on Bloomberg Radio. “Oil prices are recovering and the sector has been so beaten down it’s a good place to look. Bottom line, we’re still sticking with energy and we think it’s a great trade.”

While oil and equities are rallying in tandem, there is evidence that the lockstep moves in assets that also included junk bonds are easing after concerns about economic growth and solvency risk wove markets together tightly. The correlation between daily moves in the S&P 500 and crude has fallen to 0.57 from a 30-month high of 0.67 on Feb. 26.

The latest rally broke another run of linked gains, with the S&P 500’s advance outpacing a Goldman Sachs Group Inc. index of the most-shorted shares for the first time since Feb. 11. In the previous three weeks, the short index had beaten the benchmark by 15 percentage points, the biggest outperformance since its inception in 2008.

Stocks got their biggest gain on Friday as the ECB’s decision to cut interest rates and boost a bond-buying program spurred demand for riskier assets. After initially rising on the Thursday announcement, shares ended that day little changed as investors questioned whether central banks still had the ability to jolt the world economy out of its malaise.

“It was interesting to see the market reaction that was bullish, then reversed, and now back to the reaction we had in the first place,” Luca Paolini, chief strategist at Pictet Asset Management in London, said by phone. His firm oversees about $150 billion. “QE’s incremental support for the market will be less and less but the decision was almost forced to surprise people to the upside.”

Central-bank commentary is set to dominate the coming week. While traders are pricing in little chance the Federal Reserve will raise rates, they have boosted the odds for later in the year, with the June meeting now a 50-50 proposition. The Bank of Japan and the Bank of England also meet next week.

The gains in American equities have been bolstered by improving data from hiring to manufacturing that have signaled the U.S. economy can avoid a recession. Yet investors remain cautious, pulling money from equity funds at a near-record pace, as the Fed appears intent on tightening policy that’s helped push the S&P 500 higher by almost 200 percent in the past seven years.

“Just a month ago, everyone was convinced we were in a bear market, and now a month later we’re 10 percent higher and the sun is coming back out,” said John Canally, chief economic strategist at LPL Financial Corp. in Boston. “Another round of data has to confirm how far we’ve come, and the Fed is going to be the key test next week by far.”