Stocks stretch winning streak to a 4th straight day

Stocks rose Tuesday as Wall Street posted a fourth straight day of gains.
Investors reacted cautiously to mixed earnings reports, retail sales and volatile oil prices as they looked ahead to a Wednesday deadline for Greece's parliament to approve a bailout deal offered by European leaders.
The Dow Jones industrial average closed up 0.4%, 76 point gain to 18,053.58. The Standard & Poor's 500 index gained 0.5% to 2108.95 and the Nasdaq composite index gained 0.7% to 5104.89.
Oil prices swung from sharp early losses to gains later in the day. Benchmark U.S. crude initially fell as much as 2% Tuesday following reports that Iran and world powers have reached an agreement to limit Iran's nuclear program in return for easing economic sanctions. Prices climbed back as West Texas Intermediate rose 1.3% to $52.86 a barrel after falling as low as $50.88.
If Iran's oil is permitted to reach world markets it would do so at a time when crude prices have been under pressure due to a global supply glut.
A disappointing retail sales report raised concerns about consumer spending as the government reported sales at retailers in June unexpectedly fell 0.3%. Economists were expecting a gain and the drop was the first in four months. The decline brought interest rates into focus as weaker data raised hoped the Federal Reserve will continue to be cautious about raising rates too soon.
In earnings news:
• JP Morgan Chase (JPM) reported second-quarter profit rose even as revenue slipped. Shares rose 1.4% as both earnings and revenue beat expectations.
• Shares of Wells Fargo (WFC) rose 0.9% as earnings met analysts' expectations but revenue came in a little short.
• Johnson & Johnson (JNJ) shares fell 0.5% despite reporting higher earnings rose and boosting its outlook for the year.
In Asia, Japan's Nikkei 225 index rose 1.5% while Hong Kong's Hang Seng index lost 0.4%. The Shanghai Composite rose for three sessions through Monday following frantic government efforts to halt a slide that saw it tumble 30% over the past month. It lost 1.2% at closing.
European shares closed higher Tuesday, following gains Monday when the tough Greek bailout deal was announced – Germany's DAX gained 0.3%, France's CAC 40 was up 0.7% and Britain's FTSE 100 index added 0.2%
News of the Greek bailout deal sent stocks sharply higher on Wall Street on Monday, which had feared a Greek exit from the euro.
Contributing: Associated Press