Most investors change stock prices in long-term businesses because of global turbulence in the markets. Consequently, prediction of stock price is a difficult task because of unknown effective factors in this area although previous researches have shown that neural networks are more effective and accurate in many areas than traditional statistical models. The proposed study aims to predict prices on stock exchange via the hybrid artificial neural network models and metaheuristic algorithms which consist of cuckoo search, improved cuckoo search, improved cuckoo search genetic algorithm, genetic algorithm, and particle swarm optimization. The important 28 variables of value-added knowledge related to stock indices are identified as input parameters in this network, and then real values are obtained (http://www.tsetmc.com). The results of the proposed model suggest that particle swarm optimization is a dominant metaheuristic approach to predict stock price according to statistical performances of the above approaches.