Crude Oil ( ) Brent Crude ( ) Natural Gas ( ) S&P 500 ( ) PHLX Oil ( )

Story by CNBC

U.S. stocks closed mixed on Tuesday as investors eyed renewed gains in yields and the dollar ahead of the Federal Reserve meeting minutes.

The Dow Jones industrial average closed at a record for the second day in a row, ending below its intraday high of 18,351.36 set in the afternoon.

The S&P 500 briefly extended gains to hit a new intraday record but failed to close higher. The Nasdaq fell into negative territory after coming within 10 points of its closing high of 5,092.08.

“I still think there’s uncertainty around what the Federal Reserve is going to do,” said Ben Pace, CIO at HPM Partners. “It’s not been a great year but we’re still up 3 percent in (the S&P 500). It’s been an OK market.”

The major averages fluctuated around the flatline throughout the day, struggling to hold gains after better-than-expected housing data renewed anxiety over the timing of a rate hike.

“I thought we had moved past good news is bad news for equities. We seem to be fixated still on the Fed question in the debt markets and whether interest rates are going to go up,” said Chris Gaffney, president of EverBank World Markets.

The Federal Reserve Open Market Committee is expected to release the minutes of its April meeting on Wednesday, while several policymakers, including Janet Yellen, are scheduled to speak later in the week.

“I think the Fed does focus on the housing market,” said Alan Rechtschaffen, financial advisor and senior vice president at UBS Wealth Management Americas.”When you have a better-than-expected housing starts number you have to say to yourself, ‘Is that a 1-month thing?'”

April’s housing starts totaled 1.135 million in April, nearly a seven-and-a-half year high and above the 1.020 million estimate. The beat follows weak readings of little above 900,000 in February and March.

“The longevity of this cycle depends on housing,” said Maris Ogg, president of Tower Bridge Advisors. “So I was glad to see the numbers pick up this morning.”

The Dow Jones industrial average and the S&P 500 closed at records on Monday after setting new intraday highs.

U.S. stock futures indicated a higher open as European equitiesadvanced, with investors reacting to corporate earnings and comments on the timing of bond-buying by a member of the European Central Bank.

“It was originally Europe, then it shifted to us when the rally in the 10-year had given back all its rally (and began selling off),” said Peter Boockvar, chief market analyst at The Lindsey Group. “The strong dollar is also an issue here.”

The U.S. 10-year Treasury yield traded as high as 2.29 percent, while the 30-year yield briefly topped 3.08 percent.

The U.S. dollar rose more than 1 percent, with the euro falling to a two-week low of $1.1121.

“A little dollar strengthening may act as a counterweight to advances in equities,” said Mark Luschini, chief investment strategist at Janney Montgomery Scott.

Benoit Coeure, a member of the European Central Bank’s Executive Board, hinted that the central bank could be ready to “front-load” its current quantitative easing (QE) program, according to Reuters. Such a move would cause the central bank to buy up more assets and be more aggressive in the near term, which spurred investors into a bout of buying on Tuesday.

Euro zone bond yields fell on the news, with the 10-year benchmark German Bund yield briefly falling to 0.56 percent before rising to 0.61 percent. The 10-year Treasury yield dipped below 2.20 percent.

In a quiet day of trade, financials and health care led gains across the major indices. KRE, the S&P’s regional banking ETF, closed up 1.09 percent.

“We’re quietly transitioning leadership here,” said Art Hogan, chief market strategist at Wunderlich Securities. “You’ve got a broader-based rally that is impervious to single-stock news.” He noted that the bank-related stocks have not been the best performers.

“It’s become a self-fulfilling prophecy that regional banks will be doing better,” he said. “The assumption is that interest rates will not (always) be zero.”

Goldman Sachs, JPMorgan Chase and other financial blue chips advanced, outweighing the drag on the Dow from Wal-Mart andChevron.

Wal-Mart closed down nearly 4.4 percent after reporting earnings of an adjusted $1.03 per share for the first quarter, 1 cent below estimates, with revenue also below forecasts. Comparable-store sales also registered a lower-than-expected increase for the quarter.Stocks tried to hold mild gains after the morning’s better-than-expected housing data.

The Dow Jones Industrial Average closed up 13.51 points, or 0.07 percent, at 18,312.39, with with McDonald’s leading gains and Wal-Mart the greatest laggard.

The S&P 500 closed down 1.38 points, or 0.06 percent, at 2,127.82, with financials and health care leading three sectors higher and energy leading decliners.

The Nasdaq closed down 8.41 points, or 0.17 percent, at 5,070.03.

The CBOE Volatility Index (VIX), widely considered the best gauge of fear in the market, traded below 13.

Three stocks declined for every two advancers on the New York Stock Exchange, with an exchange volume of 735 million and a composite volume of 3.2 billion in the close.

Crude oil futures for June delivery settled down $2.17, or 3.65 percent, at $57.26 a barrel on the last day of trade before contract expiration. Gold futures ended down $20.90 at $1,206.70 an ounce.

Read MoreSolid Home Depot earnings sign of consumer shift

Major earnings on Tuesday included Home Depot, Wal-Mart, Dick’s Sporting Goods, TJX Companies and Red Robin Gourmet Burgersbefore market open. Autodesk is due after the bell.

Home Depot—The home improvement chain reported adjusted quarterly profit of $1.16 per share, 1 cent above estimates, with revenue also above forecasts. Same-store sales were also better than expected, and Home Depot raised its full-year earnings and sales forecasts.

Dick’s Sporting Goods—The sporting goods retailer beat estimates by 4 cents with quarterly profit of 57 cents per share, with revenue essentially in line. However, its comparable-store sales increase of 1 percent was shy of the 1.5 percent consensus. The company also raised the low end of its full-year earnings guidance.

TJX Cos., the owner of off-price chains TJ Maxx and Marshalls, reported a 5.8 percent rise in quarterly sales as more customers visited its stores and the company expanded its offerings.