Stocks rally, erase early loss ahead of big earnings week