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

Transformer Based Time-Series Forecasting for Stock

Author

Listed:
  • Shuozhe Li
  • Zachery B Schulwol
  • Risto Miikkulainen

Abstract

To the naked eye, stock prices are considered chaotic, dynamic, and unpredictable. Indeed, it is one of the most difficult forecasting tasks that hundreds of millions of retail traders and professional traders around the world try to do every second even before the market opens. With recent advances in the development of machine learning and the amount of data the market generated over years, applying machine learning techniques such as deep learning neural networks is unavoidable. In this work, we modeled the task as a multivariate forecasting problem, instead of a naive autoregression problem. The multivariate analysis is done using the attention mechanism via applying a mutated version of the Transformer, "Stockformer", which we created.

Suggested Citation

  • Shuozhe Li & Zachery B Schulwol & Risto Miikkulainen, 2025. "Transformer Based Time-Series Forecasting for Stock," Papers 2502.09625, arXiv.org.
  • Handle: RePEc:arx:papers:2502.09625
    as

    Download full text from publisher

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

    References listed on IDEAS

    as
    1. Diks, Cees & Panchenko, Valentyn, 2006. "A new statistic and practical guidelines for nonparametric Granger causality testing," Journal of Economic Dynamics and Control, Elsevier, vol. 30(9-10), pages 1647-1669.
    2. Brock, William & Lakonishok, Josef & LeBaron, Blake, 1992. "Simple Technical Trading Rules and the Stochastic Properties of Stock Returns," Journal of Finance, American Finance Association, vol. 47(5), pages 1731-1764, December.
    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. Cagli, Efe Caglar & Taskin, Dilvin & Evrim Mandaci, Pınar, 2019. "The short- and long-run efficiency of energy, precious metals, and base metals markets: Evidence from the exponential smooth transition autoregressive models," Energy Economics, Elsevier, vol. 84(C).
    2. Plantinga, Andrew J. & Provencher, Bill, 2001. "Internal Consistency In Models Of Optimal Resource Use Under Uncertainty," 2001 Annual meeting, August 5-8, Chicago, IL 20712, American Agricultural Economics Association (New Name 2008: Agricultural and Applied Economics Association).
    3. Ismael Pérez-Franco & Agustín García-García & Juan J. Maldonado-Briegas, 2020. "Energy Transition Towards a Greener and More Competitive Economy: The Iberian Case," Sustainability, MDPI, vol. 12(8), pages 1-14, April.
    4. Vigfusson, Robert, 1997. "Switching between Chartists and Fundamentalists: A Markov Regime-Switching Approach," International Journal of Finance & Economics, John Wiley & Sons, Ltd., vol. 2(4), pages 291-305, October.
    5. Zhuo Qiao & Keith Lam, 2011. "Granger causal relations among Greater China stock markets: a nonlinear perspective," Applied Financial Economics, Taylor & Francis Journals, vol. 21(19), pages 1437-1450.
    6. Dash, Saumya Ranjan & Maitra, Debasish, 2018. "Does sentiment matter for stock returns? Evidence from Indian stock market using wavelet approach," Finance Research Letters, Elsevier, vol. 26(C), pages 32-39.
    7. ?ikolaos A. Kyriazis, 2021. "Impacts of Stock Indices, Oil, and Twitter Sentiment on Major Cryptocurrencies during the COVID-19 First Wave," Bulletin of Applied Economics, Risk Market Journals, vol. 8(2), pages 133-146.
    8. Shernaz Bodhanwala & Harsh Purohit & Nidhi Choudhary, 2020. "The Causal Dynamics in Indian Agriculture Commodity Prices and Macro-Economic Variables in the Presence of a Structural Break," Global Business Review, International Management Institute, vol. 21(1), pages 241-261, February.
    9. Ito, Akitoshi, 1999. "Profits on technical trading rules and time-varying expected returns: evidence from Pacific-Basin equity markets," Pacific-Basin Finance Journal, Elsevier, vol. 7(3-4), pages 283-330, August.
    10. Chia-Lin Chang & Jukka Ilomäki & Hannu Laurila & Michael McAleer, 2018. "Long Run Returns Predictability and Volatility with Moving Averages," Risks, MDPI, vol. 6(4), pages 1-18, September.
    11. Bell, Peter N, 2013. "New Testing Procedures to Assess Market Efficiency with Trading Rules," MPRA Paper 46701, University Library of Munich, Germany.
    12. Elena Stupnikova & Tatyana Sukhadolets, 2019. "Construction Sector Role in Gross Fixed Capital Formation: Empirical Data from Russia," Economies, MDPI, vol. 7(2), pages 1-16, May.
    13. repec:ipg:wpaper:2014-546 is not listed on IDEAS
    14. Pereira, Robert, 1999. "Forecasting Ability But No Profitability: An Empirical Evaluation of Genetic Algorithm-optimised Technical Trading Rules," MPRA Paper 9055, University Library of Munich, Germany.
    15. Bajgrowicz, Pierre & Scaillet, Olivier, 2012. "Technical trading revisited: False discoveries, persistence tests, and transaction costs," Journal of Financial Economics, Elsevier, vol. 106(3), pages 473-491.
    16. Ren, Weijie & Li, Baisong & Han, Min, 2020. "A novel Granger causality method based on HSIC-Lasso for revealing nonlinear relationship between multivariate time series," Physica A: Statistical Mechanics and its Applications, Elsevier, vol. 541(C).
    17. Liow, Kim Hiang & Huang, Yuting, 2018. "The dynamics of volatility connectedness in international real estate investment trusts," Journal of International Financial Markets, Institutions and Money, Elsevier, vol. 55(C), pages 195-210.
    18. Shi Yafeng & Tao Xiangxing & Shi Yanlong & Zhu Nenghui & Ying Tingting & Peng Xun, 2020. "Can Technical Indicators Provide Information for Future Volatility: International Evidence," Journal of Systems Science and Information, De Gruyter, vol. 8(1), pages 53-66, February.
    19. Jiang, Yonghong & Nie, He & Ruan, Weihua, 2018. "Time-varying long-term memory in Bitcoin market," Finance Research Letters, Elsevier, vol. 25(C), pages 280-284.
    20. Xiaojuan He & Dervis Kirikkaleli & Melike Torun & Zecheng Li, 2021. "Modeling Economic Risk in the QISMUT Countries: Evidence From Nonlinear Cointegration Tests," SAGE Open, , vol. 11(4), pages 21582440211, October.
    21. Ghada A. Altarawneh & Ahmad B. Hassanat & Ahmad S. Tarawneh & Ahmad Abadleh & Malek Alrashidi & Mansoor Alghamdi, 2022. "Stock Price Forecasting for Jordan Insurance Companies Amid the COVID-19 Pandemic Utilizing Off-the-Shelf Technical Analysis Methods," Economies, MDPI, vol. 10(2), pages 1-18, February.

    More about this item

    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:2502.09625. 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.