IDEAS home Printed from https://ideas.repec.org/p/arx/papers/2303.09323.html
   My bibliography  Save this paper

Stock Trend Prediction: A Semantic Segmentation Approach

Author

Listed:
  • Shima Nabiee
  • Nader Bagherzadeh

Abstract

Market financial forecasting is a trending area in deep learning. Deep learning models are capable of tackling the classic challenges in stock market data, such as its extremely complicated dynamics as well as long-term temporal correlation. To capture the temporal relationship among these time series, recurrent neural networks are employed. However, it is difficult for recurrent models to learn to keep track of long-term information. Convolutional Neural Networks have been utilized to better capture the dynamics and extract features for both short- and long-term forecasting. However, semantic segmentation and its well-designed fully convolutional networks have never been studied for time-series dense classification. We present a novel approach to predict long-term daily stock price change trends with fully 2D-convolutional encoder-decoders. We generate input frames with daily prices for a time-frame of T days. The aim is to predict future trends by pixel-wise classification of the current price frame. We propose a hierarchical CNN structure to encode multiple price frames to multiscale latent representation in parallel using Atrous Spatial Pyramid Pooling blocks and take that temporal coarse feature stacks into account in the decoding stages. Our hierarchical structure of CNNs makes it capable of capturing both long and short-term temporal relationships effectively. The effect of increasing the input time horizon via incrementing parallel encoders has been studied with interesting and substantial changes in the output segmentation masks. We achieve overall accuracy and AUC of %78.18 and 0.88 for joint trend prediction over the next 20 days, surpassing other semantic segmentation approaches. We compared our proposed model with several deep models specifically designed for technical analysis and found that for different output horizons, our proposed models outperformed other models.

