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

Predict stock prices with ARIMA and LSTM

Author

Listed:
  • Ruochen Xiao
  • Yingying Feng
  • Lei Yan
  • Yihan Ma

Abstract

MAE, MSE and RMSE performance indicators are used to analyze the performance of different stocks predicted by LSTM and ARIMA models in this paper. 50 listed company stocks from finance.yahoo.com are selected as the research object in the experiments. The dataset used in this work consists of the highest price on transaction days, corresponding to the period from 01 January 2010 to 31 December 2018. For LSTM model, the data from 01 January 2010 to 31 December 2015 are selected as the training set, the data from 01 January 2016 to 31 December 2017 as the validation set and the data from 01 January 2018 to 31 December 2018 as the test set. In term of ARIMA model, the data from 01 January 2016 to 31 December 2017 are selected as the training set, and the data from 01 January 2018 to 31 December 2018 as the test set. For both models, 60 days of data are used to predict the next day. After analysis, it is suggested that both ARIMA and LSTM models can predict stock prices, and the prediction results are generally consistent with the actual results;and LSTM has better performance in predicting stock prices(especially in expressing stock price changes), while the application of ARIMA is more convenient.

Suggested Citation

  • Ruochen Xiao & Yingying Feng & Lei Yan & Yihan Ma, 2022. "Predict stock prices with ARIMA and LSTM," Papers 2209.02407, arXiv.org.
  • Handle: RePEc:arx:papers:2209.02407
    as

    Download full text from publisher

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

    References listed on IDEAS

    as
    1. Qiang Li & Liwen Chen & Yong Zeng, 2018. "The mechanism and effectiveness of credit scoring of P2P lending platform," China Finance Review International, Emerald Group Publishing Limited, vol. 8(3), pages 256-274, May.
    2. repec:fip:fedreq:y:2011:i:3q:p:209-254:n:vol.97no.3 is not listed on IDEAS
    3. Vincenzo Quadrini, 2011. "Financial frictions in macroeconomic fluctations," Economic Quarterly, Federal Reserve Bank of Richmond, vol. 97(3Q), pages 209-254.
    4. Carlstrom, Charles T & Fuerst, Timothy S, 1997. "Agency Costs, Net Worth, and Business Fluctuations: A Computable General Equilibrium Analysis," American Economic Review, American Economic Association, vol. 87(5), pages 893-910, 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. Hans Gersbach & Jean-Charles Rochet & Martin Scheffel, 2023. "Financial Intermediation, Capital Accumulation, and Crisis Recovery," Review of Finance, European Finance Association, vol. 27(4), pages 1423-1469.
    2. Ai, Hengjie & Li, Kai & Yang, Fang, 2020. "Financial intermediation and capital reallocation," Journal of Financial Economics, Elsevier, vol. 138(3), pages 663-686.
    3. Giri, Federico & Riccetti, Luca & Russo, Alberto & Gallegati, Mauro, 2019. "Monetary policy and large crises in a financial accelerator agent-based model," Journal of Economic Behavior & Organization, Elsevier, vol. 157(C), pages 42-58.
    4. Kirchner Philipp, 2020. "On Shadow Banking and Financial Frictions in DSGE Modeling," Review of Economics, De Gruyter, vol. 71(2), pages 101-133, August.
    5. Ranjan Kumar Mohanty & N R Bhanumurthy, 2020. "Asymmetric Monetary Policy Transmission in India:Does Financial Friction Matter?," BASE University Working Papers 03/2020, BASE University, Bengaluru, India.
    6. Alberto Bucci & Simone Marsiglio, 2019. "Financial development and economic growth: long‐run equilibrium and transitional dynamics," Scottish Journal of Political Economy, Scottish Economic Society, vol. 66(3), pages 331-359, July.
    7. Inekwe, John Nkwoma & Jin, Yi & Valenzuela, Ma. Rebecca, 2018. "The effects of financial distress: Evidence from US GDP growth," Economic Modelling, Elsevier, vol. 72(C), pages 8-21.
    8. Stijn Claessens & M Ayhan Kose, 2018. "Frontiers of macrofinancial linkages," BIS Papers, Bank for International Settlements, number 95.
    9. Beck, Thorsten & Colciago, Andrea & Pfajfar, Damjan, 2014. "The role of financial intermediaries in monetary policy transmission," Journal of Economic Dynamics and Control, Elsevier, vol. 43(C), pages 1-11.
    10. Yagihashi, Takeshi, 2018. "How costly is a misspecified credit channel DSGE model in monetary policymaking?," Economic Modelling, Elsevier, vol. 68(C), pages 484-505.
    11. Yicheng Wang, 2017. "Debt-Market Friction, Firm-specific Knowledge Capital Accumulation and Macroeconomic Implications," Review of Economic Dynamics, Elsevier for the Society for Economic Dynamics, vol. 26, pages 19-39, October.
    12. Florian Gerth, 2017. "Allocative efficiency of UK firms during the Great Recession," Studies in Economics 1714, School of Economics, University of Kent.
    13. Denis Gorea & Oleksiy Kryvtsov & Tamon Takamura, 2016. "Leaning Within a Flexible Inflation-Targeting Framework: Review of Costs and Benefits," Discussion Papers 16-17, Bank of Canada.
    14. Jeanne, Olivier & Korinek, Anton, 2019. "Managing credit booms and busts: A Pigouvian taxation approach," Journal of Monetary Economics, Elsevier, vol. 107(C), pages 2-17.
    15. Lawrence Christiano & Daisuke Ikeda, 2011. "Government Policy, Credit Markets and Economic Activity," NBER Working Papers 17142, National Bureau of Economic Research, Inc.
    16. Paul Welfens, 2014. "Issues of modern macroeconomics: new post-crisis perspectives on the world economy," International Economics and Economic Policy, Springer, vol. 11(4), pages 481-527, December.
    17. Jang Ok Cho & Hyo-Youn Chu & Hyung Seok E. Kim & Jaywon Lee, 2016. "Productivity Distribution and Economic Growth," Korean Economic Review, Korean Economic Association, vol. 32, pages 23-40.
    18. Feng Dong, 2023. "Aggregate Implications of Financial Frictions for Unemployment," Review of Economic Dynamics, Elsevier for the Society for Economic Dynamics, vol. 48, pages 45-71, April.
    19. Hans Gersbach & Jean-Charles Rochet & Martin Scheffel, 2016. "Taking Banks to Solow," International Economic Association Series, in: Joseph E. Stiglitz & Martin Guzman (ed.), Contemporary Issues in Macroeconomics, chapter 13, pages 176-198, Palgrave Macmillan.
    20. Ester Faia, 2007. "Financial Differences and Business Cycle Co‐Movements in a Currency Area," Journal of Money, Credit and Banking, Blackwell Publishing, vol. 39(1), pages 151-185, February.

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