Republicans were expected to win the House of Representatives in the Congressional mid-term election, and to narrow the gap in Senate.
Health insurers, a sector hurt by the Democrats' push to reform healthcare, were among the day's gainers.
Humana jumped more than 3 percent after at least four brokerages raised their price targets on the health care firm. The sharp gain was in contrast to the stock's more muted gains Monday, when it rose less than 1 percent after posting a profit that blew past the Street's targets.
Rival Aetna is scheduled to report earnings Wednesday morning. Other health insurers including WellPoint and Cigna also gained.
Pfizer sharesreported strong profits, thanks to cost-cutting, but weak sales, sending the pharmaceutical giant's shares slightly lower. In Pfizer's case, sales were hurt by generic competition for Lipitor, its cholesterol drug, and weak sales in emerging markets.
But Medco Health Solutions jumped more than 8 percent after the pharmacy benefits manager said profits topped estimates, helped by dispensing more high-margin generic drugs and the firm projected earnings would rise as much as 17 percent next year.
Investors were also awaiting the results of the Federal Reserve's two-day policy-setting meeting,that started Tuesday and ends with a statement at 2:15 p.m. ET Wednesday.
Many economists expect the Fed will announce plans to buy Treasury securities to stimulate the economy, although views differ on the scale and timing of the purchases.
The strategy of stimulating the economy by purchasing long-term securities, as the Fed is expected to do, is an "experiment," that's more art than science, said Quincy Krosby, market strategist at Prudential Financial.
"An experiment means uncertainty, and markets loathe uncertainty," Krosby added.
As a result, investors and traders will be paying close attention to leading economic indicators in the weeks and months ahead for signs the economy is on a sustainable path to growth, she said.
"The ultimate test for the markets will be: Is the growth picking up? Are we seeing organic growth in the economy?" Krosby said. She suggested the markets will take two or three months to decide if the Fed's strategy worked or not, and "then market will authorize the verdict."
But Jim Paulsen, strategist at Wells Capital Management, said the most important news for the market this week wasn't the elections or the Fed's policy decision, but the nonfarm payrolls report due out on Friday.
According to Paulsen, the economic data of late shows the economy is getting stronger. A healthier economy combined with more Republican lawmakers in the house, and monetary stimulus, should combine to drive stocks higher, Paulsen said.
"Unless the payrolls number really disappoint, we're going to head to new highs in the next few weeks for this recovery cycle," he said.
One reason stocks rose Tuesday was the dollar fell against a basket of currencies after both Australia and India raised their benchmark interest rates.
The dollar was also under pressure as investors expect a Federal Reserve decision to pump more money into the economy will weaken the value of the U.S. currency. Stocks have been moving inversely to the dollar, as a weaker dollar boosts commodity and materials stocks.
In other earnings news, MasterCard sharesclimbed after the credit-card issuer reported a 15 percent gain in third-quarter profits thanks to strong international spending.
But Archer Daniel Midland sank after the agricultural processing company reported inventory charges hurt third-quarter earnings.
Shares of cereal maker Kellogg fell slightly after reporting lower earnings and sales, due in part to product recall and weak sales.
Clorox tumbled more than 4 percent after the manufacturer of various food and chemical products reported flat earnings and gave a tepid full-year forecast, citing a weak economy.
Newmont Mining beat Street estimates with a 38 percent increase in profit, driven by record high gold and strong copper prices. However, shares slipped after the firm again lowered the 2010 production target at its flagship Australian mine.
Gold rose near $1,350 an ounceas strong demand from leading consumers such as India and Turkey ahead of major gold-buying events helped lift prices. Oil jumped above $84 a barrel after OPEC member Libya said oil producers would find prices of $100 a barrel more comfortable because of higher food prices and a weaker dollar.