Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

The Dow and S&P 500 gained to finish at five-year highs in choppy trading Tuesday, ahead of President Barack Obama's State of the Union address later this evening.

With the Dow's move higher, the blue-chip average is now less than 1 percent from its all-time record close of 14,164.53 hit on October 9, 2007. The Dow is up more than 7 percent so far in 2013.

The Dow Jones Industrial Average closed above the psychologically-important 14,000 level, led by Bank of America.

The S&P 500 also finished higher, while the Nasdaq ended in the red. The CBOE Volatility Index (VIX), widely considered the best gauge of fear in the market, dipped below 13.

Among key S&P sectors, financials climbed to a fresh four-year high, while techs held small losses. S&P financial stocks at new multi-year highs include T.Rowe Price, American Express and AIG.

Meanwhile, the Russell 2000 index and the S&P MidCap 400 index both hit an all-time high.

"While it may seem like the market's rallied too far too fast, we continue to think that the major averages will follow the small and mid-cap leadership to make all-time highs this year," said Ryan Detrick, senior technical strategist at Schaeffer's Investment Research. "The risk-on trade is there."

Read More:This Could Be Threshold of a Bull Market: Lloyd Blankfein

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

President Barack Obama is scheduled to deliver his annual address at 9 pm ET, and will outline policy goals for his second term. He is expected to focus on the "sequester" of automatic spending cuts that will kick in after March 1 if Congress takes no action to stop them.

"Everyone's expecting a campaign speech from Obama," said Brian Battle, vice president of trading at Performance Trust Capital Partners. "It will be interesting to see the specifics of how big of an agenda he has an his time frame—that will set the tone for the sequestration spending talks that will happen in the next two weeks."

Read More:State of the Union May Well Set Tone for Budget Talks

Apple traded in the red even after proxy advisory firm Glass Lewis said it backs Apple's proposition 2 — the ability for the iPhone maker to issue preferred stock, but with the approval with shareholders. Top proxy firm ISS made a similar recommendation last week.

Earlier, CEO Tim Cook said he will "thoroughly consider" hedge fund manager David Einhorn's cash-return proposal.

"Apple makes bold and ambitious bets on product, and we're conservative financially...To add to that fact, we're returning $45 billion to shareholders through a combination of dividends and buybacks," said Cook, speaking at Goldman Sachs' Technology and Internet conference. "Last quarter alone, the cash flow from operations was over $23 billion. It's an incredible privilege where we can seriously consider returning additional cash to our shareholders. The management team and the board are in very-active discussions. That's what our shareholders want."

Read More:Cook: Apple Doesn't Have 'Depression' Mentality

Among earnings, Coca-Cola declined to lead the Dow laggards after the beverage giant posted revenue that was slightly below expectations, hurt by weakness in Europe.

Michael Kors soared after the specialty retailer blew past earnings expectations and topped revenue estimates, as same-store sales surged and the company added new stores.

Fossil climbed after the fashion accessories retailer edged past earnings and revenue forecasts, thanks to strong revenue growth in North America and Asia.

Avon Products jumped to lead the S&P 500 gainers after the beauty and personal products company posted better-than-expected earnings.

Cliffs Natural Resources, Buffalo Wild Wings and Clearwire are among notable companies slated to post earnings after the closing bell.

On the tech front, Facebook declined after Bernstein downgraded the social-networking giant to "market perform" from "outperform." And Qualcomm slid after JPMorgan cut its rating on the semiconductor company to "neutral" from "overweight."

On the economic front, small business sentiment edged up in January to 88.9 last month, according to the optimism index from the National Federation of Independent Business, as owners anticipated better business conditions in the next six months, despite higher taxes and looming government spending cuts.

Treasury prices held their losses after the government auctioned $32 billion in 3-year notes at a high yield of 0.411 percent. The bid-to-cover ratio was 3.59.