NEW YORK — The Standard & Poor’s 500 index eked out its second small gain of the week Wednesday as investors pored over the latest earnings reports.

Norfolk Southern climbed after the railroad company said its fourth-quarter profit rose 24 percent, better than analysts had forecast.

TE Connectivity, an electronics company, was the biggest gainer in the S&P 500 after its earnings beat analysts’ expectations and the company posted a strong earnings outlook for the second quarter.

IBM fell after it reported lower-than-expected revenue in the period. AMD slumped after the chipmaker’s first-quarter revenue outlook rattled investors.

Much of the improvement for companies in recent years has come from cutting costs. As the economy strengthens, investors are increasingly looking for evidence that companies can increase revenue.

“There’s not a lot of cost left for companies to squeeze out,” said Andy Zimmerman, chief investment strategist at DT Investment Partners.

The S&P 500 index rose 1.06 point, or 0.1 percent, to 1,844.86. After a small gain Tuesday, the index is six points, or 0.3 percent, higher for the week.

The Dow Jones fell 41.10 points, or 0.3 percent, to 16,373.34.

The Nasdaq climbed 17.24 points, or 0.4 percent, to 4,243.