多頭旗形技術分析(Bull flag technical analysis)是一項被常用於資料探勘與圖樣辨識的技術。在本文中吾人使用試算表作為工具,建置了一個多頭旗形技術分析的辨識器。並利用此辨識器在台灣股票交易市場上尋找買點,並制定買賣策略。吾人採用William Leigh等人所使用的一個10*10的多頭旗形圖樣,當做買點的技術圖樣,實驗所採用之資料來自台灣股票交易市場從1990年到2007年的大盤收盤指數與成交量。首先將每一交易日與其先前d個交易日共d+1個交易日資料組成一交易移動視窗,然後比對交易視窗與多頭旗形圖樣的吻合程度計算出一個吻合值,吻合值越高表示這一個交易視窗越吻合吾人所採用的多頭旗形圖樣,此即可能是吾人的買點機會。吾人分別使用20、40、60、80、100、120個交易日為交易視窗寬度,並在買入後5、20、60、120、240天後賣出,計算其報酬率並與市場平均報酬率做一比較。實驗結果顯示藉由多頭旗形吻合值的輔助所篩選出來的買點的平均報酬率優於市場平均報酬率。
The method we used in this study is often applied in data mining and in pattern recognition, we use a spreadsheet as the tool to implement a recognizer for bull flag technical analysis, using this recognizer to find the purchasing opportunities and to discover trading rules on Taiwan stock exchange market. We adopt a 10*10 bull flag template which is presented by W. Leigh et al. as the pattern for purchasing opportunities. The experiment data is collected from Taiwan Stock Exchange market from 1990 to 2007. We combine every trading day with other d foregoing trading day data to form a trading window with d+1 width, then match the trading window with the template to obtain the fit value. The higher fit value indicates that the trading window is the more alike the bull flag template. It could be the purchasing opportunities. We use 20-day, 40-day, 60-day, 80-day,100-day, 120-day as a trading window size and buy and sell it after 5 days, 20 days, 60 days, 120 days, 240 days. Calculate the average profit percentages for those purchasing days and compare them with overall market average return for all of the trading day. The empirical results indicate that the profit of the purchasing opportunities we found is significantly better than market average return by buying every day.