NEW YORK (AP) -- Stocks ticked higher on Wall Street Wednesday as hopes for a resilient economy jousted with worries about inflation following a much stronger reading than expected on U.S. retail sales.
The S&P 500 rose 0.3% after swinging from early losses to gains through the day. The Dow Jones Industrial Average edged up by 38 points, or 0.1%, while the Nasdaq composite rose a more forceful 0.9%.
Sales at U.S. retailers jumped by more last month than expected, even as shoppers contended with higher interest rates on credit cards and other loans. The surprising strength offers hope that the most important part of the U.S. economy, consumer spending, can stay afloat despite worries about a possible recession looming. It's the latest piece of data to show the economy remains more resilient than feared.
At the same time, though, the strong buying potentially adds more fuel to inflation, which a report earlier this week showed is cooling by less than expected. Upward pressure on inflation could force the Federal Reserve to stay more aggressive in keeping interest rates high.
High rates can drive down inflation, but they also drag on investment prices and raise the risk of a painful recession.
"Will it lead to that traditional recession or a shallow recession, or will we power through it and have more strong growth with still-high rates?" asked Tom Hainlin, national investment strategist at U.S. Bank Wealth Management. "That's still the unknown, which is how resilient can the consumer be in this higher for longer" rate environment.
"It seems like both consumers and corporate America came into this in pretty good shape and so far are holding out OK," he said.
The worries about higher rates and a firmer Fed have been most evident in the bond market, where yields on Treasurys have jumped since a report two Fridays ago showed the U.S. job market remains stronger than expected.
The yield on the two-year Treasury, which tends to track expectations for the Fed, briefly jumped toward 4.70% and its highest level since November after the retail sales report, up from less than 4.60% overnight and from 4.62% late Tuesday. It then eased back to 4.60%.
The 10-year yield, which helps set rates for mortgages and other important loans, rose to 3.79% from 3.75% late Tuesday.
Following Tuesday's data on inflation that was slightly hotter than expected, economists at Deutsche Bank raised their forecast for how high the Fed will take its key overnight interest rate. They now see it ultimately rising to 5.6%, up from their prior forecast of 5.1%.
The Fed has already pulled its overnight rate all the way to a range of 4.50% to 4.75%, up from virtually zero a year ago.
The Deutsche Bank economists said they still expect a recession, but that the near-term strength in the economy could push its timing into the last three months of the year, later than they earlier thought.
Many other traders have also been raising their forecasts for how high the Fed will ultimately take interest rates. They've also sharply reduced bets for the Fed to cut rates late this year.
Even still, stocks are hanging onto healthy gains for the year despite recent rockiness. The S&P 500 is up 8% as strong data build hope that the economy may be able to avoid a recession. Or, if one hits, perhaps it may be only a short and shallow one.
The next big milestone for the market will likely be the Fed's meeting in late March, when policy makers will give their latest forecasts for where interest rates will be at the end of the year, Hainlin said. That could lead to choppy trading in markets until then, as investors try to guess which way it will go.
On Wall Street, shares of Airbnb jumped 13.4% Wednesday after reporting stronger profit and revenue for its latest quarter than analysts expected. It also said trends remain encouraging into the new year, and it gave a forecast for revenue that topped Wall Street's.
On the losing end were stocks of energy producers, which fell 1.8% for the worst performance by far of the 11 sectors that make up the S&P 500.
One of the sharpest drops came from Devon Energy, which fell 10.5% after reporting weaker profit for the latest quarter than expected.
This earnings reporting season has been muted, with many companies reporting pressure on their profits from higher costs and interest rates.
All told, the S&P 500 gained 11.47 points to 4,417.60. The Dow rose 38.78 to 34,128.05, and the Nasdaq climbed 110.45 to 12,070.59.
In stock markets abroad, Turkey's market jumped nearly 10% after trading reopened following a closure caused by the devastating earthquake in the region.