Deep learning has been widely used in many research areas recently. One of the common applications is financial forecasting. Convolutional neural network (CNN), a class of deep learning, which is capable of capturing complex features from the images. In this paper, we proposed a method for forecasting Taiwan capitalization weighted stock index by using Xception, a CNN presented by Chollet, F from Google. Furthermore, with the labeling technique we proposed which aims to predict the median of the closing price of future 20, 30, or 40 days. Based on the results produced by each model, we propose a method to find the optimal trading strategy. Then, after the simulation based on trading the common ETFs in Taiwan which includes 0050.TW, 0056.TW, the promising results show that we can make more profits than those traditional trading strategies such as Buy and Hold and some technical indicators.