Tech rally leads Nasdaq to record

Confidence in sector remains high even amid growing trade tensions

Technology companies soared Thursday as major U.S. stock indexes recovered the ground they lost a day earlier. The Nasdaq composite closed at another all-time high.

Big names like Apple and Microsoft and chipmakers including Intel all made big gains as investors remain optimistic about the technology sector even though much of the market has been shaken by escalating tensions between the U.S. and its trading partners, especially China.

Industrial companies also regained much of the ground they lost Wednesday, but energy companies and basic materials makers failed to rally. Defense contractors climbed after President Donald Trump advocated for more defense spending in the U.S. and Europe.

Software maker CA made the biggest gain in the technology sector soared after it accepted an offer from Broadcom worth $18.9 billion, or $44.50 per share. Its stock rocketed 18.7 percent to $44.15. Broadcom investors expressed their disapproval of the deal, which involves Broadcom taking on $18 billion in debt. The stock dropped 13.7 percent to $209.98.

Broadcom's market value fell by $14.4 billion.

President Trump continued to criticize other NATO members at the group's summit in Brussels. He said European countries should raise their defense spending and suggested in a tweet that U.S. should also keep spending more.

The merry-go-round of potential media deals continued as Comcast offered to buy European pay-TV company Sky for $34 billion a day after Twenty-First Century Fox increased its own offer for Sky.

Fox already owns 39 percent of Sky, and while it tangles with Comcast, Comcast and Disney are also trying to buy Fox itself. Fox recently accepted Disney's $71 billion offer from Disney. The New York Times reported Thursday that Comcast will focus on Sky and end its pursuit of Fox.

Papa John's International jumped 11 percent to $53.67 as founder John Schnatter resigned as chairman after confirming a report that he had used a racial slur during a conference call in May.

Stifel analyst Christopher Cull said Wall Street has viewed the company as a potential sale target for some time and investors feel that's more likely without Schnatter in charge. But since Schnatter is still is largest shareholder, Cull doesn't think that will happen.

Schnatter owns about 29 percent of the company's stock, and the value of his stake jumped by $50.5 million to Thursday to about $507 million in total.

Stocks around the world slumped Wednesday after the Trump administration released a list of $200 billion in imports from China that it could hit with a 10 percent tax. China said it would retaliate if the tariffs take effect, and the dispute could impair global economic growth.

Stocks overseas took bigger losses than U.S. indexes did and they made small recoveries Thursday. In Paris, the French CAC 40 climbed 1 percent. Germany's DAX added 0.6 percent and the Britain FTSE 100 rose 0.8 percent.