The industrial data helped ease concerns about a slowing economy, amid sustained weakness in the housing market, as seen in the latest housing starts report. Market momentum also helped investors overcome a cautious outlook at chip-equipment maker Applied Materials Inc.
"Sellers are coming at these levels, but they just can't push this thing down," said Paul Mendelsohn, chief investment strategist at Windham Financial Services.
The Dow Jones Industrial Average gained 103 points to close at 13,487, a new record closing high, lifted by shares of Boeing Co. , Johnson & Johnson , Procter & Gamble , and JP Morgan Chase & Co. .
Leading gains among blue chips, Citigroup rose 4% after hedge-fund manager Edward Lampert -- better-known as the chairman of Sears Holdings -- disclosed he bought more than 15 million shares in the bank.
"This acquisition may raise the theoretical issue of whether Citigroup should be broken up or not to a new level," said Richard Bove, banking analyst at Punk Ziegel & Co.
Hewlett-Packard rose 1% ahead of posting quarterly results after the close.
In the broad market, investors cheered news that eye-care company Bausch &Lomb agreed to be acquired by affiliates of private-equity firm Warburg Pincus for about $4.5 billion, including debt.
"With all this takeover and buy-out activity, all this liquidity out there, there's a lot of stock coming out of the market," said Windham's Mendelsohn.
The S&P 500 index rose 12 points to 1,514, while the Nasdaq Composite gained 22 points to 2,547.
Trading volumes showed 1.5 billion shares exchanging hands on the New York Stock Exchange and 2.1 billion trading on the Nasdaq stock market. Advancing issues outpaced decliners by 10 to 6 on the NYSE, while decliners outpaced gainers by 17 to 12 on the Nasdaq.
Technology shares overcame pressure among chip-equipment makers. Applied Materials fell 3% after forecasting flat sales in its fiscal third quarter and up to a 15% drop in orders.
Rival chip equipment makers KLA-Tencor , Lam Research and Novellus Systems also came under selling pressure.
Elsewhere among tech shares, Agile Software jumped 12.6% after agreeing to be bought by Oracle Systems for $495 million, or $8.10 a share, a 14% premium to Tuesday's close.
Jay Suskind, director of trading at Ryan, Beck & Co., tells MarketWatch that stocks "will chug a little bit higher" before the summer doldrums arrive after Memorial Day.
The market also cheered news that the output of the nation's factories, mines and utilities rebounded in April, with gains across all major categories. The Federal Reserve said production rose 0.7% last month, better than the 0.4% expected by Wall Street economists.
"This is a clear turnaround," said Ian Shepherdson, chief U.S. economist at High Frequency Economics.
"What is not clear, though, is whether Easter seasonals or weather effects have distorted the numbers, and whether these gains can last in the face of rapidly rising core inventory and slowing retail sales," he wrote in a note.
Meanwhile, the market showed little reaction to news that U.S. home builders pulled back on filing for permits to build homes in April, but started construction on more houses than they did in March.
Building permits fell 8.9% to 1.429 million in April, the lowest since June 1997, and the largest percentage decline in 17 years. The number was much lower than the 1.51 million pace expected by economists surveyed by MarketWatch.
The stocks of homebuilders rose, with investors shrugging off the data as they did afer Tuesday's news that confidence among homebuilders fell to a 16-year low. Shares of Toll Brothers Inc. , Hovnanian Enterprises Inc. and KB Home all advanced.
Better-than-expected economic data, however, boosted the dollar and therefore had an adverse effect on dollar-denominated commodities. As the U.S. currency rises, it means less dollars are needed to buy the same amount of a given dollar-denominated commodity.
The dollar especially gained against the yen, while the Bank of Japan began a two-day policy meeting.
Gold futures suffered the most, dropping $13, or 1.9%, to $661.50 an ounce, a two-month low. The precious metal suffered a double-whammy as oil fell, which removed some of gold anti-inflationary premium.
Crude oil futures dropped 62 cents to close at $62.65 a barrel after news of an increase in weekly gasoline supplies.
Treasury bonds finished flat after the industrial production and the housing data. The benchmark 10-year Treasury bond unchanged at 98 12/32, yielding 4.708%.
The stock market has shown little concern about a slowing economy recently.
Stocks finished mixed on Tuesday after news of weaker-than-expected consumer prices in April eased concerns about inflation, boosting hopes that the Federal Reserve will be able to cut interest rates to boost a slowing economy.
But there was further confirmation of a weak trend in consumption after reports from Home Depot and Wal-Mart Stores .
A few more earnings reports were still trickling through Wednesday.
Sony rose 6% after the Japanese electronics giant said this year's earnings will rise on a recovery on its consumer electronics business. Its fourth-quarter loss widened.
Deere & Co. fell 1.9%. It said profit dropped 16%, though it beat analyst earnings expectations. Jack In The Box reported a better-than-forecast 25% profit rise.
By Nick Godt