Stock selection is an important issue in the stock market, and when assessing portfolio performance, return and risk are important conditions. The Sharpe ratio is a well-known assessment strategy that simultaneously considers portfolio return and risk. However, as the Sharpe ratio uses the average line to assess portfolio risk, it can easily assess a portfolio with stable uptrend as high risk, thus, this paper uses the trend ratio to address this problem. The trend ratio can assess a stable uptrend portfolio with low risk and identify a portfolio that has a higher daily expected return per unit daily risk. As the solution space in stock solution is huge, it is hard to use brute-force method to exhaust selections within a limited time. Thus, this paper uses the Global-best guided Quantum-inspired Tabu Search algorithm with Not-gate (GNQTS) to effectively optimize a portfolio given limited time. In addition, this paper uses 13 different kinds of sliding windows to train and test data, and identify a suitable period with a high trend ratio. The experimental results show that the proposed method can identify a portfolio with stable uptrend in the U.S. stock market. This paper does not exclude any stocks in the solution space; therefore, our method can comprehensively consider all the possible combinations of a portfolio. Moreover, we find some interesting phenomenon: the best single stock may not be contained in a portfolio and the stock with negative return cannot be excluded in the solution space. In addition, this study compares our portfolio performance with the portfolio guided by the Sharpe ratio; according to the experimental results, a portfolio guided by the trend ratio has more stable uptrend and lower risk than the Sharpe ratio. Thus, our method can outperform other assessment strategies.INDEX TERMS Stock selection, portfolio optimization, metaheuristic algorithm, trend ratio, quantuminspired tabu Search algorithm (QTS), the U.S. Stock Market.