淡江大學覺生紀念圖書館 (TKU Library)
進階搜尋


下載電子全文限經由淡江IP使用) 
系統識別號 U0002-1701202001444800
中文論文名稱 以相關性為基礎之配對交易最佳化技術
英文論文名稱 Correlation-based Pair Trading Optimization Techniques
校院名稱 淡江大學
系所名稱(中) 資訊工程學系碩士班
系所名稱(英) Department of Computer Science and Information Engineering
學年度 108
學期 1
出版年 109
研究生中文姓名 黃俊傑
研究生英文姓名 Chun-Chieh Huang
學號 607410056
學位類別 碩士
語文別 中文
口試日期 2020-01-15
論文頁數 96頁
口試委員 指導教授-陳俊豪
委員-黃科瑋
委員-吳牧恩
中文關鍵字 資料探勘  相關性  配對交易策略  布林通道  交易策略最佳化 
英文關鍵字 Data mining  correlation  Pairs trading strategies  Trading strategy optimization 
學科別分類 學科別應用科學資訊工程
中文摘要 金融市場中充斥著眾多影響投資獲利程度的因素,故許多交易策略與組合最佳化技術不斷被提出。其中,配對交易策略是廣泛應用的交易策略之一,因其符合市場中性且容易使用。傳統配對交易策略是利用兩個相關性較高的股票或其它證券,一旦兩者之間出現了背離的走勢且此背離在未來是會得到糾正的,則可產生套利的機會。然而,負相關性較高的股票亦可形成配對交易,故本論文利用此特性,為使交易策略獲利,我們提出三個演算法來達成此目標,分別為:(1)相關係數為基礎之配對交易演算法(Correlation-coefficient based pairs trading algorithm, CPT);(2)布林通道為基礎的配對交易演算法(Bollinger-band based correlation-coefficient based pairs trading Algorithm, BBCPT);(3)遺傳為基礎的的配對交易演算法(Genetic bollinger-band based correlation-coefficient based pairs trading algorithm, GBBCPT)
在CPT方法中,首先計算標的中任兩公司的相關係數,如其相關性為負值且小於預設之門檻值,則形成一交易配對。接著,利用公司開盤與收盤股價漲(跌)幅度判定進場訊號後,做多預期上漲並放空預期下跌標的,達到停利或停損條件時則結束該組交易配對。此方法中之進出場訊號判定方式易導致獲利波動大,故提出方法二改善此問題。
在BBCPT方法中,其結合布林通道(Bollinger band)強化所提之配對交易策略,即利用歷史股價計算移動平均值、股價壓力值、股價支撐值等數值作為進出場訊號。雖然方法二強化了CPT的進出場訊號,但相關係數門檻值、進場通道寬度與出場通道寬度的設定會影響此方法的獲利,因此,我們進一步利用遺傳演算法進行參數的最佳化。
在GBBCPT方法中,每個染色體表示一組可能的相關係數門檻值、進場通道寬度與出場通道寬度,且使用染色體之累計獲利為適合度評估函數衡量其優劣,之後透過演化程序找出近似最佳的參數設定。
最後,實驗使用了台灣50成分股中共44家公司歷史股價資料,透過不同的實驗分析來驗證本文提出的三個方法的有效性,包含:(1)不同限制與參數設定對CPT的影響;(2) 不同限制與參數設定對BBCPT的影響與(3)不同訓練區間與參數設定對GBBCPT影響。
英文摘要 The financial market is full of many factors that affect the return on investment, so many trading strategies and portfolio optimization techniques are constantly being proposed. Among them, the pairs trading strategy is one of the widely used trading strategies because it conforms to market neutrality and easy to use. In the traditional pairs trading strategy, the pairs are formed from two stocks or other securities with high correlation. Once a divergence trend occurs between the stocks in the pair, it can be known that the deviation will be corrected in the future, and an opportunity for arbitrage will appear. However, stocks with higher negative correlation can also be utilized to form trading pairs. Based on that property, to increase the returns of the pair trading strategies, this thesis presents three approaches to reach the goal, including: (1) Correlation-coefficient based pairs trading algorithm (CPT), (2) Bollinger-band based correlation-coefficient based pairs trading algorithm (BBCPT), and (3) Genetic bollinger-band based correlation-coefficient based pairs trading algorithm (GBBCPT).
In the CPT, the correlation coefficient of any two companies in the pair is calculated firstly. If the correlation is negative and less than a given threshold, a trading pair is formed. Then, using the difference of opening and closing stock prices to determine the entry signals, long the uptrend target and short the downtrend target. When reaching the take-profit or stop-loss conditions, the trading pair is closed. In the CPT, because the way to determine the trading signals may cause large fluctuation in profit, the second approach is proposed to solve this problem.
In the BBCPT, it combines the Bollinger band to strengthen the proposed pairing trading strategy. In other words, it utilizes the historical stock prices to derive moving averages, stock pressure values, and stock price support values for finding buying and selling signals. Although the BBCPT provides suitable trading signals for trading, the parameters those are the correlation coefficient threshold, entry channel width, and out channel width will affect the profitability, we thus further design an algorithm for parameter optimization using the genetic algorithms.
In the GBBCPT, a chromosome represents a possible correlation coefficient threshold, entry channel width, and out channel width. The cumulative profit is employed as fitness function to measure the quality of a chromosome. Then, the evolutionary process will be repeated to find a near optimal parameter setting for the pair trading strategy.
Finally, the empirical experiments were conducted on the historical stock price data that collected from 44 companies in Taiwan 50 ETF to verify the effectiveness of the proposed methods, including: (1) the influence of different restrictions and parameter settings on the CPT; (2) the influence of different restrictions and parameter settings on the BBCPT; and (3) the influence of different training intervals and parameter settings on the GBBCPT.
論文目次 目錄
目錄…………………………………………………………………………………………..IV
圖目錄………………………………………………………………………………………..VI
表目錄……………………………………………………………………………………...VIII
第一章 簡介 1
1.1 動機與定義 1
1.2 本文貢獻 4
1.3 本文架構 4
第二章 相關研究 5
2.1 交易策略 5
2.2 配對交易策略 6
2.3 布林通道 8
第三章 相關係數為基礎之配對交易演算法(CPT) 10
3.1 CPT–I 動機 10
3.2 CPT-I方法描述 11
3.3 CPT-I舉例說明 15
3.4 CPT-II動機 19
3.5 CPT-II方法描述 19
3.6 CPT-II舉例說明 22
第四章 布林通道為基礎之配對交易演算法(BBCPT) 26
4.1 BBCPT動機 26
4.2 BBCPT方法描述 27
4.3 BBCPT舉例說明 32
第五章 遺傳為基礎的之配對交易演算法(GBBCPT) 38
5.1 GBBCPT動機 38
5.2 GBBCPT方法描述 38
5.3 GBBCPT舉例說明 47
第六章 實驗結果 57
6.1 實驗資料描述 57
6.2 不同限制與參數設定對CPT的影響 64
6.2.1 CPT實驗動機 64
6.2.2 CPT-I實驗結果 64
6.2.3 CPT-II實驗結果 67
6.3不同限制與參數設定對BBCPT的影響 72
6.3.1 BBCPT實驗動機 72
6.3.2 BBCPT實驗結果 72
6.4 不同訓練區間與參數設定對GBBCPT的影響 76
6.4.1 GBBCPT實驗動機 76
6.4.2 GBBCPT經遺傳演算法最佳化後解果 76
6.4.3 GBBCPT不同訓練區間最佳化解果比較 77
6.4.4不同方法結果比較 79
第七章 結論與未來工作 81
相關文獻 83
附錄一 英文論文 87
圖目錄
圖1 CPT-I 步驟2流程圖 17
圖2 CPT-I 步驟3流程圖 18
圖3 CPT-II 步驟2流程圖 24
圖4 CPT-II 步驟3流程圖 25
圖5 BBCPT 步驟2流程圖 35
圖6 BBCPT進場條件 36
圖7 BBCPT出場條件 37
圖8 GBBCPT 進場條件 51
圖9 GBBCPT 出場條件 52
圖10 44家公司於資料期間開盤價 58
圖11 44家公司於資料期間收盤價 58
圖12 44家公司於四年訓練期間開盤價 59
圖13 44家公司於四年訓練期間收盤價 59
圖14 44家公司於三年訓練期間開盤價 60
圖15 44家公司於三年訓練期間收盤價 60
圖16 44家公司於兩年訓練期間開盤價 61
圖17 44家公司於兩年訓練期間收盤價 61
圖18 44家公司於一年訓練期間開盤價 62
圖19 44家公司於一年訓練期間收盤價 62
圖20 44家公司於一年測試期間開盤價 63
圖21 44家公司於一年測試期間收盤價 63
圖22 CPT-I climit = - 0.7、停利(損) = 10%之每日獲利 65
圖23 CPT-I climit = - 0.7、停利(損) = 20%之每日獲利 65
圖24 CPT-I climit = - 0.7、停利(損) = 30%之每日獲利 65
圖25 CPT-I climit = - 0.8、停利(損) = 10%之每日獲利 66
圖26 CPT-I climit = - 0.8、停利(損) = 20%之每日獲利 66
圖27 CPT-I climit = - 0.8、停利(損) = 30%之每日獲利 66
圖28 CPT-II climit = - 0.7、停利(損) = 10%之每日獲利 69
圖29 CPT-II climit = - 0.7、停利(損) = 20%之每日獲利 69
圖30 CPT-II climit = - 0.7、停利(損) = 30%之每日獲利 69
圖31 CPT-II climit = - 0.8、停利(損) = 10%之每日獲利 70
圖32 CPT-II climit = - 0.8、停利(損) = 20%之每日獲利 70
圖33 CPT-II climit = - 0.8、停利(損) = 30%之每日獲利 70
圖34 CPT-II n = 1之每日獲利 71
圖35 CPT-II n = 5之每日獲利 71
圖36 CPT-II n = 10之每日獲利 71
圖37 BBCPT climit = - 0.6、BBentryWidth = 1.5、BBoutWidth = 0.5之每日獲利 73
圖38 BBCPT climit = - 0.7、BBentryWidth = 1.5、BBoutWidth = 0.5之每日獲利 73
圖39 BBCPT climit = - 0.8、BBentryWidth = 1.5、BBoutWidth = 0.5之每日獲利 73
圖40 BBCPT climit = - 0.6、BBentryWidth = 1.0、BBoutWidth = 0.5之每日獲利 74
圖41 BBCPT climit = - 0.6、BBentryWidth = 1.5、BBoutWidth = 1.0之每日獲利 74
圖42 BBCPT climit = - 0.6、BBentryWidth = 2.0、BBoutWidth = 1.5之每日獲利 74
圖43 BBCPT cDay = 5之每日獲利 75
圖44 BBCPT cDay = 10之每日獲利 75
圖45 BBCPT cDay = 20之每日獲利 75
圖46 GBBCPT 獲利演化 76
圖47 GBBCPT參數最佳化獲利 80
表目錄
表1 CPT-I 6家公司的股價資料 15
表2 CPT-I 6家公司的相關係數矩陣MT 16
表3 CPT-II 6家公司的股價資料 22
表4 CPT-II 6家公司的相關係數矩陣MT 23
表5 BBCPT 6家公司的股價資料 32
表6 BBCPT 6家公司的相關係數矩陣MT 33
表7 GBBCPT 染色體(q)編碼 40
表8 GBBCPT 6家公司股票資料 47
表9 GBBCPT 初始族群染色體 48
表10 GBBCPT 6家公司的相關係數矩陣MT(q1) 49
表11 GBBCPT 族群中所有染色體Fitness 53
表12 競爭選擇法 54
表13 經競爭選擇法挑選出之族群 54
表14 即將交配之兩條染色體 55
表15 挑出較大基因產生一條新染色體 55
表16 挑出較小基因產生一條新染色體 55
表17 經交配比例mma產生兩條新染色體 56
表18 經突變產生新染色體 56
表19 實驗使用之44家公司 57
表20 CPT-I 實驗結果 64
表21 CPT 實驗結果 68
表22 CPT-II 變動進場觀察天數n下實驗結果 71
表23 BBCPT 變動climit下實驗結果 72
表24 BBCPT 變動BBentryWidth和BBoutWidth下實驗結果 72
表25 BBCPT 變動cDay下實驗結果 75
表26 GBBCPT 最佳化染色體編碼 76
表27 GBBCPT 不同訓練區間最佳化結果與測試區間結果比較 77
表28 GBBCPT 不同訓練區間最佳化結果 78
表29 BBCPT、GBBCPT與BAH策略獲利比較 79
表30 GBBCPT購買之交易配對 80

