The stock market is known as the barometer of the national economy, and macroeconomic factors have an important impact on the volatility of the stock market. Therefore, considering the impact of macroeconomic factors on the sustainability of stock market volatility will help to capture the time-varying characteristics of volatility persistence, so as to significantly improve the estimation and forecasting effect of volatility. In this work, the generalized autoregressive conditional heteroskedasticity-mixing data sampling (GARCH-MIDAS) model is adopted, which combines the advantages of the GARCH model in short-term volatility modeling and the advantages of MIDAS regression in integrating macroeconomic variables of different frequencies. The GARCH model provides an accurate depiction of intraday volatility in financial markets by capturing the dynamic nature of short-term volatility. MIDAS regression introduces long-term macroeconomic factors into volatility modeling by integrating macroeconomic data with different sampling frequencies, thus making up for the shortcomings of traditional measurement methods in frequency matching. By combining these two methods, the GARCH-MIDAS model can more comprehensively reflect the dynamic changes of stock market volatility, considering both the impact of short-term market volatility and the role of long-term macroeconomic factors, thus providing a more accurate and in-depth analytical tool for volatility prediction and risk management. The results show that the GARCH-MIDAS model can significantly improve the accuracy of volatility forecasting, and provide more reliable decision support for investors, policymakers and economists.