Stocks moved confidently higher late Tuesday after a choppy start to the day with Wall Street uncertain on how the 'Brexit' vote could play out. 

The S&P 500 rose 0.4%, the Dow Jones Industrial Average was up 0.26%, and the Nasdaq added 0.18%.

Thursday's referendum on whether the U.K. will vote to remain in the European Union is too close to call, muddying the overall global outlook. A weekend poll showed 45% of voters wish to "remain" while 42% prefer to "exit," though other pundits predict an even split on the issue. An exit from the EU would incite economic and political instability.

"The vote is expected to be very close, with the polls showing odds of a 'leave' vote increasing over the past few weeks," Burt White, chief investment officer for LPL Financial, wrote in a note. "Although markets appear to be pricing in the U.K. staying in the EU, the weakness in the British pound and British equities could be saying this vote has the potential to surprise."

Billionaire trader George Soros warned that a U.K. vote to leave the EU could lead to a "Black Friday," wherein the pound would suffer more than Britain's abrupt exit from the European exchange rate mechanism in 1992. While currency speculators might gain, a "Brexit" vote would leave "most voters considerably poorer," Soros said in editorial in The Guardian.

There will be "significant economic repercussions" if the United Kingdom chooses to leave the European Union, Federal Reserve Chair Janet Yellen said in testimony to the Senate Banking Committee in Washington. Yellen also noted that another rate hike would not come until the central bank is certain of U.S. economic growth, particularly in the labor market. 

"The pace of improvement in the labor market appears to have slowed more recently, suggesting that our cautious approach ... remains appropriate," Yellen said. "Proceeding cautiously in raising the federal funds rate will allow us to keep the monetary support to economic growth in place while we assess whether growth is returning to a moderate pace, whether the labor market will strengthen further, and whether inflation will continue to make progress."

Yellen also will speak before the House Financial Services Committee on Wednesday. The address before lawmakers will cover monetary policy and the overall health of the U.S. economy.

"As Yellen said repeatedly, a cautious approach is warranted while the Fed assesses further progress toward its mandates, especially given how low the funds rate is now and the "limited room" to reduce the funds rate from here if the economic outcome were to disappoint," said Michelle Girard, senior economist at RBS. "Again, Fed will wait to assess if these headwinds fade. Nothing in the testimony suggests any urgency whatsoever for the Fed to act."

Lennar (LEN - Get Report) boosted both profit and revenue in its recent quarter. The homebuilder benefited from continued strength in housing demand, particularly in an environment of low interest rates and tighter inventory levels. Earnings of 95 cents a share beat estimates of 86 cents, while revenue rose 15% to $2.75 billion.

CVS Health (CVS - Get Report) announced plans to expand its healthier foods and beverages offerings to more than 2,900 stores. The drugstore chain has focused on distinguishing itself as the healthier alternative to other pharmacies after banning tobacco sales at its stores in 2014.

Helmerich & Payne (HP - Get Report) was upgraded to overweight from sector weight with an $80 price target at Keybanc. The firm said the company is best positioned for an upturn in domestic land rig activity. The stock rose 0.6%.

Planet Fitness (PLNT - Get Report) fell 7.9% after announcing a secondary offering. The fitness chain said a number of existing stockholders intend to offer up for sale 10 million shares of Class A common stock. The offering also grants underwriters a 30-day option to purchase up to an additional 1.5 million shares.

Carmax (KMX - Get Report) fell 3.9% after missing analysts' estimates on its top- and bottom-line. The auto parts retailer earned an adjusted 86 cents a share in its recent quarter, 6 cents below estimates. Same-store unit sales rose 0.2%, below estimates of 0.3% growth.

Boeing (BA - Get Report) has signed an agreement with Iran Air "expressing the airline's intent" to buy its aircraft. The agreement is the Iran's first major deal with an American company following the nuclear accord, which lifted sanctions, which was reached last year.