Kenneth Frenches Data Library includes industry portfolios.
Is this done via a software of some type.
I have some stock returns but I want to calculcated the returns of the industries in the Chinese market?
The constitution of each industry portfolio is described in each "detail"-section on Kenneth French´s homepage. The industries are defined by sorting each NYSE, AMEX, and NASDAQ stock based on its four digit SIC-code.
The sort is applied at the end of June of year $t$. Monthly returns are calculated for the subsequent year, i.e. from July of year $t$ to end of June in year $t+1$. The portfolio return is the average value-weighted return of each stock, i.e. you weight each stock return with its market-valuation (number of shares outstanding times stock price). The procedure is clearly described in the below reference.
Fama/French (1997), Industry Cost of Equity, Journal of Financial Economics (43).