跳到主要內容

簡易檢索 / 詳目顯示

研究生: 陳翰琳
Han-Ling Chen
論文名稱: 排名支持向量機結合在線平均-變異數分析應用在股票選擇問題
Ranking Support Vector Machine with Online Mean-Variance Analysis for Stock Selection Problems
指導教授: 黃楓南
Feng-Nan Hwang
口試委員:
學位類別: 碩士
Master
系所名稱: 理學院 - 數學系
Department of Mathematics
論文出版年: 2023
畢業學年度: 111
語文別: 中文
論文頁數: 58
中文關鍵詞: 1. 離線-在線學習2. 長短期記憶3. 自編碼器4. 平均-變異數分析5. 支持向量機6. 股票排名
外文關鍵詞: 1. Online-Offline Learning, 2. LSTM, 3. AutoEncoder, 4. MVO, 5. Ranking SVM
相關次數: 點閱:16下載:0
分享至:
查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報
  • 本研究主要是透過Ranking SVM模型來預測股票的排名順序,從而找出排名靠前的股票投資並回測。方法則是利用機器學習中「長短期記憶模型-LSTM」和「自編碼器-AutoEncoder」,將代表股價走勢的技術指標資料做同化,並且轉換成高維度的特徵向量。接著透過「支持向量機-SVM」將特徵向量做兩兩股票漲跌幅的預測分類,並選出預測最佳的股票做投資並回測。由於股票的預測排名與實際排名存在落差,我們透過「平均-變異數優化法(MVO)」,找出一段時間內、一群股票中,其預測排名差負向變化率平均值最大的股票,並以此股票投資並看回報率。為了優化單一MVO周期模型的回報率,我們組合不同周期的MVO模型,並以此模型來推薦股票並投資。最終,我們使用組合型周期的MVO模型得到的累積回報率比元大ETF50的累積回報率要來的更好。


    The purpose of this study was to predict the ranking of stocks by using the Ranking SVM model and got a good accumulation return. Long Short-Term Memory (LSTM)-based AutoEncoder model was applied for data assimilation and higher-dimensional feature projecting. The training data was arranged by the pairwise method and was input to the SVM model for the classification of return comparison from every two stocks. The top-ranking stocks from prediction were used for investment; On the other hand, because of the ranking-prediction error from the classifier, Mean-Variance Optimization(MVO) was applied for post-processing. By choosing the minimum variance of the ranking-prediction error, the
    recommended investment stock could be found in each of the MVO models with different periods. In advance, each of the MVO models with different periods was chosen and combined into a composted MVO model for a better return. In the end, the accumulation return from composted MVO model was superior to the ETF50 ones.

    致謝 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vi Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . x 1 緒論 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 2 文獻回顧 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 3 方法 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 3.1 模型訓練以及預測方式 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 3.2 長短期記憶模型-LSTM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 3.3 自編碼器-AutoEncoder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 3.4 排序學習-LTR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 3.4.1 單文檔法-Pointwise . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 3.4.2 文檔對法-Pairwise . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 3.4.3 文檔列表法-Listwise . . . . . . . . . . . . . . . . . . . . . . . . . . 11 3.4.4 訓練集資料的收集與標注 . . . . . . . . . . . . . . . . . . . . . . . 11 3.5 Ranking SVM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 3.5.1 排序轉換分類 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 3.5.2 支持向量機-SVM . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 3.6 使用 MVO 方法對預測結果做後處理 . . . . . . . . . . . . . . . . . . . . . 14 3.6.1 平均-變異數優化法-MVO . . . . . . . . . . . . . . . . . . . . . . 14 3.6.2 使用股票預測排名差變化率的 MVO 方法 . . . . . . . . . . . . . . 16 3.6.3 使用不同週期的 MVO 模型來推薦股票 . . . . . . . . . . . . . . . 17 vii 3.6.4 使用前 N 天累積回報率來推薦 MVO 模型 . . . . . . . . . . . . . . 18 3.7 實驗流程 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 4 實驗設計 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 4.1 資料收集與處理 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 4.1.1 技術指標介紹 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 4.1.2 資料正規化 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 4.2 LSTM AutoEncoder 結構參數 . . . . . . . . . . . . . . . . . . . . . . . . . 25 4.3 SVM 參數設定 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 4.4 評分函數-NDCG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 4.4.1 傳統 NDCG 方法介紹 . . . . . . . . . . . . . . . . . . . . . . . . . 28 4.4.2 NDCG 的其他用法 . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 4.4.3 利用 NDCG 評分函數選擇 LSTM 長度參數 . . . . . . . . . . . . . 31 5 實驗與回測結果 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 5.1 2019 年前 N 名股票的累積回報率 . . . . . . . . . . . . . . . . . . . . . . . 32 5.2 2019 年不同 MVO 周期模型選股的累積回報率 . . . . . . . . . . . . . . . 33 5.3 2020 年前 N 名股票的累積回報率 . . . . . . . . . . . . . . . . . . . . . . . 33 5.4 2020 年不同 MVO 周期模型選股的累積回報率 . . . . . . . . . . . . . . . 34 5.5 回測結果綜合比較 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 6 結論 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

    [1] Z. Bodie and A. Kane. Investments. McGraw Hill, 2020.
    [2] H. M. Markowitz. Portfolio selection. Journal of Finance, 7:77–91, 1952.
    [3] Y. Kroll, H. Levy, and A. Rapoport. Experimental tests of the separation theorem
    and the capital asset pricing model. The American Economic Review, pages 500–519,
    1988.
    [4] E. F. Fama and K. R. French. The capital asset pricing model: Theory and evidence.
    Journal of Economic Perspectives, 18:25–46, 2004.
    [5] E. F. Fama and K. R. French. Common Risk Factors in the Returns on Stocks and
    Bonds. University of Chicago Press, 2021.
    [6] E. F. Fama and K. R French. The Cross-Section of Expected Stock Returns. University
    of Chicago Press, 2021.
    [7] J Patel, S Shah, P Thakkar, and K Kotecha. Predicting stock and stock price
    index movement using trend deterministic data preparation and machine learning
    techniques. Expert Systems with Applications, 42:259–268, 2015.
    [8] V.-D. Ta, C.-M. Liu, and D. Addis. Prediction and portfolio optimization in quanti-
    tative trading using machine learning techniques. In Proceedings of the Ninth Inter-
    national Symposium on Information and Communication Technology, pages 98–105,
    2018.
    [9] T. T.-L. Chong and W.-K. Ng. Technical analysis and the London stock exchange:
    testing the MACD and RSI rules using the ft30. Applied Economics Letters, 15:1111–
    1114, 2008.
    [10] R. Rosillo, D. De la Fuente, and J. Brugos. Technical analysis and the spanish stock
    exchange: testing the rsi, MACD, momentum and stochastic rules using spanish
    market companies. Applied Economics, 45:1541–1550, 2013.
    [11] Y. Ma, R. Han, and W. Wang. Prediction-based portfolio optimization models using
    deep neural networks. IEEE Access, 8:115393–115405, 2020.
    38
    [12] S. Obeidat, D. Shapiro, M. Lemay, M. K. MacPherson, and M. Bolic. Adaptive
    portfolio asset allocation optimization with deep learning. International Journal on
    Advances in Intelligent Systems, 11:25–34, 2018.
    [13] C.-M. Lin, J.-J. Huang, M. Gen, and G.-H. Tzeng. Recurrent neural network for
    dynamic portfolio selection. Applied Mathematics and Computation, 175:1139–1146,
    2006.
    [14] X. Y. Fu, J. H. Du, Y. F. Guo, M. W. Liu, T. Dong, and X. W. Duan. A machine
    learning framework for stock selection. arXiv preprint arXiv:1806.01743, 2018.
    [15] V. Kedia, Z. Khalid, S. Goswami, N. Sharma, and K. Suryawanshi. Portfolio gener-
    ation for indian stock markets using unsupervised machine learning. In 2018 Fourth
    ICCUBEA, pages 1–5. IEEE, 2018.
    [16] Z. Zhang, S. Zohren, and S. Roberts. Deep learning for portfolio optimization. The
    Journal of Financial Data Science, 2:8–20, 2020.
    [17] C. Krauss, X. A. Do, and N. Huck. Deep neural networks, gradient-boosted trees,
    random forests: Statistical arbitrage on the S&P 500. European Journal Operation
    Research, 259:689–702, 2017.
    [18] E. Tas and Ayca H. Atli. Stock price ranking by learning pairwise preferences.
    Computational Economics, pages 1–16, 2022.
    [19] T. Engin. A single pairwise model for classification using online learning with kernels.
    Hacettepe Journal of Mathematics and Statistics, 46:547–557, 2017.
    [20] M. Chang. Application of learning to rank and autoencoder hybrid technology in
    portfolio strategy. Master’s thesis, National Central University, 2021.
    [21] O. Jin and H. El-Saawy. Portfolio management using reinforcement learning.
    Preprint, 2016.
    [22] Z. Jiang, D. Xu, and J. Liang. A deep reinforcement learning framework for the
    financial portfolio management problem. arXiv preprint arXiv:1706.10059, 2017.
    [23] Z. Jiang and J. Liang. Cryptocurrency portfolio management with deep reinforcement
    learning. In 2017 Intelligent Systems Conference (IntelliSys), pages 905–913. IEEE,
    2017.
    39
    [24] T. Singh, R. Kalra, S. Mishra, M. Kumar, et al. An efficient real-time stock prediction
    exploiting incremental learning and deep learning. Evolving Systems, pages 1–19,
    2022.
    [25] S. Rathor and S. Agrawal. A robust model for domain recognition of acoustic com-
    munication using bidirectional LSTM and deep neural network. Neural Computing
    and Applications, 33:11223–11232, 2021.
    [26] X. Du, H. Zhang, H. Van Nguyen, and Z. Han. Stacked LSTM deep learning model for
    traffic prediction in vehicle-to-vehicle communication. In 2017 IEEE 86th Vehicular
    Technology Conference (VTC-Fall), pages 1–5. IEEE, 2017.
    [27] Y. Wu, M. Yuan, S. Dong, L. Lin, and Y. Liu. Remaining useful life estimation of
    engineered systems using vanilla LSTM neural networks. Neurocomputing, 275:167–
    179, 2018.
    [28] A. Graves and J. Schmidhuber. Framewise phoneme classification with bidirectional
    LSTM and other neural network architectures. Neural Networks, 18:602–610, 2005.
    [29] B. Li, Q. Wang, and J. Hu. Feature subset selection: a correlation-based SVM filter
    approach. IEEJ Transactions on Electrical and Electronic Engineering, 6:173–179,
    2011.
    [30] B. J. Frey and D. Dueck. Clustering by passing messages between data points.
    science, 315:972–976, 2007.
    [31] H. Xing, M. Ha, B. Hu, and D. Tian. Linear feature-weighted support vector machine.
    Fuzzy Information and Engineering, 1:289–305, 2009.
    [32] B. Chen, F. Sun, and J. Hu. Local linear multi-SVM method for gene function
    classification. In 2010 Second World Congress on Nature and Biologically Inspired
    Computing (NaBIC), pages 183–188. IEEE, 2010.
    [33] A. Fan and M. Palaniswami. Stock selection using support vector machines. In
    IJCNN’01. International Joint Conference on Neural Networks. Proceedings (Cat.
    No. 01CH37222), volume 3, pages 1793–1798. IEEE, 2001.
    [34] V. Vapnik. The Nature of Statistical Learning Theory. Springer science & business
    media, 1999.
    40
    [35] K. Veropoulos, C. Campbell, N. Cristianini, et al. Controlling the sensitivity of
    support vector machines. In Proceedings of the international joint conference on AI,
    volume 55, page 60. Stockholm, 1999.
    [36] T. Tantisripreecha and N. Soonthomphisaj. Stock market movement prediction using
    lda-online learning model. In 2018 19th IEEE/ACIS International Conference on
    Software Engineering, Artificial Intelligence, Networking and Parallel/Distributed
    Computing (SNPD), pages 135–139. IEEE, 2018.

    QR CODE
    :::