The Dow Jones Industrial Average rose 0.5 percent, the broad S&P 500 index rose 0.8 percent, and the tech-heavy Nasdaq composite index rose 1.3 percent.
This follows Tuesday's stock market crash as a result of the US and Israel's war against Iran.
Wednesday's turnaround came after media reports of possible contacts between the parties and after the US promised military protection for tankers.
In addition, new statistics showed growth in the US service sector, more private-sector jobs and cooling inflation.
The market was also helped by gains in five of the heavily index-weighted technology companies collectively known as "the Magnificent Seven" - all of which are among the world's ten most valuable listed companies.
Pharmaceutical company Moderna surged 16.1 percent after reaching a settlement with two other companies over a Covid-19 vaccine.





