Nasdaq leads way as US stocks close higher