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

Short-Term Stock Price Forecasting using exogenous variables and Machine Learning Algorithms

Author

Listed:
  • Albert Wong
  • Steven Whang
  • Emilio Sagre
  • Niha Sachin
  • Gustavo Dutra
  • Yew-Wei Lim
  • Gaetan Hains
  • Youry Khmelevsky
  • Frank Zhang

Abstract

Creating accurate predictions in the stock market has always been a significant challenge in finance. With the rise of machine learning as the next level in the forecasting area, this research paper compares four machine learning models and their accuracy in forecasting three well-known stocks traded in the NYSE in the short term from March 2020 to May 2022. We deploy, develop, and tune XGBoost, Random Forest, Multi-layer Perceptron, and Support Vector Regression models. We report the models that produce the highest accuracies from our evaluation metrics: RMSE, MAPE, MTT, and MPE. Using a training data set of 240 trading days, we find that XGBoost gives the highest accuracy despite running longer (up to 10 seconds). Results from this study may improve by further tuning the individual parameters or introducing more exogenous variables.

Suggested Citation

  • Albert Wong & Steven Whang & Emilio Sagre & Niha Sachin & Gustavo Dutra & Yew-Wei Lim & Gaetan Hains & Youry Khmelevsky & Frank Zhang, 2023. "Short-Term Stock Price Forecasting using exogenous variables and Machine Learning Algorithms," Papers 2309.00618, arXiv.org.
  • Handle: RePEc:arx:papers:2309.00618
    as

    Download full text from publisher

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

    References listed on IDEAS

    as
    1. Apergis, Nicholas & Miller, Stephen M., 2009. "Do structural oil-market shocks affect stock prices?," Energy Economics, Elsevier, vol. 31(4), pages 569-575, July.
    2. Akoum, Ibrahim & Graham, Michael & Kivihaho, Jarno & Nikkinen, Jussi & Omran, Mohammed, 2012. "Co-movement of oil and stock prices in the GCC region: A wavelet analysis," The Quarterly Review of Economics and Finance, Elsevier, vol. 52(4), pages 385-394.
    3. Narayan, Paresh Kumar & Narayan, Seema, 2010. "Modelling the impact of oil prices on Vietnam's stock prices," Applied Energy, Elsevier, vol. 87(1), pages 356-361, January.
    4. Kwan, Simon H., 1996. "Firm-specific information and the correlation between individual stocks and bonds," Journal of Financial Economics, Elsevier, vol. 40(1), pages 63-80, January.
    5. Alireza Namdari & Tariq S. Durrani, 2021. "A Multilayer Feedforward Perceptron Model in Neural Networks for Predicting Stock Market Short-term Trends," SN Operations Research Forum, Springer, vol. 2(3), pages 1-30, September.
    6. Srinivasan P., 2014. "Gold Price, Stock Price and Exchange rate Nexus: The Case of India," Romanian Economic Journal, Department of International Business and Economics from the Academy of Economic Studies Bucharest, vol. 17(52), pages 77-94, June.
    7. Kim, Sangbae & In, Francis, 2007. "On the relationship between changes in stock prices and bond yields in the G7 countries: Wavelet analysis," Journal of International Financial Markets, Institutions and Money, Elsevier, vol. 17(2), pages 167-179, April.
    8. Engsted, Tom & Tanggaard, Carsten, 2001. "The Danish stock and bond markets: comovement, return predictability and variance decomposition," Journal of Empirical Finance, Elsevier, vol. 8(3), pages 243-271, July.
    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. Ahmad Alrazni Alshammari, Basheer Altarturi, Buerhan Saiti, Latifah Munassar, 2020. "The impact of exchange rate, oil price and gold price on the Kuwaiti stock market: a wavelet analysis," European Journal of Comparative Economics, Cattaneo University (LIUC), vol. 17(1), pages 31-54, June.
    2. Madaleno, Mara & Pinho, Carlos, 2014. "Wavelet dynamics for oil-stock world interactions," Energy Economics, Elsevier, vol. 45(C), pages 120-133.
    3. Balcilar, Mehmet & Demirer, Rıza & Hammoudeh, Shawkat, 2019. "Quantile relationship between oil and stock returns: Evidence from emerging and frontier stock markets," Energy Policy, Elsevier, vol. 134(C).
    4. Ahmed, Walid M.A., 2017. "On the dynamic interactions between energy and stock markets under structural shifts: Evidence from Egypt," Research in International Business and Finance, Elsevier, vol. 42(C), pages 61-74.
    5. Jesus Cuauhtemoc Tellez Gaytan & Aqila Rafiuddin & Gyanendra Singh Sisodia & Gouher Ahmed & CH Paramaiah, 2023. "Pass-through Effects of Oil Prices on LATAM Emerging Stocks before and during COVID-19: An Evidence from a Wavelet -VAR Analysis," International Journal of Energy Economics and Policy, Econjournals, vol. 13(1), pages 529-543, January.
    6. Aqila Rafiuddin & Jennifer Daffodils & Jesus Cuauhtemoc Tellez Gaytan & Gyanendra Singh Sisodia, 2021. "Trend of Oil Prices, Gold, GCC Stocks Market during Covid-19 Pandemic: A Wavelet Approach," International Journal of Energy Economics and Policy, Econjournals, vol. 11(4), pages 560-572.
    7. Godil, Danish Iqbal & Sarwat, Salman & Khan, Muhammad Kamran & Ashraf, Muhammad Sajjad & Sharif, Arshian & Ozturk, Ilhan, 2022. "How the price dynamics of energy resources and precious metals interact with conventional and Islamic Stocks: Fresh insight from dynamic ARDL approach," Resources Policy, Elsevier, vol. 75(C).
    8. Chang, Bisharat Hussain & Sharif, Arshian & Aman, Ameenullah & Suki, Norazah Mohd & Salman, Asma & Khan, Syed Abdul Rehman, 2020. "The asymmetric effects of oil price on sectoral Islamic stocks: New evidence from quantile-on-quantile regression approach," Resources Policy, Elsevier, vol. 65(C).
    9. Dagher, Leila & El Hariri, Sadika, 2013. "The impact of global oil price shocks on the Lebanese stock market," Energy, Elsevier, vol. 63(C), pages 366-374.
    10. Nsisong Patrick Ekong & Daniel Wilson Ebong, 2016. "On the Crude Oil Price, Stock Market Movement and Economic Growth Nexus in Nigeria Evidence from Cointegration and Var Analysis," Asian Journal of Economic Modelling, Asian Economic and Social Society, vol. 4(3), pages 112-123, September.
    11. Zhang, Hao & Cai, Guixin & Yang, Dongxiao, 2020. "The impact of oil price shocks on clean energy stocks: Fresh evidence from multi-scale perspective," Energy, Elsevier, vol. 196(C).
    12. Jammazi, Rania, 2012. "Oil shock transmission to stock market returns: Wavelet-multivariate Markov switching GARCH approach," Energy, Elsevier, vol. 37(1), pages 430-454.
    13. Jiranyakul, Komain, 2014. "Does oil price uncertainty transmit to the Thai stock market?," MPRA Paper 57262, University Library of Munich, Germany.
    14. Ali, Mohsin & Masih, Mansur, 2014. "Does Indian Stock Market Provide Diversification Benefits Against Oil Price Shocks? A Sectoral Analysis," MPRA Paper 58828, University Library of Munich, Germany.
    15. Swaray, Raymond & Salisu, Afees A., 2018. "A firm-level analysis of the upstream-downstream dichotomy in the oil-stock nexus," Global Finance Journal, Elsevier, vol. 37(C), pages 199-218.
    16. Ftiti, Zied & Guesmi, Khaled & Abid, Ilyes, 2016. "Oil price and stock market co-movement: What can we learn from time-scale approaches?," International Review of Financial Analysis, Elsevier, vol. 46(C), pages 266-280.
    17. Md Fouad Bin Amin & Mohd Ziaur Rehman, 2022. "Asymmetric Linkages of Oil Prices, Money Supply, and TASI on Sectoral Stock Prices in Saudi Arabia: A Non-Linear ARDL Approach," SAGE Open, , vol. 12(1), pages 21582440211, January.
    18. Cheema, Muhammad A. & Scrimgeour, Frank, 2019. "Oil prices and stock market anomalies," Energy Economics, Elsevier, vol. 83(C), pages 578-587.
    19. Sheevun Di O. Guliman, 2015. "Oil Prices and Stock Market: A Philippine Perspective," Business and Economic Research, Macrothink Institute, vol. 5(2), pages 122-135, December.
    20. Mushtaq Hussain Khan & Junaid Ahmed & Mazhar Mughal & Imtiaz Hussain Khan, 2023. "Oil price volatility and stock returns: Evidence from three oil‐price wars," International Journal of Finance & Economics, John Wiley & Sons, Ltd., vol. 28(3), pages 3162-3182, July.

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