US stocks posted a solid advance on Friday thanks in part to optimism over trade talks between the US and China.

A rally in technology stocks helped boost the Nasdaq Composite Index to a 0.8% gain on Friday. The Dow Jones Industrial Average rose 0.5% and the S&P 500 climbed 0.5%. The S&P 500 tech index surged 1.2%.

Semiconductor company Broadcom (AVGO) helped fuel the tech sector after it reported better-than-expected earnings. Broadcom rose 8.2%, the second-biggest gainer in the S&P 500 behind Ulta Beauty (ULTA), which rallied 8.3%. Ulta reported earnings Thursday that beat expectations.

For the week, the main market indexes all posted gains. The Nasdaq rose 3.8%, the Dow climbed 1.6% and the S&P 500 gained 2.9%.

China’s state media Xinhua reported that the US and China have made “concrete progress” on a trade agreement between the economic giants, according to the South China Morning Post. President Donald Trump said in remarks at the White House that the China talks were going well

In economic news, the Index of Consumer sentiment, compiled by researchers at the University of Michigan rose to 97.8 in March from 93.8 in February, slightly ahead of the 95.2 consensus, according to Econoday. The Federal Reserve said that industrial production rose 0.1% in February from January.