參考文獻 相關文獻
[1] A.M. Farley and S. Jones, “Using a genetic algorithm to determine an index of leading economic indicators, ”Computational Economics,vol.7, no.3, pp.163–173,1994.
[2] A. Mochon, D. Quintana, Y. Saez, and P. Isasi, “Soft computing techniques applied to finance, ” Applied Intelligence, vol. 29, no. 2, pp.111–115,2008.
[3] K.-J. Kim and I. Han, “Genetic algorithms approach to feature discretization in artificial neural networks for the prediction of stock price index,” Expert Systems with Applicatio- ns, vol.19, no. 2, pp.125–132,2000.
[4] Y. Becker, P. Fei, and A. Lester, “Stock selection – an innovative application of genetic programming methodology,” Genetic Programming Theory and Practice IV, vol. 5, ch- apter12, pp.315–334, 2006.
[5] C.-F. Huang, “A hybrid stock selection model using genetic algorithms and support vec- or regression,” Applied Soft Computing Journal, vol.12, no.2, pp.807–818, 2012.
[6] X. Z. Zhang, Y. Hu, K. Xie, S. Y. Wang, E. W. T. Ngai, and M. Liu, “A causal feature s- election algorithm for stock prediction modeling,” Neurocomputing, vol.14, pp.48–59, 2014.
[7] G. Zhang, B. E. Patuwo, and M. Y. Hu, “Forecasting with artificial neural networks: the state of the art,” International Journal of Forecasting, vol.14, no.1, pp.35–62, 1998.
[8] C.-L. Huang and C.-Y. Tsai, “A hybrid SOFM-SVR with a filter based feature selection for stock market forecasting,” Expert Systems with Applications, vol.36, no.2, pp.1529–1539, 2009.
[9] T.-C. Chu, C.-T. Tsao, and Y.-R. Shiue, “Application of fuzzy multiple attribute decision making on company analysis for stock selection,” Proceedings of the 1996 Asian Fuzzy Systems Symposium on Soft Computing on Intelligent Systems and Information Process- ing, pp. 509–514, 1996.
[10] M. R. Zargham and M. R. Sayeh, “A Web-based information system for stock selection and evaluation,” Proceedings of the 1st International Workshop on Advance Issues of E-Commerce and Web – Based Information Systems, pp.81–83, 1999.
[11] N. Chapados and Y. Bengio, “Cost functions and model combination for VaR-based ass- et allocation using neural networks,” IEEE Transactions on Neural Networks, vol.12 no. 4, pp. 890– 906, 2001.
[12] Y. Becker, P. Fei, and A. Lester, “Stock selection: an innovative application of genetic programming methodology,” Genetic Programming Theory and Practice IV, 2007.

