The Dow Jones industrial average languished in negative territory most of Friday, then took a sharp upward turn right before the close finishing up 96.72 points, or 0.7 percent, at 12,381.02.
The Standard & Poor's 500 index gained 10.58 points, closing at 1,353.11, up 0.79 percent.
The tech-dominated Nasdaq composite gained 3.57 points to 2,303.35, up 0.16 percent.
On the New York Stock Exchange, 970 stocks advanced and 2,123 declined on volume of 3.514 billion shares traded.
The 10-year U.S. Treasury note gained 2/32, yielding 3.779 percent.
The dollar lost ground. The euro traded at $1.4821, compared with $1.4818 Thursday, while the dollar traded at 106.88 yen, from 107.31 yen Thursday.
In Tokyo, the Nikkei average lost 187.82 points Friday to finish at 13,500.46, a 1.3 percent decline.
In London, the FTSE 100 index lost 43.70 points, down 0.74 percent to 5,888.50.