The S&P 500 climbed to a record high on the final day of June to close out a strong first half of the year for Wall Street.
The Dow Jones Industrial Average rose about 210 points, boosted by strong days for Walmart, Boeing, and Goldman Sachs, to 34,502.51. The S&P 500 nudged up 0.1% to 4,297.50 for its fifth-straight record close. The Nasdaq Composite lagged, ticking down roughly 0.2% to 14,503.95.
Wednesday was the last day of the second quarter and final day of the first half of 2021. The S&P 500 has risen 14.4% year to date, while the Nasdaq Composite and the Dow have each gained more than 12%. For the quarter, the S&P 500 climbed 8.2%.
The S&P 500 clinched its fifth positive month in a row, rising more than 2% in June. The broad index also notched its best first half since 2019.
Investors have shrugged off high inflation readings and have kept buying stocks on the hopes an economic comeback from the pandemic would continue and the Federal Reserve would mostly maintain its easy policies. The three biggest winner in the Dow this year so far is Goldman Sachs, which rose nearly 2% on Wednesday and is up more than 40% for the year. American Express and Walgreens Boots Alliance are each up more than 30% year to date.
The gains came as nearly 60% of U.S. adults have received a COVID-19 vaccine, allowing the economy to reopen at a rapid pace. Still, new variants of the virus have raised some concerns that more restrictions such as mask wearing would have to be reinstituted because the pace of vaccinations has slowed.
Investors have "a litany of reasons to stay constructive," wrote Tom Lee, managing partner and head of research at Fundstrat Global Advisors, citing economic momentum, strong credit markets and possible fiscal stimulus.
Lee raised his S&P 500 target for 2021 to 4,600 from 4,300 in a note to clients Tuesday night. The new forecast represents a 7% gain from here.
Jeff Kilburg, the chief investment officer at Sanctuary Wealth, told CNBC that he is optimistic about the second half thanks to the Federal Reserve's continued commitment to the economic recovery.
"We can fight all we want about inflation, and we can fight about which metric we utilize for inflation, but I think at the end of the day we really are seeing the commitment the Fed's going to have," Kilburg said, adding that the amount of investor cash on the sidelines should keep any minor pullbacks from becoming larger corrections.
Some investors and strategists have cited the spread of the Delta variant of Covid-19 as a risk for markets in the second half of the year. However, JPMorgan's Marko Kolanovic said in a note to clients on Wednesday that the variant shouldn't hurt equity markets, citing low fatality rates in countries with widespread vaccinations.
Good first halves for the market usually bode well for the rest of the year. Whenever there has been a double-digit gain in the first half, the Dow and S&P 500 have never ended that year with an annual decline, according to Refinitiv data going back to 1950.
One group that has helped the broad market reach its latest round of record highs is chip stocks. The VanEck Semiconductor Index has gained 6.2% since June 18 and more than 3% this week, thanks to gains by Nvidia in particular.
"Semis have bounced back in a big way, and over the last two trading days have finally broken the downtrend that has been in place since that mid-February peak. New highs and a broken downtrend? It's been a big week for semis," Bespoke Investment Group said in a note to clients.
A busy day for initial public offerings on Wednesday was headlined by ridesharing company Didi, which popped in its opening minutes before retreating toward its IPO price later in the session.
Pending home sales jumped in May to their highest level since 2005. However, mortgage demand fell last week, the Mortgage Bankers Association said Wednesday, with high prices and low supply appearing to squeeze out some potential buyers. The readings came after a jump in home prices, reflected in the S&P CoreLogic Case-Shiller index, spurred homebuilder stocks higher on Tuesday.
Elsewhere, the Instituted for Supply Management's Chicago purchasing managers index came in lower than expected for June but still showed expansion.
Payroll firm ADP reported that private payrolls rose 692,000 in June, beating expectations. However, the firm's May number was revised down.
During the regular session Tuesday, stocks were little changed in light trading although the S&P 500 did notch its 4th straight positive session and an all-time high.
Stocks likely won't see big movement until Friday's jobs report gives a better idea of the state of the economy. Economists expect 683,000 jobs were added in June, according to a Dow Jones survey.
—CNBC's Robert Hum contributed to this report.