The Dow Jones industrial average rose on Friday as Wall Street booked a week of solid gains following a strong rally in energy stocks. The Dow also posted a seven-day winning streak.
The 30-stock index closed 91.64 points higher at 24,831.17 with Verizon and Merck as the best-performing stocks. Meanwhile, the gained 0.2 percent to close at 2,727.72 as telecommunications and health care outperforming. The Nasdaq composite closed just below breakeven at 7,402.88.
For the week, the Dow rose 2.3 percent — its biggest weekly gain since March — while the S&P 500 and Nasdaq climbed 2.4 percent and 2.7 percent.
Energy stocks led the way for the major indexes this week, climbing 3.8 percent. The sector received a boost from surging oil prices, which jumped after President Donald Trump pulled the United States out of the Iran nuclear deal.
"Energy is going to lead the market," said Marc Chaikin, CEO of Chaikin Analytics. "I don't think the current price of oil is pricing in the full ramifications of the Iran deal."
Back in 2015, the Obama administration and Iran signed a deal to defer sanctions on Iranian oil exports, while Iran curbed its nuclear program. On Tuesday, Trump said the U.S. was pulling out of that deal and restoring sanctions.
Technology shares also contributed to the index's weekly gains, rising 3.5 percent. Leading the S&P 500's biggest sector by market cap were Facebook and Google-parent Alphabet, which climbed more than 5 percent. Apple — the biggest U.S. publicly traded company — reached an all-time high this week.
Equities broke out of a tight trading range this week. The S&P 500 and Dow closed above their 50-day moving averages this week. The 50-day moving average is a key technical level watched by technical analysts and strategists.
"Tough just yet to think the market is completely out of the woods, but it's been right to be bullish and until trends reverse …, this will still be the case," said Mark Newton, managing member at Newton Advisors. "We've seen constructive trend breakouts in the SPX and in [Dow] yesterday, while Nasdaq got over April highs and seems to have a bit more to go higher."
In corporate news, chipmaker Nvidia reported better-than-expected earnings and revenue, while giving upbeat guidance. The stock fell 2.2 percent, however.
Verizon shares jumped more than 3 percent after analysts at J.P. Morgan upgraded the telecom giant, noting that its heft dividend and 5G network plans will be a boost.