Union Pacific climbed 0.8 percent to lead gains in shipping companies, while Costco Wholesale rallied 1.7 percent to help lead an advance in companies that sell consumer goods. Bank of America and JPMorgan Chase slumped at least 1.1 percent as financial stocks retreated.

“We’re beginning to put the short-term economic issues behind us,” said Robert N. Schaeffer, a money manager at Becker Capital Management in Portland, Ore. “We’re likely to get better economic data over the next months and that will rally the stock market on an intermediate basis even if the long-term problems, such as too much debt, remain unsolved.”

The recent rally has exposed a partial shift that had favored companies less sensitive to economic growth. Since the S.& P. 500 slipped to its low for the year in March, drug makers, phone companies, utilities and makers of household products have gained most, according to data compiled by Bloomberg. But the biggest advances in last week’s rally were among so-called cyclical stocks, including energy companies, computer makers, automakers and industrials.

Market indexes fell early on after the Institute for Supply Management services index fell to 53.3 in June from 54.6 a month earlier. A reading above 50 signals expansion. The slower pace is a sign the economy cooled at the end of the first half of 2011.

An error has occurred. Please try again later.

You are already subscribed to this email.

Other data showed employers announced 5.3 percent more job cuts in June than a year earlier, according to Challenger, Gray & Christmas, a firm based in Chicago. The report comes two days before the Labor Department’s monthly jobs report, which is expected to show unemployment unchanged at 9.1 percent.

Stock-index futures had also retreated after China’s central bank said Wednesday that it would raise its benchmark deposit and lending rates by one-quarter point . This is the third time this year China has raised rates as it tries to cool its economy, the world’s fastest growing.

“China is perceived as the economic engine of the world right now,” said Oliver Pursche, president of Gary Goldberg Financial Services based in Suffern, N.Y. “Them slowing down by raising interest rates at a time when we have an overhang of high unemployment and low growth in the U.S., as well as the sovereign debt issues in Europe, causes investors to get concerned about what the impact will be on our markets and economies.”

The News Corporation fell 3.6 percent to $17.47. The company’s News of the World, the tabloid accused of hacking into a murder victim’s voicemails, is losing advertisers including G.M.’s Vauxhall and Lloyds Banking.

A version of this article appears in print on July 7, 2011, on Page B10 of the New York edition with the headline: Equities Rise Modestly Amid Conflicting Signals. Order Reprints|Today's Paper|Subscribe