The S&P 500 held above 2,110, while the Dow Jones industrial average topped 18,000. The Nasdaq Composite outperformed, trading above 5,110, as biotechs surged more than 2 percent and Apple gained. The Dow transports rose slightly.  "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.  "I think we're still cautious because we have some major events—Beige book tomorrow," said Peter Cardillo, chief market economist at Rockwell Global Capital.  Read MoreBanks, retail sales, Iran may steal the thunder from Greece  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 the 10-year yield at 2.41 percent after dipping below 2.4 percent on retail sales. The dollar fell 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."  Earlier, U.S. small business confidence fell in June to its lowest level in more than a year amid expectations of weaker profits and a softening labor market, which could temper expectations for strong economic growth in the second half.  "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 data comes ahead of Federal Reserve Chair Janet Yellen's semi-annual testimony before Congress on Wednesday and Thursday.  Read MoreOdds on for September rate hike: Fisher  Kansas City Fed President Esther George speaks at 8:15 p.m. ET Tuesday on economic conditions and monetary policy.  Second-quarter earnings season kicked off with banks JPMorgan Chase and 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.  Read MoreEarly movers: JPM, KO, URBN, MU, INTC, OWW & more  The Dow Jones Industrial Average gained 81 points, or 0.45 percent, at 18,059, with UnitedHealth leading advancers and Johnson & Johnson the greatest laggard.  The S&P 500 traded up 11 points, or 0.50 percent, at 2,110 with health care leading nine sectors higher and utilities the only laggard.  The Nasdaq traded up 41 points, or 0.82 percent, at 5,112.  The CBOE Volatility Index (VIX), widely considered the best gauge of fear in the market, fell below 13.  "I'm frankly amazed at how quickly it's come back down," said Randy Frederick, managing director of trading and derivatives at Charles Schwab. "I would guess the VIX has overreacted to the downside."  About three stocks advanced for every two decliners on the New York Stock Exchange, with an exchange volume of 387 million and a composite volume of nearly 2 billion as of 2:44 p.m.  Gold futures ended down $1.90 at $1,153.50 an ounce.  In individual stock news, Netflix dipped more than 1 percent ahead of its 7-for-1 stock split after the close. The media company also posts earnings after the close Wednesday.  Micron briefly leaped more than 12 percent on a report that Chinese chipmaker Tsinghua Unigroup has offered to buy the firm.  —Reuters contributed to this report.  8:15 p.m.: Kansas City Fed President Esther George  Earnings: Bank of America, BlackRock, US Bancorp, Delta Air Lines, PNC Financial, Intel, Netflix, ASML Holding, Wintrust Financial  8:30 a.m.: Empire State survey  10:00 a.m.: Fed Chair Janet Yellen semiannual testimony before House Financial Services  12:25 p.m.: Cleveland Fed President Loretta Mester on economic outlook  3:00 p.m.: San Francisco Fed President John Williams on outlook  Earnings: Citigroup, Goldman Sachs, Google, Sclumberger, Advanced Micro, Philip Morris, UnitedHealth, Blackstone, Charles Schwab, KeyCorp, Sherwin-Williams, Taiwan Semiconductor, Domino's Pizza, Mattel  10:00 a.m.: Philadelphia Fed survey  2:30 p.m.: Fed Chair Yellen semiannual testimony before Senate Banking Committee  Earnings: General Electric, Honeywell, Kansas City Southern, JB Hunt, Synchrony Financial, WW Grainger
U.S. stocks traded higher as investors eyed data and earnings that continued to indicate moderate growth, amid developments in Greece and Iran.