Stock market bounces back after dramatic week