The S&P 500 closed at a record high Thursday and has erased all of a steep pullback it suffered in May.
The rally came as investors balanced optimism over the possibility that the Federal Reserve could cut interest rates in response to a slowing economy and jitters about the prospects of dimmer corporate profits should a severe slowdown take hold.
Those worries continued to fuel demand for bonds. The yield on the 10-year Treasury note fell to 2%, the lowest since November 2016.
The price of oil rose 5.4% as tensions between the U.S. and Iran escalated.
The S&P 500 rose 27 points, or 0.9 percent, to 2,954.
The Dow Jones Industrial Average added 249 points, or 0.9%, to 26,753. The Nasdaq rose 64 points, or 0.8%, to 8,051.