Standard & Poor's 500 index closed the week at the end of the trading day Friday with its biggest weekly gain in two years.

The S&P rose 5.6 percent for the week. The DJIA also fared well, up 5.4 percent for the week, while the NASDAQ added 6.2 percent. The performance for all three indexes was their biggest percentage gain since July 2009.

Volume was light in advance of the Fourth of July holiday.

With a boost from a report showing that U.S. manufacturing growth unexpectedly picked up in June and with Greece moving closer to averting a default, the American stock market ended an already-strong note on a bullish note. The S&P 500 closed the trading day up 18.67 points, for a 1.41 percent gain, to 1,339.67.

The S&P 500 climbed one percent the day before, on Thursday, completing its biggest four-day gain since September. The positive news from manufacturing and Greece on Friday provided another boost. The strong performance in the S&P 500 index came despite news this week that confidence among U.S. consumers dropped declined in June. The positive news was apparently all needed to overcome the U.S. consumer confidence report.

Shares of companies dependent on economic growth advancing this week included Home Depot, 3M Co., and Intel Corp. Other stocks advanving on the day included Wells Fargo bank, up 2.17 percent to $28.67, Citigroup bank, up 2.98 percent to $42.88, and General Electric, up 1.8 percent to $19.20.

The DJIA advanced 1.36 percent, to 12,582.80, while the NASDAQ advanced 1.53 percent to 2,816.03.