[13] K.K. Lai, L. Yu, S. Wang, and C. Zhou, “A double – stage genetic optimization algorith- m for portfolio selection,” Neural Information Processing : Proceedings of the 13th Int- ernational Conference, ICONIP, vol.4234, pp.928–937, 2006.
[14] S.-S. Chen, C.-F. Huang, and T.-P. Hong, “A multi-objective genetic model for stock se- lection,” Proceedings of the 27th Annual Conference of the Japanese Society for Artific- ial Intelligence, 2013.
[15] G.G. Szpiro, “Forecasting chaotic time series with genetic algorithms,” Physical Review E, vol.55, no.3, pp.2557–2568, 1997.
[16] A. Fiordaliso, “A nonlinear forecasts combination method based on Takagi-Sugeno fuz- zy systems,” International Journal of Forecasting, vol.14, no.3, pp.367–379, 1998.
[17] N. S. Thomaidis, N. Kondakis, and G. D. Dounias, “An intelligent statistical arbitrage t- rading system,” Advances in Artificial Intelligence, vol. 3955, pp.596–599, 2006.
[18] M. Avellaneda and J.-H. Lee, “Statistical arbitrage in the US equities market,” Quantit- ative Finance, vol.10, no.7, pp.761–782, 2010.
[19] E. Gatev, W. N. Goetzmann, and K. G. Rouwenhorst, “Pairs Trading: performance of a relative-value arbitrage rule,” Review of Financial Studies, vol.19, no.3, pp.797–827, 2006.
[20] C.L. Dunis, G. Giorgioni, J. Laws, and J. Rudy, “Statistical arbitrage and high-frequenc-y data with an application to Eurostoxx 50 equities,” CIBEF Working Papers,2010.
[21] R.J. Elliott, J. van der Hoek, and W.P. Malcolm, “Pairs trading,” Quantitative Finance, vol.5, no.3, pp.271–276, 2005.
[22] P. Saks and D. Maringer, “Genetic programming in statistical arbitrage,” Applications of Evolutionary Computing, vol.4974, pp. 73–82, Springer, 2008.
[23] C.-F. Huang, T.-N. Hsieh, B. R. Chang, and C.-H. Chang, “A comparative study of sto- ck scoring using regression and genetic-based linear models,” Proceedings of the IEEE International Conference on Granular Computing(GrC’11), pp.268– 273, IEEE, Kaohsiung, Taiwan, 2011.
[24] J. Murphy, “Technical Analysis of Financial Markets,” New York Institute of Finance, 1999.
[25] J.H. Holland, “Adaptation in Natural and Artificial Systems, “The University of Michi- gan Press, 1975.
[26] D.E. Goldberg and K. Deb, “A comparative analysis of selection schemes used in genet- ic algorithms,” Foundation of Genetic Algorithms, pp.69–93, 1991.
[27] Kanamura, Takashi; Rachev, Svetlozar; Fabozzi, FranK, “The Application of Pairs Tra- ding to Energy Futures Markets, ”Karlsruhe Institute of Technology, 2015.
[28] Bookstaber, Richard. “A Demon Of Our Own Design,” 2006.
[29] C. Alexande: “Market Models: A Guide to Financial Data Analysis,” 2001.
[30] B. Binary,"Co-integration Trading Strategy", 2015.
[31] Mahdavi Damghani, Babak, “The Non-Misleading Value of Inferred Correlation: An Introduction to the Cointelation Model, ” Wilmott, pp 50–61, 2012.
[32] C.-F. Huang, “An intelligent model for pairs trading using genetic algorithms,” Comput- ational Intelligence and Neuroscience, vol 2015, 2015.
[33] G. Vidyamurthy, “Pairs trading: quantitative methods and analysis,”. Wiley, 2004.
[34] Binh Do, “A New Approach to Modeling and Estimation for Pairs Trading”, 2006
[35] C. H. Chen and C. Y. Hsieh, "Mining actionable stock portfolio by genetic algorithms," accepted as to appear in Journal of Information Science and Engineering, 2016.
[36] Gatev, Evan, William N. Goetzmann, and K. Geert Rouwenhorst, "Pairs trading: Perfor- mance of a relative-value arbitrage rule, "The Review of Financial Studies, vol 19, pp7- 97–827, 2016.
[37] Chen, Huafeng, et al. "Empirical investigation of an equity pairs trading strategy,” Man- agement Science, vol 65, pp 370-389, 2017.
[38] Clegg, Matthew, and Christopher Krauss, "Pairs trading with partial cointegration,” Qu- antitative Finance, vol 18, pp 121-138, 2018.
[39] Rad, Hossein, Rand Kwong Yew Low, and Robert Faff, "The profitability of pairs trading strategies: distance, cointegration and copula methods, "Quantitative Finance, vol 16, pp 1541-1558, 2016.
[40] Krauss, Christopher, "Statistical arbitrage pairs trading strategies: Review and outlook, "Journal of Economic Surveys, vol 31, pp 513-545, 2017.
[41] Jacobs, Heiko, and Martin Weber, "On the determinants of pairs trading profitability,” Journal of Financial Markets, vol 23, pp 75-97, 2015.
[42] Sermpinis, Georgios, Thanos Verousis, and Konstantinos Theofilatos, "Adaptive Evolu- tionary Neural Networks for Forecasting and Trading without a Data‐Snooping Bias,” Journal of Forecasting, vol 35, pp 1-12, 2016.
[43] R.-A. Rivera, M.-V. Rendon, R. Ortiz, "Genetic algorithms and Darwinian approaches in financial applications: A survey, "Expert Systems with Applications, vol 42, Issue 21,
pp 7684-7697, 2015.
[44] T. J. Chang, S. C. Yang and K. J. Chang, "Portfolio optimization problems in different r- isk measures using genetic algorithm," Expert Systems with Applications, vol. 36, pp. 10529-10537, 2009.
[45] Lin, Li, and Longbing Cao, "Mining in-depth patterns in stock market, "International journal of intelligent systems technologies and applications, vol 4, pp 225-238, 2008.
[46] Sezer, Omer Berat, Murat Ozbayoglu, and Erdogan Dogdu, "A Deep neural-network ba- sed stock trading system based on evolutionary optimized technical analysis parameter- s, "Procedia computer science, vol 114, pp 473-480, 2017.
[47] Ucar, Ilknur, Ahmet Murat Ozbayoglu, and Mustafa Ucar, "Developing a two level opti- ons trading strategy based on option pair optimization of spread strategies with evoluti- onary algorithms, "2015 IEEE Congress on Evolutionary Computation (CEC), 2015.
[48] Nair, Binoy B., "A stock trading recommender system based on temporal association ru- le mining, "SAGE Open, vol 5, 2015.
[49] Nayak, S. Chandra, and B.-B. Misra, "Estimating stock closing indices using a GA wei- ghted condensed polynomial neural network, "Financial Innovation, vol 4, pp 21, 2018.
[50] Mitchell, Melanie, “An Introduction to Genetic Algorithms. Cambridge,” 1996
[51] Sadeghi, Javad; Sadeghi, Saeid; Niaki, Seyed Taghi Akhavan"Optimizing a hybrid ven- dor-managed inventory and transportation problem with fuzzy demand: An improved p-article swarm optimization algorithm, " .Information Sciences, 2014
[52] Nekrasov, V. Knowledge rather than Hope, “A Book for Retail Investors and Mathemat- ical”, 2014
[53] C. Mitchell, “Trading Strategy,” 1998
[54] Low, R.K.Y.; Tan, E."The Role of Analysts' Forecasts in the Momentum Effect", Intern- ational Review of Financial Analysis, pp67–84, 2016
[55] Ryan, John A, “The Ethics of Speculation,” .International Journal of Ethics, pp335-34 7, 1962
[56] Pardo, R, “The Evaluation and Optimization of Trading Strategies,” J. Wiley & Sons, pp 18, 2008
[57] Achelis, Steve, “Technical Analysis from A to Z,” 1995.
[58] Justia, “Bollinger Bands – Trademark Details,” Justia.com, 2011-12-20.
[59] Charles, “Technical Analysis: The Complete Resource for Financial Market Technician- s,” 1995
[60] Baiynd, Anne-Marie, “The Trading Book: A Complete Solution to Mastering Technical Systems and Trading Psychology, “ McGraw-Hill. p.272., 2011
[61] J Bollinger, “Bollinger on Bollinger Bands”, 1980
[62] Lento, C.; Gradojevic, N.; Wright, C. S, “Investment information content in Bollinger Bands,”. Applied Financial Economics Letters. pp 263–267, 2007
[63] Balsara, Nauzer J.; Chen, Gary; Zheng, Lin. "The Chinese Stock Market: An Examinat- ion of the Random Walk Model and Technical Trading Rules,” Quarterly Journal of Bu- siness and Economics, pp43–63.2007
論文使用權限
  • 同意紙本無償授權給館內讀者為學術之目的重製使用,於2020-01-20公開。
  • 同意授權瀏覽/列印電子全文服務,於2020-01-20起公開。


  • 若您有任何疑問,請與我們聯絡!
    圖書館: 請來電 (02)2621-5656 轉 2486 或 來信