Tech and healthcare boost Wall Street

NYSE traders Image copyright Getty Images

(Closed): US stocks shook off early losses to close higher on Wednesday led by gains in tech and health care.

The Dow Jones rose 78 points, or 0.44%, to 17,918.62.

The wider S&P 500 index was up 11.18 points to 2,099.73, while the tech-focused Nasdaq climbed 36.26 points to 4,859.16.

Data from the Institute for Supply Management showed the US services sector, which accounts for two-thirds of the US economy, picked up in June.

The US trade deficit however increased by 10% as the stronger dollar led to decreasing exports.

Pharmaceutical companies led the market gains. Horizon Pharma climbed 4.7%, while Progenics Pharmaceuticals was up 9.3%.

Biotech firms AbbVie and Biogen each rose 2.3% after European regulators approved a new multiple sclerosis drug.

Tech firms also had a strong day.

Facebook's shares climbed 2.4%. Google's parent company Alphabet was up 0.6%.