Stocks rise sharply on deal to end government shutdown