The recent excess returns of U.S.stocks,especially the technology sector,have attracted the attention of most investors.Previous literatures mainly use traditional econometric models for stock price prediction,and the number of predictors is limited.Today,with increased computing power,machine learning has become one of the most groundbreaking methods for predicting stock returns.It has strong research significance to use machine learning models to study the characteristics that affect the volatility of US stock returns and to verify the prediction performance of mainstream machine learning models.This article uses different types of machine learning methods to find out the key variables that affect stock prices,and tests the performance of different machine learning models in stock price prediction to help investors develop a profitable investment strategy.The paper data comes from WRDS(Wharton Research Data Service)and consists of different types of features related to the stock market,and finally 44 features were selected based on data availability and insights from the literature review,covering fundamental data and momentum indicators.In the research,we tested linear regression models based on least squares,linear regression models based on penalty functions(ridge regression,lasso regression,and elastic net regression),neural networks,and gradient boosted tree models.According to the prediction results of each model,this paper constructs different investment portfolios,calculates the returns,and draws the conclusion that the out-of-sample prediction effect of the neural network model and the gradient boosting tree is the best.This paper selects four portfolios based on the S&P 500,technology sector,consumer discretionary sector and banking sector for feature importance ranking.The results show that the momentum factor is important for share price predictions for all 4 tested portfolios. |