The Dow Jones industrial averaged closed up 4 percent on the month, while the Standard & Poor's 500 closed up 5 percent.
Both indexes moved lower Wednesday despite an unexpected 1.7 percent gain in the gross domestic product in the second quarter. Economists had predicted a 1.4 percent gain.
In a late-afternoon announcement, the U.S. Federal Reserve said it would leave its monetary policy intact, maintaining a zero to 0.25 percent federal fund rate and an $85 billion per month asset purchasing program.
The June Fed policy meeting ended with central bank Chairman Ben Bernanke suggesting the asset purchasing program could end in 2014, which jolted markets.
There were no hints of a retreat from policy in Wednesday's announcement.
The DJIA closed down 0.14 percent on the day, losing 21.05 points to 15,499.54. The S&P 500 gave up 0.23 points or 0.01 percent, to 1,685.73. The tech-dominated Nasdaq composite index added 9.90 points, 0.27 percent, to 3,626.37.
On the New York Stock Exchange, 1,589 issues advanced, while 1,478 declined on volume of 3.8 billion shares traded.
The 10-year treasury note fell 3/32 to yield 2.617 percent.
Japan's Nikkei index gained 1.45 percent or 201.50 points to 13,668.32.
In Britain, the FTSE 100 index added 0.76 percent or 50.11 points to 6,621.06.
In after-hours trading on the New York Mercantile Exchange, crude oil added $2.29 or 2.22 percent to $105.37 a barrel.
Gold shed 60 cents to close at $1,324.30 per troy ounce on the NYMEX Comex division while silver added 13 cents to close at $19.81, up 0.66 percent.
On currency markets, the euro was higher at $1.3301. The dollar was unchanged at 97.89 yen.
On the Chicago Board of Trade, December corn was up 1 to $4.78 1/2, November soybeans were up 1/2 to $12.023 1/2 and September wheat was 9 at $6.64 1/4.