U.S. stocks stabilized and ended with a small gain Friday, but it wasn’t enough to prevent the market’s biggest weekly drop since April.

Investors became more cautious this week as corporate earnings for the April-June period began trickling in. Worrisome news about a Portuguese bank also revived fears about the European debt crisis. That weighed on stocks, which had closed out the previous week at record highs.

Investors are now mulling whether the stock’s market valuations are justified by the outlook for company earnings, or whether they have risen too far, too fast.

As investors try to make sense of the market, “we could be in a holding pattern,” said Kristina Hooper, US Investment Strategist at Allianz Global Investors.

Lorillard, whose cigarette brands include Newport, Old Gold and Kent, rose $2.92, or 4.6 percent, to $66.01. Lorillard and rival Reynolds American confirmed they are in talks to combine — a deal that would create a formidable rival to Altria Group Inc., owner of Philip Morris USA.

Investors also pored over company earnings.

Fastenal, a maker of industrial fasteners, fell the most in the S&P 500. Its stock dropped $2.01, or 4.2 percent, to $46.15 after reporting sales that missed analysts’ expectations.

As U.S. companies start to report second-quarter results, investors expect more growth in profits. Earnings for S&P 500 companies are forecast to climb by 6.4 percent. That rise would be bigger than the 3.4 percent increase in the first quarter and the 4.9 percent in the same period a year earlier, according to data from S&P Capital IQ.

While earnings are rising, stock valuations have also climbed.

The price-earnings ratio for S&P 500 companies, which measures a company’s stock price compared to next year’s forecast earnings, has edged higher to 15.7 from 15.1 at the start of this year and 12.6 at the start of 2013.

“With valuations where they are … we are pleasantly surprised at the resilience of the market,” said Colleen Supran, a principal at Bingham, Osborn & Scarborough, an investment management company. “Investors still seem to be able to find reasons not to panic.”

That was evident Friday, and even Thursday, when the U.S. stock market opened with a plunge as investors worried about the financial health of a holding company linked to Portugal’s biggest bank.

The market regained much of its early loss Thursday afternoon. On Friday, it held steady.

In government bond trading Friday, prices rose. The yield on the 10-year Treasury note, which moves in the opposite direction to its price, dropped to 2.52 percent from 2.54 percent.

Oil had its biggest one-day drop since April, as Libyan oil appears poised to return to the market while global demand looks to be muted. Oil fell $2.23, or 2.2 percent, to $100.70.