基於卷積神經網路的市場結構圖像方法建構交易策略
Development of Trading Strategies with Structure of Market Activities Image Based on Convolutional Neural Networks
摘要
本研究嘗試以人工智慧中深度學習方法,卷積神經網路建立趨勢分類模型,辨識市場趨勢延續或反轉的行為,以此建構順勢與逆勢交易策略,嘗試建構出能在市場中投資獲利的策略。
文獻指出,大部分的深度學習研究使用遞歸神經網路系列的模型進行金融時間序列預測,然而,這些研究大部分皆以原始的時間序列資料作為模型的輸入,市場中存在著交易目的不同參與者,如投機、避險或套利等,因為他們的交易週期不同,原始時間序列資料中容易潛藏著許多影響模型學習的雜訊。為了避免在建立模型學習過多的雜訊,本研究提出市場結構圖像,先以市場輪廓理論為基礎,將金融時間序列資料中的交易活動轉換成市場輪廓結構,這種結構易於發現趨勢主導者的行為。此外,考量金融市場為一動態環境,特徵值發生的先後順序也應視為造成趨勢變化的一個因果,為了使模型能學習特徵值的時間因果關係,在轉換結構圖形的過程中,將以不同的灰階值呈現不同時間發生的市場交易活動。本研究共設計5種灰階市場結構圖像,不同的圖像將關注不同時間週期的市場活動。為避免人工介入進行特徵工程,本研究利用卷積神經網路訓練趨勢變化分類模型,此網路能於圖像卷積的過程,自動萃取圖像中與金融市場趨勢變化的相關的重要的特徵值。
考量不同投資人具有不同的交易風格、風險偏好與本金,本研究根據訓練後的趨勢變化分類模型,建構了順勢交易策略及逆勢交易策略,並加入部位管理與風險管理方法,以美國標普500 E-mini期貨進行實證研究。研究結果顯示,以具時間因果特徵值之灰階市場結構圖像,訓練卷積神經網路模型,能發現趨勢延續或反轉的行為,建構出的順勢交易策略其獲利能力與風險表現皆能顯著優於較不具時間因果的圖像以及隨機交易模型。
文獻指出,大部分的深度學習研究使用遞歸神經網路系列的模型進行金融時間序列預測,然而,這些研究大部分皆以原始的時間序列資料作為模型的輸入,市場中存在著交易目的不同參與者,如投機、避險或套利等,因為他們的交易週期不同,原始時間序列資料中容易潛藏著許多影響模型學習的雜訊。為了避免在建立模型學習過多的雜訊,本研究提出市場結構圖像,先以市場輪廓理論為基礎,將金融時間序列資料中的交易活動轉換成市場輪廓結構,這種結構易於發現趨勢主導者的行為。此外,考量金融市場為一動態環境,特徵值發生的先後順序也應視為造成趨勢變化的一個因果,為了使模型能學習特徵值的時間因果關係,在轉換結構圖形的過程中,將以不同的灰階值呈現不同時間發生的市場交易活動。本研究共設計5種灰階市場結構圖像,不同的圖像將關注不同時間週期的市場活動。為避免人工介入進行特徵工程,本研究利用卷積神經網路訓練趨勢變化分類模型,此網路能於圖像卷積的過程,自動萃取圖像中與金融市場趨勢變化的相關的重要的特徵值。
考量不同投資人具有不同的交易風格、風險偏好與本金,本研究根據訓練後的趨勢變化分類模型,建構了順勢交易策略及逆勢交易策略,並加入部位管理與風險管理方法,以美國標普500 E-mini期貨進行實證研究。研究結果顯示,以具時間因果特徵值之灰階市場結構圖像,訓練卷積神經網路模型,能發現趨勢延續或反轉的行為,建構出的順勢交易策略其獲利能力與風險表現皆能顯著優於較不具時間因果的圖像以及隨機交易模型。
This study attempted to identify the trend continuation or reversal behavior using deep learning method, convolutional neural network (CNN), to build a trend classification model, and developed trading strategies that could make profits in the financial market.
Literature indicated that most deep learning studies used recurrent neural network and its variants for financial time series prediction due to their internal memory cell that could process incoming input with the previous states. However, most of the research used the raw time series data as learning features. There were many participants with diverse trading timeframe in the market. In addition, they had distinct purposes such as arbitraging, hedging, or speculating, resulting in plenty of noise in the raw time series data. To solve this problem, we proposed the structure of market activities image which converted financial time series into bell-shape representation based on Market Profile theory so that the majority activities of trend dominators could be detected. Furthermore, considering the financial market is dynamic, the order of occurrence of the feature in the structure image should also be considered as a cause and effect of the trend changes. Therefore, five types of grayscale structure image were designed, focusing on distinct timeframe of market participants. To learn important features in structure image related to financial market trend changes, this study employed the CNN that could extract features automatically during the convolutional process.
The experimental results of momentum trading based on model demonstrated statistically significant differences in profitability and risk performance and indicated CNN trained with proposed grayscale structure image could applied for discovering trend continuation or reversal behavior and development of trading strategies.
Literature indicated that most deep learning studies used recurrent neural network and its variants for financial time series prediction due to their internal memory cell that could process incoming input with the previous states. However, most of the research used the raw time series data as learning features. There were many participants with diverse trading timeframe in the market. In addition, they had distinct purposes such as arbitraging, hedging, or speculating, resulting in plenty of noise in the raw time series data. To solve this problem, we proposed the structure of market activities image which converted financial time series into bell-shape representation based on Market Profile theory so that the majority activities of trend dominators could be detected. Furthermore, considering the financial market is dynamic, the order of occurrence of the feature in the structure image should also be considered as a cause and effect of the trend changes. Therefore, five types of grayscale structure image were designed, focusing on distinct timeframe of market participants. To learn important features in structure image related to financial market trend changes, this study employed the CNN that could extract features automatically during the convolutional process.
The experimental results of momentum trading based on model demonstrated statistically significant differences in profitability and risk performance and indicated CNN trained with proposed grayscale structure image could applied for discovering trend continuation or reversal behavior and development of trading strategies.