A rebound in the price of oil and natural gas helped drive sharp gains for energy and financial companies, nudging stocks mostly higher Friday.
That offset a slide in the technology sector following disappointing earnings from Microsoft, Google parent Alphabet and other big names.
The Dow Jones industrial average eked out a tiny gain, while the Standard & Poor’s 500 index closed essentially flat. Both ended the week higher. But the tech-heavy Nasdaq composite fell short on both counts.
“The Nasdaq took a hit today,” said Erik Davidson, chief investment officer at Wells Fargo Private Bank.
The Dow rose 21.23, or 0.12 percent, to 18,003.75.
The S&P 500 index added 0.10 to 2,091.58.
The Nasdaq composite index lost 39.66, or 0.80 percent, to 4,906.23.
Trading was listless for much of the day, with the Dow and S&P 500 wavering between small gains and losses as the Nasdaq stayed in the red.
As was the case much of the week, investors were mostly focused on company earnings and energy prices.