Stocks added to gains on Thursday, coming back from their worst losses in eight months a day earlier, as a positive quarter for Walmart (WMT) boosted consumer names, while health care lifted the Nasdaq.

The S&P 500 was up 0.67%, the Dow Jones Industrial Average increased 0.56%, and the Nasdaq added 0.9%. 

Walmart did the heavy-lifting on the Dow and S&P 500 after topping net income estimates, though revenue came in slightly weaker than expected. Earnings rose to $1 a share from 98 cents in the same quarter a year earlier. Analysts anticipated earnings of 96 cents. Sales of $117.5 billion came in below estimates of $117.8 billion. U.S. same-store sales increased 1.4%. E-commerce business climbed at its best pace in five years.

Retail consumer stocks moved higher alongside Walmart. Amazon (AMZN) , Priceline (PCLN) , Costco (COST) , Target (TGT)  and CVS Health (CVS) were each higher, while the S&P Retail SPDR ETF (XRT) added 0.5%. 

Health care shares pushed the Nasdaq into positive territory. Incyte (INCY) surged 7% after its an immune-system booster drug, combined with Merck's (MRK) immunotherapy Keytruda showed positive results in an ongoing study with advanced lung cancer patients. Around 35% of patients given the combination treatment had tumors shrink by at least 30%.

If you liked this article you might like

7 Essential Rules for Investing in Tech Stocks

Tax Reform Is Coming and That Means Trump Stock Rally Is Ready to Kill It Again

'Trump Stock' Rally Is Back on Track

These Stocks Pay You to Own Them

Pret A Manger Takeover in the Works; Cisco's M&A Shackles Come Off - ICYMI