US stocks close higher, Nasdaq posts major recovery