Hostname: page-component-78c5997874-fbnjt Total loading time: 0 Render date: 2024-11-15T16:05:04.349Z Has data issue: false hasContentIssue false

Machine Learning and the Stock Market

Published online by Cambridge University Press:  11 October 2022

Jonathan Brogaard*
Affiliation:
University of Utah David Eccles School of Business
Abalfazl Zareei
Affiliation:
Stockholm University Stockholm Business School abalfazl.zareei@sbs.su.se
*
brogaardj@eccles.utah.edu (corresponding author)
Rights & Permissions [Opens in a new window]

Abstract

Core share and HTML view are not available for this content. However, as you have access to this content, a full PDF is available via the ‘Save PDF’ action button.

Practitioners allocate substantial resources to technical analysis whereas academic theories of market efficiency rule out technical trading profitability. We study this long-standing puzzle by applying a diverse set of machine learning algorithms. The results show that an investor can find profitable technical trading rules using past prices, and that this out-of-sample profitability decreases through time, showing that markets have become more efficient over time. In addition, we find that the evolutionary genetic algorithm’s attitude in not shying away from erroneous predictions gives it an edge in building profitable strategies compared to the strict loss-minimization-focused machine learning algorithms.

Type
Research Article
Copyright
© The Author(s), 2022. Published by Cambridge University Press on behalf of the Michael G. Foster School of Business, University of Washington

Footnotes

We thank Deniz Anginer (discussant), Björn Hagströmer, Juhani T. Linnainmaa, Federico Maglione (discussant), Jose Marin, Lars Nordén, Walter Pohl (discussant), Alberto Rossi (the referee), and Pedro Serrano, as well as seminar participants at the Stockholm Business School, 2017 Paris Financial Management Conference, 2018 NFN Young Scholar, 2019 Wolfe Global Quantitative and Macro Investing Conference London, 2020 Paris December Finance Meeting, Man Investments Inc., Menta Capital, and Lynx Asset Management. Zareei is a visiting research fellow at the Swedish House of Finance. He gratefully acknowledges the research funding from the Jan Wallander Foundation, Tom Hedelius Foundation, the Browaldh Foundation, and the Swedish House of Finance.

References

