Semiconductors are killing it, and you can thank China. The Semiconductor ETF (SMH) is just shy of the historic high it hit a year ago, and there's good reason for it: China.

The five S&P companies with the biggest exposure to China are all semiconductors. Qualcomm, Micron, Qorvo, Broadcom, and Texas Instruments all get 40% to 60% of their revenues in China.

Semiconductors' China exposure, (percent of revenue)

Qualcomm: 65%

Micron: 57%

Qorvo: 50%

Broadcom: 48%

Texas Instruments: 43%

Source: Factset

As optimism for a U.S.-China trade deal rises, so have semiconductor prices. In fact semis are the leadership group among technology and cyclicals more broadly this year, with AMD up nearly 60%, and Nvidia, Lam Research, Micron, Applied Materials and Broadcom all up 20% to 40%.

Semiconductors year-to-date surge

Advanced Micro Devices: 58%

Nvidia: 42%

Lam Research: 41%

Micron: 38%

Applied Materials: 30%

Broadcom: 20%

Not surprisingly, there has been a close relationship between semis and the China stock market itself..the Semiconductor ETF is up about 28%, and the Shanghai stock exchange is also up about 28% — the two have been moving in lockstep all year.