“To a certain extent, bad news keeps the Fed at bay,” said Ben Pace, chief investment officer at HPM Partners. “Maybe the thought is the Fed might delay (a rate hike).”
The S&P 500 traded above 2,100, while the Dow Jones industrial average topped 18,000. The Nasdaq Composite outperformed, as biotechs jumped, while Apple traded lower. The Dow transports traded flat.
“Yesterday’s 1.1 percent rally in the SPX allowed it to break out from a short-term consolidation phase, which we view as a positive technical catalyst,” BTIG Chief Technical Strategist Katie Stockton said in a note. “Next and final resistance is at the May high near 2135, which we believe is surmountable in the weeks ahead.”
The Dow swung back into the black for the year on Monday as stocks surged more than 1 percent following news of a bailout deal between Greece and its creditors.
Last week “you tested support perfectly and support held. Right now the absence of bad news (overseas) is good news,” said Adam Sarhan, CEO of Sarhan Capital. “The data is very bullish for the easy money trade.”
Stock index futures were narrowly mixed in early trade, with S&P and Dow futures extending losses slightly after retail sales showed a decline of 0.3 percent, missing expectations of a 0.3 percent increase.
In other economic news, May business inventories rose 0.3 percent, in-line with expectations. Business sales rose 0.4 percent after increasing 0.5 percent in April.
U.S. import prices unexpectedly fell in June as the lingering effects of a strong dollar offset rising costs for petroleum products, keeping imported inflation pressure under wraps.
Treasury yields recovered losses after the inventory report, with the10-year yield at 2.42 percent after dipping below 2.4 percent on retail sales. The dollar fell further against world currencies, with the euro above $1.10 and the yen at 123 yen against the greenback.
“I think to some extent the focus on the overseas problem (has) allowed us to ignore that we have a growth problem in the U.S.,” said Bruce McCain, chief investment strategist at Key Private Bank. “Especially if you get disappointment in things like retail sales, that’s going to underscore that trend.”
The data comes ahead of Federal Reserve Chair Janet Yellen’s semi-annual testimony before Congress on Wednesday and Thursday.
Kansas City Fed President Esther George speaks at 8:15 p.m. ET Tuesday on economic conditions and monetary policy.
Iran and six major powers early on Tuesday clinched a historic nuclear deal that will see some sanctions against Tehran eased in exchange for restrictions on its nuclear program.
U.S. oil prices stabilized after briefly falling more than 2 percent as investors anticipated an increase in Iran oil exports as sanctions are eased.
“With (Iran) as a backdrop I think we’re going to focus on how companies are doing,” said Art Hogan, chief market strategist at Wunderlich Securities.
Second-quarter earnings season kicked off with banks JPMorgan Chaseand Wells Fargo and pharmaceutical firm Johnson & Johnson reporting before the opening bell. CSX and Yum Brands report after the close.
JPMorgan Chase delivered quarterly earnings that topped analysts’ expectations on Tuesday, helped by lower expenses. Revenue beat expectations slightly but was lower year-over-year.
Johnson & Johnson reported a 4 percent rise in quarterly profit as sales of its mainstay older drugs managed to offset the impact of a strong dollar on overseas revenue.
Wells Fargo posted earnings per share in-line with estimates on revenue slightly below expectations.
The bank earnings are “probably an indication that earnings season is going to be tepid as well,” said Jack Ablin, chief investment officer at BMO Private Bank.
Elsewhere, European stocks traded mixed amid concerns that the Greek parliament will struggle to pass the legislation needed to secure a third bailout, while Asian shares were mixed with Chinese shares ending a three-day winning streak to close just over 1 percent lower.
The local government in Germany and Greece vote on the bailout terms later this week, ahead of Athen’s Monday repayment deadline to the European Central Bank.
“If (Greece and Germany) can’t get this passed by Monday then all hell could break loose again,” said John Caruso, senior market strategist at RJ O’Brien & Associates.
He expects gold to decline further and prices on the 10-year Treasury note to rise towards last week’s highs.
Read MoreGreece secures bailout: What next?
The S&P 500 traded up 8 points, or 0.36 percent, at 2,107, with energy leading nine sectors higher and utilities the only laggard.
The Nasdaq traded up 29 points, or 0.57 percent, at 5,099.
The CBOE Volatility Index (VIX), widely considered the best gauge of fear in the market, traded near 13.
About five stocks advanced for every nine decliners on the New York Stock Exchange, with an exchange volume of 185 million and a composite volume of 853 million in late morning trade.
Crude oil futures for August delivery gained 11 cents to $52.82 a barrel on the New York Mercantile Exchange. Gold futures fell 60 cents to $1,154.80 an ounce as of 11:07 a.m.
—Reuters contributed to this report.