The capital market plays a crucial role within a country's financial structure and is instrumental in funding significant, long-term projects. Investments in the railway transport industry are vital for boosting other economic areas and have a profound impact on macroeconomic dynamics. Nonetheless, the potential for delayed or uncertain returns may deter investors. Accurate predictions of rail company stock prices on exchanges are therefore vital for making informed investment choices and securing sustained investment. This study employs deep learning techniques to forecast the closing prices of MAPNA and Toucaril shares on the Tehran Stock Exchange. It utilizes deep neural networks, specifically One-dimensional Convolutional Neural Networks (1D-CNN), Long Short-Term Memory (LSTM) networks, and a combined CNN-LSTM model, for stock price prediction. The effectiveness of these models is measured using various metrics, including MAE, MSE, RMSE, MAPE, and R2. Findings indicate that deep learning methods can predict stock prices effectively, with the CNN-LSTM model outperforming others in this research. According to the results, The CNN-LSTM model reached the highest R2 of 0.992. Also, based on criteria such as MAE, MSE, RMSE, and MAPE the best results belong to LSTM (Kaggle-modified) with 521.715, 651119.194, 806.920, and 0.028, respectively.