| 研究生: |
溫永靖 Wen, Yung-Ching |
|---|---|
| 論文名稱: |
探討社群媒體對抗式攻擊與防禦對股市交易影響:以Twitter情感分析為範例 Exploring Social Media Adversarial Attack and Defense on Stock Trading Effect: Twitter Sentiment Analysis as an Example |
| 指導教授: |
胡毓忠
Hu, Yuh-Jong |
| 口試委員: |
胡聚男
Hu, Chu-Nan 江彌修 Chiang, Mi-Hsiu |
| 學位類別: |
碩士
Master |
| 系所名稱: |
資訊學院 - 資訊科學系碩士在職專班 Excutive Master Program of Computer Science |
| 論文出版年: | 2023 |
| 畢業學年度: | 111 |
| 語文別: | 中文 |
| 論文頁數: | 34 |
| 中文關鍵詞: | 情感分析 、深度學習 、社群媒體 、對抗式攻擊 、對抗式防禦 |
| 外文關鍵詞: | Sentiment analysis, Deep learning, Social media, Adversarial attack, Adversarial defense |
| 相關次數: | 點閱:37 下載:0 |
| 分享至: |
| 查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報 |
近年來文字對抗式攻擊廣泛研究,在文字上進行微幅的調整,即會讓機器學習模型辨識錯誤。本文將模擬股票程式交易的情境,探討程式交易模型使用基於BERT模型的FinBERT受到文字對抗式攻擊影響情感辨識時,交易策略的變化,並探討如何因應文字對抗式攻擊。實驗結果發現:(1)使用Twitter討論SPY ETF貼文輔助價格預測,並執行布林通道交易策略,模擬日中交易進行回測,可獲得報酬率20.25%(2)當Twitter貼文受到攻擊者文字對抗式攻擊時,降低情感分析準確率整體下降24.1%與報酬率2.09%。(3)當Twitter受到文字對抗式攻擊時,使用Spark-NLP模型進行對抗式防禦,情感分析準確率會回升1.1%,但對於報酬率回復無影響。
The adversarial attack on the text has been extensively studied in recent years. A little perturbed on the text will let the machine model classify errors. This paper simulates the scenario of the stock program trading, exploring when the program trading model based on the BERT model's FinBERT was attacked against adversarial attack on the text and was affected the sentiment analysis, the change of trading strategy, and exploring how to solve adversarial attack on text. The experimental results found that(1)We use the Twitter posts which discuss SPY ETF to assist price forecasting and execute Bollinger Band trading strategies, simulate intraday-trading, it can get a 20.25% return rate (2) When Twitter posts were attacked by an adversarial attack, it will reduce sentiment analysis accurate rate 24.1% and return rate will reduce 2.09% (3)When Twitter posts were attacked by an adversarial attack, we use Spark-NLP model can recover sentiment analysis accurate rate 1.1% but no effect on transaction results.
摘要 i
Abstract ii
目錄 iii
圖目錄 V
表目錄 Vii
1前言 1
1.1研究動機 1
1.2研究目的 2
1.3研究架構 3
2文獻探討 4
2.1效率市場假說文獻回顧 4
2.2情感分析於股價預測文獻回顧 4
2.3對抗式技術 5
2.3.1DeepWordBug 7
2.3.2對抗式防禦偵測 9
2.3.3Spark-NLP模型 10
2.4長短期記憶模型LSTM 10
2.5文字對抗式攻擊於股市影響 12
3系統設計 13
3.1系統概述 13
3.2預測標的 15
3.3標的價格相關資料前處理 15
3.4情感分析特徵工程 16
3.5格蘭傑因果關係檢測 16
3.6預測價格模型訓練 16
3.7交易策略 17
3.8成果評量 17
4研究實作 18
4.1資料來源與週期 18
4.2交易參數設定 18
4.3模型參數設定 19
4.4模型成果評量 19
4.4.1命題一成果分析 19
4.4.2命題二成果分析 21
4.4.3命題三成果分析 25
4.4.4金融衡量指標統計 28
5結論與未來展望 30
5.1研究結果 30
5.2未來展望 31
參考文獻 32
[1] C. Gu and A. Kurov, “Informational role of social media: Evidence from twitter sentiment,” Journal of Banking & Finance, vol. 121, 2020.
[2] G. Ranco, D. Aleksovski, G. Caldarelli, M. Grčar, and I. Mozetič, “The effects of twitter sentiment on stock price returns,” PloS one, vol. 10, no. 9, 2015.
[3] D. F. Araci and Z. Genc, “Financial sentiment analysis with pre-trained language models,” arXiv preprint arXiv:1908.10063, 2019.
[4] P. Malo, A. Sinha, P. Korhonen, J. Wallenius, and P. Takala, “Good debt or bad debt: Detecting semantic orientations in economic texts,” Journal of the Association for Information Science and Technology, vol. 65, no. 4, pp. 782–796, 2014.
[5] Y. Hao, L. Dong, F. Wei, and K. Xu, “Visualizing and understanding the effectiveness of bert,” arXiv preprint arXiv:1908.05620, 2019.
[6] H. Altin, “Efficient market hypothesis, abnormal return and election periods,” Eu-ropean Scientific Journal, vol. 11, no. 34, 2015.
[7] S. Mehdian and M. J. Perry, “Anomalies in us equity markets: A re-examination of the january effect,” Applied Financial Economics, vol. 12, no. 2, pp. 141–145, 2002.
[8] A. Mittal and A. Goel, “Stock prediction using twitter sentiment analysis,” Stand-ford University, CS229 (2011 http://cs229. stanford. edu/proj2011/GoelMittal-StockMarketPredictionUsingTwitterSentimentAnalysis. pdf), vol. 15, 2012.
[9] L. Nemes and A. Kiss, “Prediction of stock values changes using sentiment analysis of stock news headlines,” Journal of Information and Telecommunication, vol. 5, no. 3, pp. 375–394, 2021.
[10] J. Devlin, M.-W. Chang, K. Lee, and K. Toutanova, “Bert: Pre-training of deep bidirectional transformers for language understanding,” arXiv preprint arXiv:1810.04805, 2018.
[11] Y. Zhou, J.-Y. Jiang, K.-W. Chang, and W. Wang, “Learning to discriminate per-turbations for blocking adversarial attacks in text classification,” arXiv preprint arXiv:1909.03084, 2019.
[12] I. Alsmadi, K. Ahmad, M. Nazzal, F. Alam, A. Al-Fuqaha, A. Khreishah, and A. Al-gosaibi, “Adversarial attacks and defenses for social network text processing ap-plications: Techniques, challenges and future research directions,” arXiv preprint arXiv:2110.13980, 2021.
[13] J. Morris, E. Lifland, J. Y. Yoo, J. Grigsby, D. Jin, and Y. Qi, “Textattack: A frame-work for adversarial attacks, data augmentation, and adversarial training in nlp,” pp.119–126, 2020.
[14] I. J. Goodfellow, J. Shlens, and C. Szegedy, “Explaining and harnessing adversarial examples,” arXiv preprint arXiv:1412.6572, 2014.
[15] V. Kocaman and D. Talby, “Spark nlp: natural language understanding at scale,”Software Impacts, vol. 8, 2021.
[16] Andreotti, “Applying context aware spell check-ing in spark nlp,” 2020, https://medium.com/spark-nlp/
applying-context-aware-spell-checking-in-spark-nlp-3c29c46963bc, Online;Last accessed on 2022-12-31.
[17] Olah, “Understanding lstm networks,” 2015, http://colah.github.io/posts/2015-08-Understanding-LSTMs/, Online;Last accessed on 2022-12-31.
[18] S. Hochreiter and J. Schmidhuber, “Long short-term memory,” Neural computation, vol. 9, no. 8, pp. 1735–1780, 1997.
[19] T. Fischer and C. Krauss, “Deep learning with long short-term memory networks for financial market predictions,” European journal of operational research, vol. 270, no. 2, pp. 654–669, 2018.
[20] G. Deza, C. Rowat, and N. Papernot, “On the robustness of sentiment analysis for stock price forecasting,” ICLR 2021 Conference Program Chairs, 2020.
[21] M. Roondiwala, H. Patel, and S. Varma, “Predicting stock prices using lstm,” In-ternational Journal of Science and Research (IJSR), vol. 6, no. 4, pp. 1754–1756,2017.
[22] C. W. Granger, “Investigating causal relations by econometric models and cross-spectral methods,” Econometrica: journal of the Econometric Society, pp. 424–438, 1969.
[23] J. Bollinger, Bollinger on Bollinger bands. McGraw-Hill New York, 2002.
[24] E. Nehemya, Y. Mathov, A. Shabtai, and Y. Elovici, “Taking over the stock market: Adversarial perturbations against algorithmic traders,” pp. 221–236, 2021.
全文公開日期 2028/02/22