Investor sentiment is one of the destabilizing factors in the stock market. In the past, some scholars have proposed models for the measurement of emotions. On this basis, this paper selects 9 factors (closed-end fund discount rate, trading volume of the previous month, market turnover rate of the previous month, number of IPOs, first-day yield of IPOs, number of new investors opened accounts in the last month, Consumers Confidence index, Advance/Decline Line, Business Index of Macro-economic), and constructs the investor sentiment index through principal component analysis. Through statistical analysis of the index, it is found that it satisfies the conditions of a stationary time series, and a related formula is put forward. At the same time, the relationship between index and stock market is discussed.