Market rebounds, ending two-day losing streak