The Dow Jones industrial average posted 93.24-point gain, 0.75 percent, and closed at 12,554.20.
The Nasdaq composite picked up 27.40 points, 0.97 percent, to 2,858.42.
The Standard and Poor's 500 gained 10.67 points, 0.81 percent, and finished at 1,325.66.
Skepticism set in early after the U.S. Commerce Department reported the trade deficit fell only slightly in March to April, dropping from $52.6 billion to $50.1 billion.
Investors were also focused on Federal Reserve Chairman Ben Bernanke's remarks Thursday in which he failed to commit the Central Bank to any new round of stimulus measures.
But markets rallied after a news conference in which U.S. President Barack Obama suggested recapitalizing banks in Europe, calling Europe's financial crisis "solvable."
On the New York Stock Exchange, the listed volume was 2.02 billion shares.
The benchmark 10-year treasury note yielded 1.636 percent.
The euro was $1.2507 from Thursday's $1.2561. Against the yen, the dollar was 79.41 from 79.45 yen Thursday.
In Tokyo, the Nikkei 225 index dropped 2.09 percent, 180.46 points, to 8,459.26.
In London, the FTSE 100 index lost 0.23 percent, 12.71 points, to 5,435.08.
Celebrity Breakups and divorces of 2014 [PHOTOS]