New York (CNNMoney) — Forced budget cuts were no match for the bulls on Wall Street. U.S. stocks ended higher Monday as investors remain optimistic about the economy even as federal spending cuts begin to take hold.
After languishing in the morning, the Dow Jones industrial average managed to gain nearly 0.3% for the day. The Dow is now less than 40 points away from its all-time closing high and only about 70 points below its intra-day high. Both records were set in October 2007. The S&P 500 rose nearly 0.5% and is also within striking distance of all-time highs from October 2007. The Nasdaq added 0.4%.
"The March spending cuts came and went, and the world didn't end," said Joe Bell, senior market analyst at Schaeffer's Investment Research. "It's encouraging to see the market shrug off things that could perceived as negative."
For weeks, investors have been bracing for the $85 billion in across-the-board spending cuts, known as the sequester. The cuts, which will hit a wide array of federal agencies over the next weeks and months, came into effect March 1 after budget talks in Washington broke down.
Economists say the cuts could take a big bite out of growth later this year. But many investors believe the cuts will eventually be replaced with a more targeted plan, and that the impact on the economy will be less dramatic than feared.
"I don't think that the politicians are going to do anything foolish," said Carmine Grigoli, chief investment strategist at Mizuho Securities.
Comments from the top two officials at the Federal Reserve may have also helped boost the market.
Fed vice chair Janet Yellen said Monday she hopes that low interest rates will succeed in promoting a "return to prudent risk-taking." The comments echoed a speech Fed chairman Ben Bernanke made late Friday and furthered hopes the central bank will maintain its stimulus policies even as the economy improves.
Stocks had come under pressure earlier in the day as investors focused on threats to the global economy.
Chinese stocks tumbled after the government in Beijing announced new measures to avert a real estate bubble. The Shanghai Composite lost 3.7%, while Hong Kong's Hang Seng declined 1.5%. Japan's Nikkei added 0.4% though.
In the United States, shares of companies that are exposed to China were among the worst performers. Caterpillar, Alcoa and United Technologies were all down.
European stock markets ended mixed. Italy has been a concern, after elections last month left the euro area's third biggest economy without clear leadership. Also, the European Central Bank will be releasing its Governing Council's monetary policy decisions on Thursday.
Investors will get some readings on America's economy as well later this week, with reports due from the government on productivity and the job market. The monthly report on payrolls and the unemployment rate comes out on Friday.
The dollar was up against the euro on growing talk that the European Central Bank may signal a rate cut as early as this week after a recent string of poor eurozone economic data and political instability in Italy that could rekindle the region's sovereign debt crisis.
Oil prices sank but managed to close above $90 a barrel. Gold prices inched higher. The yield on the 10-year Treasury note rose to 1.87% from 1.85% on Friday.
There was little in the way of corporate news Monday. But shares of Apple continued to slide, hitting another 52-week low. The stock is now down 20% so far this year. Meanwhile, Apple rival Google rose about 1% and hit a new all-time high in the process.