Looking for crumbs, a pigeon goes about its business on...

Looking for crumbs, a pigeon goes about its business on April 11, 2016 near the Wall Street subway entrance. On Friday, April 22, 2016, closed with tiny gains or flat. Credit: Bloomberg News / Michael Nagle

A rebound in the price of oil and natural gas Friday helped drive sharp gains for energy and financial companies, nudging U.S. stocks mostly higher.

That offset a slide in the technology sector following disappointing earnings from Microsoft, Google parent Alphabet and other big names.

After a day of waffling, 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.

At the close on Wall Street, the Dow had gained 21.23 points, about 0.1 percent, to 18,003.8. The S&P 500 index added 0.10 points to 2,091.6. The Nasdaq composite index lost 39.7 points, about 0.8 percent, to 4,906.2.

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.

The U.S. benchmark price of crude oil rose 55 cents, about 1.3 percent, to $43.73 a barrel on the New York Mercantile Exchange. In London, the price of Brent crude, the international standard, rose 63 cents, about 1.4 percent, to $45.16.

Rock climbing? Indoor beach volleyball? Water parks? Arts and crafts? NewsdayTV's Elisa DiStefano and Newsday deputy lifestyle editor Meghan Giannotta have your look at ways to spend your winter break. Credit: Newsday/Howard Schnapp, Kendall Rodriguez; Gary Licker

Things to do now on LI Rock climbing? Indoor beach volleyball? Water parks? Arts and crafts? NewsdayTV's Elisa DiStefano and Newsday deputy lifestyle editor Meghan Giannotta have your look at ways to spend your winter break.

Rock climbing? Indoor beach volleyball? Water parks? Arts and crafts? NewsdayTV's Elisa DiStefano and Newsday deputy lifestyle editor Meghan Giannotta have your look at ways to spend your winter break. Credit: Newsday/Howard Schnapp, Kendall Rodriguez; Gary Licker

Things to do now on LI Rock climbing? Indoor beach volleyball? Water parks? Arts and crafts? NewsdayTV's Elisa DiStefano and Newsday deputy lifestyle editor Meghan Giannotta have your look at ways to spend your winter break.

SUBSCRIBE

Unlimited Digital AccessOnly 25¢for 6 months

ACT NOWSALE ENDS SOON | CANCEL ANYTIME