Technology stocks rose 1.8 percent, the most of the 10 industry groups in the S&P. That's a big change from tech's weak performance this year. The group is up just 4.7 percent, trailing the S&P's gain of 11.3 percent.
"Tech has performed so poorly, it's oversold and warrants some interest here," said Scott Wren, a senior equity strategist at Wells Fargo Advisors. "If the economy continues to improve there is going to be some capital spending."
The stock market has reversed course this week, rising three straight days. Last week, investors' confidence fell because of an unexpectedly poor report on the U.S. job market and other signs that the economy slowed in March.
The Dow Jones industrial average jumped 128.78 points Wednesday, or 0.9 percent, to 14,802.24. It was the biggest one-day rise in a month. The Dow is up 13 percent in 2013.
The Nasdaq composite, which is heavily weighted with technology stocks, had the biggest percentage gain of the three main indexes Wednesday, rising 59.39 points, or 1.8 percent, to 3,297.25. The S&P rose 19.12 points, or 1.2 percent, to 1,587.73.
Investors viewed positively the minutes from the Federal Reserve's latest meeting, which were released before the market opened. The minutes revealed that policy makers are becoming more confident that the U.S. economy can grow without stimulus from the Fed, said Brian Gendreau, a market strategist at Cetera Financial Group.
The Fed released the minutes at 9 a.m. Eastern, five hours ahead of schedule, after the document was inadvertently distributed to congressional staff and trade group officials. The market rose steadily in the morning and stayed high through the afternoon.
A majority of the Fed's 12 policymakers want to continue the stimulus. Still, many members indicated they want to slow and eventually end the program before the end of the year, as long as the job market and economy show sustained improvement. The Fed didn't disclose how many of its policymakers held those views.
That suggests that a number of Fed officials think the economy may be doing well enough to stand on its own. The Fed has been buying $85 billion worth of bonds each month to keep interest rates extremely low, encourage borrowing and spending and drive money into riskier assets like stocks.
"The idea that the Fed thinks that we are closer to the restoration of normality might be positive for the market," said Gendreau.
While the Dow and S&P have been setting record highs frequently over the past month, the Nasdaq remains 35 percent below its record of 5,048 set March 10, 2000. The index surged the during the technology bubble of the late 1990s. The Nasdaq is at its highest level in more than 12 years.
Among stocks making big moves, Facebook rose 98 cents, or 3.7 percent, to $27.57 after General Motors said it would start running ads on the social network site. Adtran rose $2.75, or 14 percent, to $22.46, and JDS Uniphase rose 64 cents, or 4.8 percent, to $13.98.
Hospital stocks fell heavily after Deutsche Bank lowered its recommendation on the companies because their prices have risen so much that they no longer offer good value. Private hospitals have surged over the past year in anticipation that health care spending will increase after President Barack Obama's health care plan starts. Health care is the best-performing industry group in the S&P over the past year, up 29.6 percent.
Health Management Associates plunged $2.06, or 16 percent, to $10.53. Tenet Healthcare fell $2.38, or 5.5 percent, to $41.14, and Community Health Systems dropped $1.65, or 3.8 percent, to $42.26.
Bond yields fell as investors moved money out of safe U.S. government debt and into riskier assets. The yield on the 10-year Treasury note rose to 1.81 percent from 1.75 percent late Tuesday.