Suggested Citation

  • Shima Nabiee & Nader Bagherzadeh, 2023. "Stock Trend Prediction: A Semantic Segmentation Approach," Papers 2303.09323, arXiv.org.
  • Handle: RePEc:arx:papers:2303.09323
    as

    Download full text from publisher

    File URL: http://arxiv.org/pdf/2303.09323
    File Function: Latest version
    Download Restriction: no
    ---><---

    References listed on IDEAS

    as
    1. Zhaojie Luo & Xiaojing Cai & Katsuyuki Tanaka & Tetsuya Takiguchi & Takuji Kinkyo & Shigeyuki Hamori, 2019. "Can We Forecast Daily Oil Futures Prices? Experimental Evidence from Convolutional Neural Networks," JRFM, MDPI, vol. 12(1), pages 1-13, January.
    2. Guosheng Hu & Yuxin Hu & Kai Yang & Zehao Yu & Flood Sung & Zhihong Zhang & Fei Xie & Jianguo Liu & Neil Robertson & Timothy Hospedales & Qiangwei Miemie, 2017. "Deep Stock Representation Learning: From Candlestick Charts to Investment Decisions," Papers 1709.03803, arXiv.org, revised Feb 2018.
    3. Zexin Hu & Yiqi Zhao & Matloob Khushi, 2021. "A Survey of Forex and Stock Price Prediction Using Deep Learning," Papers 2103.09750, arXiv.org.
    4. Rosdyana Mangir Irawan Kusuma & Trang-Thi Ho & Wei-Chun Kao & Yu-Yen Ou & Kai-Lung Hua, 2019. "Using Deep Learning Neural Networks and Candlestick Chart Representation to Predict Stock Market," Papers 1903.12258, arXiv.org.
    Full references (including those not matched with items on IDEAS)

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.
    1. Hongcheng Ding & Xuanze Zhao & Zixiao Jiang & Shamsul Nahar Abdullah & Deshinta Arrova Dewi, 2024. "EUR-USD Exchange Rate Forecasting Based on Information Fusion with Large Language Models and Deep Learning Methods," Papers 2408.13214, arXiv.org.
    2. MohammadAmin Fazli & Parsa Alian & Ali Owfi & Erfan Loghmani, 2021. "RPS: Portfolio Asset Selection using Graph based Representation Learning," Papers 2111.15634, arXiv.org.
    3. Aniruddha Dutta & Saket Kumar & Meheli Basu, 2020. "A Gated Recurrent Unit Approach to Bitcoin Price Prediction," JRFM, MDPI, vol. 13(2), pages 1-16, February.
    4. Jian Guo & Saizhuo Wang & Lionel M. Ni & Heung-Yeung Shum, 2022. "Quant 4.0: Engineering Quantitative Investment with Automated, Explainable and Knowledge-driven Artificial Intelligence," Papers 2301.04020, arXiv.org.
    5. Sungwoo Kang & Jong-Kook Kim, 2023. "Using a Deep Learning Model to Simulate Human Stock Trader's Methods of Chart Analysis," Papers 2304.14870, arXiv.org, revised Apr 2024.
    6. Yuze Lu & Hailong Zhang & Qiwen Guo, 2023. "Stock and market index prediction using Informer network," Papers 2305.14382, arXiv.org.
    7. Liping Wang & Jiawei Li & Lifan Zhao & Zhizhuo Kou & Xiaohan Wang & Xinyi Zhu & Hao Wang & Yanyan Shen & Lei Chen, 2023. "Methods for Acquiring and Incorporating Knowledge into Stock Price Prediction: A Survey," Papers 2308.04947, arXiv.org.
    8. Longbing Cao, 2021. "AI in Finance: Challenges, Techniques and Opportunities," Papers 2107.09051, arXiv.org.
    9. Zhiyuan Pei & Jianqi Yan & Jin Yan & Bailing Yang & Ziyuan Li & Lin Zhang & Xin Liu & Yang Zhang, 2024. "A Stock Price Prediction Approach Based on Time Series Decomposition and Multi-Scale CNN using OHLCT Images," Papers 2410.19291, arXiv.org, revised Oct 2024.
    10. Xing Wang & Yijun Wang & Bin Weng & Aleksandr Vinel, 2020. "Stock2Vec: A Hybrid Deep Learning Framework for Stock Market Prediction with Representation Learning and Temporal Convolutional Network," Papers 2010.01197, arXiv.org.
    11. Matej Steinbacher, 2023. "Predicting Stock Price Movement as an Image Classification Problem," Papers 2303.01111, arXiv.org.
    12. Abdellilah Nafia & Abdellah Yousfi & Abdellah Echaoui, 2023. "Equity-Market-Neutral Strategy Portfolio Construction Using LSTM-Based Stock Prediction and Selection: An Application to S&P500 Consumer Staples Stocks," IJFS, MDPI, vol. 11(2), pages 1-48, March.
    13. Jungsik Hwang, 2020. "Modeling Financial Time Series using LSTM with Trainable Initial Hidden States," Papers 2007.06848, arXiv.org.
    14. Tristan Lim, 2024. "Predictive crypto-asset automated market maker architecture for decentralized finance using deep reinforcement learning," Financial Innovation, Springer;Southwestern University of Finance and Economics, vol. 10(1), pages 1-29, December.
    15. Yash Thesia & Vidhey Oza & Priyank Thakkar, 2022. "A dynamic scenario‐driven technique for stock price prediction and trading," Journal of Forecasting, John Wiley & Sons, Ltd., vol. 41(3), pages 653-674, April.
    16. Opeyemi Sheu Alamu & Md Kamrul Siam, 2024. "Stock Price Prediction and Traditional Models: An Approach to Achieve Short-, Medium- and Long-Term Goals," Papers 2410.07220, arXiv.org.
    17. Adrian Millea, 2021. "Deep Reinforcement Learning for Trading—A Critical Survey," Data, MDPI, vol. 6(11), pages 1-25, November.
    18. Matteo Prata & Giuseppe Masi & Leonardo Berti & Viviana Arrigoni & Andrea Coletta & Irene Cannistraci & Svitlana Vyetrenko & Paola Velardi & Novella Bartolini, 2023. "LOB-Based Deep Learning Models for Stock Price Trend Prediction: A Benchmark Study," Papers 2308.01915, arXiv.org, revised Sep 2023.
    19. Zezheng Zhang & Matloob Khushi, 2020. "GA-MSSR: Genetic Algorithm Maximizing Sharpe and Sterling Ratio Method for RoboTrading," Papers 2008.09471, arXiv.org.
    20. Joy Dip Das & Ruppa K. Thulasiram & Christopher Henry & Aerambamoorthy Thavaneswaran, 2024. "Encoder–Decoder Based LSTM and GRU Architectures for Stocks and Cryptocurrency Prediction," JRFM, MDPI, vol. 17(5), pages 1-23, May.

    More about this item

    NEP fields

    This paper has been announced in the following NEP Reports:

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:arx:papers:2303.09323. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    If CitEc recognized a bibliographic reference but did not link an item in RePEc to it, you can help with this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: arXiv administrators (email available below). General contact details of provider: http://arxiv.org/ .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.