Allen, F., and Karjalainen, R.. “Using Genetic Algorithms to Find Technical Trading Rules.” Journal of Financial Economics, 51 (1999), 245271.CrossRefGoogle Scholar
Bajgrowicz, P., and Scaillet, O.. “Technical Trading Revisited: False Discoveries, Persistence Tests, and Transaction Costs.” Journal of Financial Economics, 106 (2012), 473491.CrossRefGoogle Scholar
Balduzzi, P., and Lynch, A. W.. “Transaction Costs and Predictability: Some Utility Cost Calculations.” Journal of Financial Economics, 52 (1999), 4778.CrossRefGoogle Scholar
Bessembinder, H., and Chan, K.. “Market Efficiency and the Returns to Technical Analysis.” Financial Management, 27 (1998), 517.CrossRefGoogle Scholar
Blume, L.; Easley, D.; and O’Hara, M.. “Market Statistics and Technical Analysis: The Role of Volume.” Journal of Finance, 49 (1994), 153181.CrossRefGoogle Scholar
Brock, W.; Lakonishok, J.; and LeBaron, B.. “Simple Technical Trading Rules and the Stochastic Properties of Stock Returns.” Journal of Finance, 47 (1992), 17311764.CrossRefGoogle Scholar
Carhart, M. M.On Persistence in Mutual Fund Performance.” Journal of Finance, 52 (1997), 5782.CrossRefGoogle Scholar
Chen, L.; Pelger, M.; and Zhu, J.. “Deep Learning in Asset Pricing.” Working Paper, available at https://arxiv.org/abs/1904.00745 (2019).CrossRefGoogle Scholar
Chordia, T.; Subrahmanyam, A.; and Tong, Q.. “Have Capital Market Anomalies Attenuated in the Recent Era of High Liquidity and Trading Activity?Journal of Accounting and Economics, 58 (2014), 4158.CrossRefGoogle Scholar
Dugast, J., and Foucault, T.. “Equilibrium Data Mining and Data Abundance.” Working Paper, available at https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3710495 (2020).CrossRefGoogle Scholar
Fama, E., and Blume, M.. “Filter Rules and Stock-Market Trading.” Journal of Business, 39 (1966), 226241.CrossRefGoogle Scholar
Fama, E. F., and French, K. R.. “Common Risk Factors in the Returns on Stocks and Bonds.” Journal of Financial Economics, 33 (1993), 356.CrossRefGoogle Scholar
Fama, E. F., and French, K. R.A Five-Factor Asset Pricing Model.” Journal of Financial Economics, 116 (2015), 122.CrossRefGoogle Scholar
Grundy, B. D., and McNichols, M.. “Trade and the Revelation of Information Through Prices and Direct Disclosure.” Review of Financial Studies, 2 (1989), 495526.CrossRefGoogle Scholar
Gu, S.; Kelly, B.; and Xiu, D.. “Empirical Asset Pricing via Machine Learning.” Review of Financial Studies, 33 (2020), 22232273.CrossRefGoogle Scholar
Han, Y.Asset Allocation with a High Dimensional Latent Factor Stochastic Volatility Model.” Review of Financial Studies, 19 (2006), 237271.CrossRefGoogle Scholar
Han, Y.; Yang, K.; and Zhou, G.. “A New Anomaly: The Cross-Sectional Profitability of Technical Analysis.” Journal of Financial and Quantitative Analysis, 48 (2013), 14331461.CrossRefGoogle Scholar
Han, Y.; Zhou, G.; and Zhu, Y.. “A Trend Factor: Any Economic Gains from Using Information over Investment Horizons?Journal of Financial Economics, 122 (2016), 352375.CrossRefGoogle Scholar
Harvey, C. R.Presidential address: The Scientific Outlook in Financial Economics.” Journal of Finance, 72 (2017), 13991440.CrossRefGoogle Scholar
Harvey, C. R.; Liu, Y.; and Zhu, H.. “… and the Cross-Section of Expected Returns.” Review of Financial Studies, 29 (2016), 568.CrossRefGoogle Scholar
Holland, J. H.Outline for a Logical Theory of Adaptive Systems.” Journal of the ACM, 9 (1962), 297314.CrossRefGoogle Scholar
Holland, J. H. Adaptation in Natural and Artificial Systems. Ann Arbor: University of Michigan Press (1975).Google Scholar
Jegadeesh, N., and Titman, S.. “Returns to Buying Winners and Selling Losers: Implications for Stock Market Efficiency.” Journal of Finance, 48 (1993), 6591.CrossRefGoogle Scholar
Jones, C. M. “A Century of Stock Market Liquidity and Trading Costs.” Working Paper (2002).CrossRefGoogle Scholar
Kavajecz, K., and Odders-White, E.. “Technical Analysis and Liquidity Provision.” Review of Financial Studies, 17 (2004), 10431071.CrossRefGoogle Scholar
Linnainmaa, J. T., and Roberts, M. R.. “The History of the Cross Section of Stock Returns.” Review of Financial Studies, 31 (2018), 26062649.CrossRefGoogle Scholar
Lo, A. W.; Mamaysky, H.; and Wang, J.. Foundations of Technical Analysis: Computational Algorithms, Statistical Inference, and Empirical Implementation. Journal of Finance, 55 (2000), 17051765.CrossRefGoogle Scholar
Lynch, A. W., and Balduzzi, P.. “Predictability and Transaction Costs: The Impact on Rebalancing Rules and Behavior.” Journal of Finance, 55 (2000), 22852309.CrossRefGoogle Scholar
McLean, R. D., and Pontiff, J.. “Does Academic Research Destroy Stock Return Predictability?Journal of Finance, 71 (2016), 532.CrossRefGoogle Scholar
Neely, C.; Weller, P.; and Dittmar, R.. “Is Technical Analysis in the Foreign Exchange Market Profitable? A Genetic Programming Approach.” Journal of Financial and Quantitative Analysis, 32 (1997), 405426.CrossRefGoogle Scholar
Neftci, S. N.Naive Trading Rules in Financial Markets and Wiener-Kolmogorov Prediction Theory: A Study of “Technical Analysis.” Journal of Business, 64 (1991), 549571.CrossRefGoogle Scholar
Newey, W. K., and West, K. D.. “Hypothesis Testing with Efficient Method of Moments Estimation.” International Economic Review, 28 (1987), 777787.CrossRefGoogle Scholar
Nordhaus, W.The Progress of Computing.” Working Paper, Yale University (2001).Google Scholar
Potvin, J.; Soriano, P.; and Vallee, M.. “Generating Trading Rules on the Stock Markets with Genetic Programming.” Computers & Operations Research, 31 (2004), 10331047.CrossRefGoogle Scholar
Ready, M.Profits from Technical Trading Rules. Financial Management, 31 (2002), 4361.CrossRefGoogle Scholar
Rossi, A. G. “Predicting Stock Market Returns with Machine Learning.” Working Paper (2018).Google Scholar
Sadka, R., and Scherbina, A.Analyst Disagreement, Mispricing, and Liquidity.” Journal of Finance, 62 (2007), 23672403.CrossRefGoogle Scholar
Sullivan, R.; Timmermann, A.; and White, H.. “Data-Snooping, Technical Trading Rule Performance, and the Bootstrap.” Journal of Finance, 54 (1999), 16471691.CrossRefGoogle Scholar
White, H.A Reality Check for Data Snooping.” Econometrica, 68 (2000), 10971126.CrossRefGoogle Scholar
Yan, X., and Zheng, L.. “Fundamental Analysis and the Cross-Section of Stock Returns: A Data-Mining Approach.” Review of Financial Studies, 30 (2017), 13821423.CrossRefGoogle Scholar
Zhang, X. F.Information Uncertainty and Stock Returns.” Journal of Finance, 61 (2006), 105137.CrossRefGoogle Scholar