在近幾年的文獻或是期刊中,有大量的Deep learning是運用來預測下一個時間點會發生的事情,也就是說有很多的文獻在預測下一個時間點的收盤價或是股價,但只研究到是否能精準的預測到未來的股價如此而已,卻無人研究這樣的預測結果在實際的交易中是否能夠真實獲利。 本研究使用深度學習運用在時間序列預測較為不錯的LSTM與TCN做為股價預測模型,但預測後怎麼運用在交易上,這個是比較少人在探討的,而運用在交易如果是使用程式交易的話,比較容易有系統的去了解它的獲利與風險,本研究提出了在傳統上很常用使用LSTM來預測股價,但並沒有把它和固定的交易模式去做測試預測收盤價後可能的獲利性,本研究是用程式交易和把預測的時間拉長到週,因為以週為單位股價較容易有上下波動,把這兩者結合去探討獲利的可能性。 本研究探討臺灣50成份股存在超過30年的公司,需要超過30年是因為以週為單位及預測模型需要有一定資料量的關係,所以臺灣50中有超過30年公司一共有11家,驗證此11家公司,其中有9家呈現不錯的獲利表現。 ;In recent literature or journals, there is a large amount of Deep Learning used to predict what will happen at the next point in time, that is, there are many documents that predict the closing price or stock price at the next time, but Only researched whether it is possible to accurately predict the future stock price, but no one has studied whether such predictions can actually make a profit on actual transactions. This study uses deep learning to use LSTM and TCN, which are better predictors of time series, as a stock price forecasting model. However, how to use it in trading after the forecast is relatively small, and it is used in trading if the program is used. It is easier to systematically understand its profit and risk. This study proposes that LSTM is traditionally used to predict stock prices, but it has not been tested with the fixed trading pattern to predict the closing price. For the sake of profitability, this study uses program trading and stretches the forecast time to weeks, because the stock price is more likely to fluctuate up and down in weeks, and the two are combined to explore the possibility of profit. This study explores the fact that Taiwan′s 50 constituent stocks have existed for more than 30 years. It takes more than 30 years because the weekly units and forecasting models need to have a certain amount of data. Therefore, there are 11 companies in Taiwan with more than 30 years. Of the 11 companies, 9 of them have a good profit performance.