By Anora Mahmudova, MarketWatch

NEW YORK (MarketWatch) -- The U.S. stock market ended Wednesday with modest gains that sent the benchmark S&P 500 index to a record level for the 16th time this year.

A mixed bag of economic reports sent shares lower in early trade, but investors appeared to have shrugged them off by the afternoon.

Private-sector hiring slowed in May, and April's outsize gains were revised down. The trade deficit jumped in April to a two-year high, above expectations, while productivity in the first quarter declined sharply due to harsh winter.

The only encouraging report on Wednesday came from the Institute for Supply Management, which reported that the service sector activity heated up last month, with the closely watched index jumping to the highest level in 9 months.

The S&P 500 (SPX) closed near session highs, up 3.62 points, or 0.2%, at 1,927.86. The Dow Jones Industrial Average (DJI) rose 15.19 points, or 0.1%, to 16,737.53. The Nasdaq Composite (RIXF) ended the day up 17.56 points, or 0.4%, at 4,251.64.

Read the recap of MarketWatch's live blog of today's stock-market action.

"The outlook for the US economy continues to improve, as the rebound in economic activity is showing up across the sectors," wrote Peter Cardillo, chief market economist at Rockwell Global Capital.

"The setting of new records on a daily basis for the Dow and S&P suggest a summer higher trading range is unfolding. On the other hand, from a technical perspective, the market may be overly complacent and small pullbacks should be expected as the bull trend remains in place," Cardillo wrote.

Private-sector employers added 179,000 jobs in May, Automatic Data Processing Inc. reported Wednesday. The number was below the expected gain of 210,000.

The U.S. trade deficit surged in April to a two-year high, while U.S. productivity in the first quarter declined at a sharp annual rate -- the worst in six years, due to an unusually harsh winter.

On the bright side, growth picked up last month for the U.S. service sector and non-manufacturing companies, with the index tracking the activity rising to the highest reading since August.

Separately, the Federal reserve reported that most regions of the U.S. are continuing to grow at a "modest" and "moderate" pace. The so-called Beige Book found rising consumer spending, healthy manufacturing, but a wobbling residential real estate sector.

Corporate news

Hovnanian Enterprises Inc. shares fell 2.2% Wednesday after reporting second-quarter earnings that fell short of expectations.

In deal news, Protective Life Corp. shares (PL) jumped 18% after Japan's Dai-ichi Life Insurance Co. said it plans to buy the U.S.-based life insurer for $5.7 billion.

First Solar Inc. (FSLR) is one of the biggest gainers today in the S&P 500, rising 3.9%. SunPower Corp (SPWR) is up 7%. U.S. solar companies likely are getting a lift from a U.S. government move that could hurt their Chinese competitors.

A 1.1% rise in Apple Inc. (AAPL) shares helped Nasdaq Composite higher.

In other markets, most Asian equities fell, taking their cue from losses in U.S. stocks Tuesday. In Europe, the benchmark Stoxx Europe 600 closed nearly flat.

Gold futures (GCQ4) and oil futures (CLN4) settled lower.

More must-reads from MarketWatch:

Half of Americans can't afford their house

Commentary: The economy is in great shape, and we just don't know it

Bitcoin start-up lets people send bitcoin to Facebook friends

Subscribe to WSJ: http://online.wsj.com?mod=djnwires

Planet Labs PBC (NYSE:PL)
Historical Stock Chart
From Mar 2024 to Apr 2024 Click Here for more Planet Labs PBC Charts.
Planet Labs PBC (NYSE:PL)
Historical Stock Chart
From Apr 2023 to Apr 2024 Click Here for more Planet Labs PBC Charts.