The Dow Jones industrial average was up 62 points, or 0.4 per cent, to 15,191 as of 12:42 p.m. (1642 GMT). The S&P 500 index gained 13 points, or 0.8 per cent, to 1,694. The Nasdaq composite rose 39 points, or 1.1 per cent, to 3,805.
The gains were led by health care and technology stocks.
Tech stocks were given a boost by Apple. The company's stock rose $10.87, or 2.3 per cent, after billionaire investor Carl Icahn told CNBC about his dinner meeting with Apple's CEO Tim Cook. Icahn, who said he has invested $2 billion in the stock, is pushing for Apple to spend $150 billion buying back its own stock.
"I feel very strongly that this should be done," Icahn told CNBC. "It's a no-brainer."
The Standard & Poor's 500 index climbed to a record Sept. 18 after the Federal Reserve surprised investors and said that it would continue with its economic stimulus. The index has shed 2 per cent since then, falling on seven out of eight days before the shutdown.
"We're not jumping in with both feet but we're selectively putting money to work," said Joseph Quinlan, chief market strategist for US Trust Bank of America Private Wealth Management. "On the other side of the government shutdown, you've got continued support from the Fed and a global economy that's rebounding."
Many investors still don't foresee the budget fight spilling over into a dispute about raising the nation's borrowing limit. Treasury Secretary Jack Lew said last week that the government would run out of borrowing authority by roughly Oct. 17.
The last time the borrowing limit issue came up in August 2011, it led to Standard & Poor's downgrading the United States' credit rating. The Dow went through nearly three weeks of triple-digits moves almost daily.
In government bond trading, the yield on the 10-year note rose to 2.65 per cent from 2.61 per cent late Monday.
The price of oil fell $1, or 1 per cent, to $101.32 a barrel. Gold fell $39, or 3 per cent, to $1,287 an ounce.
The dollar fell against the euro and the Japanese yen.
Among stocks making big moves:
Merck rose $1.09, or 2.2 per cent, to $48.67 after the drugmaker said it plans to cut another 8,500 jobs as part of a plan to reduce its annual costs by about $2.5 billion by the end of 2015.
Walgreen rose $2.46, or 4.6 per cent, to $56.30 after the drugstore chain said its fiscal fourth-quarter earnings soared 86 per cent after it booked gains from its method of inventory accounting and its acquisition of a stake in European health and beauty retailer Alliance Boots.
Ford rose 38 cents, or 2.2 per cent, to $17.25 after the automaker said that US sales rose 6 per cent in September, with strong car sales making up for slower sales of SUVs.