Linear and Nonlinear Trading Models with Gradient Boosted Random Forests and Application to Singapore Stock Market

Abstract

This paper presents new trading models for the stock market and test whether they are able to consistently generate excess returns from the Singapore Exchange (SGX). Instead of conventional ways of modeling stock prices, we construct models which relate the market indicators to a trading decision directly. Furthermore, unlike a reversal trading system or a binary system of buy and sell, we allow three modes of trades, namely, buy, sell or stand by, and the stand-by case is important as it caters to the market conditions where a model does not produce a strong signal of buy or sell. Linear trading models are firstly developed with the scoring technique which weights higher on successful indicators, as well as with the Least Squares technique which tries to match the past perfect trades with its weights. The linear models are then made adaptive by using the forgetting factor to address market changes. Because stock markets could be highly nonlinear sometimes, the Random Forest is adopted as a nonlinear trading model, and improved with Gradient Boosting to form a new technique—Gradient Boosted Random Forest. All the models are trained and evaluated on nine stocks and one index, and statistical tests such as randomness, linear and nonlinear correlations are conducted on the data to check the statistical significance of the inputs and their relation with the output before a model is trained. Our empirical results show that the proposed trading methods are able to generate excess returns compared with the buy-and-hold strategy.

Share and Cite:

Q. Qin, Q. Wang, J. Li and S. Ge, "Linear and Nonlinear Trading Models with Gradient Boosted Random Forests and Application to Singapore Stock Market," Journal of Intelligent Learning Systems and Applications, Vol. 5 No. 1, 2013, pp. 1-10. doi: 10.4236/jilsa.2013.51001.

Conflicts of Interest

The authors declare no conflicts of interest.

References

[1] R. D. Edwards, J. Magee, W. H. C. Bassetti, “Technical Analysis of Stock Trends, Chapter 1, The Technical Approach to Trading and Investing,” 9 Edition, CRC Press, Boca Raton, 2007, pp. 3-7.
[2] M. A. H. Dempster and C. M. Jones, “A Real-Time Adaptive Trading System Using Generic Programming,” Quantitative Finance, Vo. 1, No. 4, 2001, pp. 397-413. doi:10.1088/1469-7688/1/4/301
[3] P. Sutheebanjard and W. Premchaiswadi, “Stock Exchange of Thailand Index Prediction Using Back Propagation Neural Networks,” 2nd International Conference on Computer and Network Technology, Bangkok, 23-25 April 2010.
[4] V. Pacelli and M. Azzollini, “An Artificial Neural Network Approach for Credit Risk Managemet,” Journal of Intelligent Learning Systems and Applications, Vol. 3, No. 2, 2011, pp. 103-112.
[5] V. Pacelli, V. Bevilacqua and M. Azzollini, “An Artificial Neural Network Model to Forecast Exchange Rates,” Journal of Intelligent Learning Systems and Applications, Vol. 3, No. 2, 2011. pp. 57-69.
[6] V. Pacelli, “Forecasting Exchange Rates: A Comparative Analysis,” International Journal of Business and Social Science, Vol. 3, No. 10, 2012, pp. 145-156.
[7] Wikipedia. http://en.wikipedia.org/wiki/Adaptive_neuro_fuzzy_inference_system
[8] A. La Zadeh, “Outline of a New Approach to the Analysis of Complex Systems and Decision Processes,” IEEE Transactions on Systems, Man and Cybernetics, Vol. 3, No. 1, 1973, pp. 28-44. doi:10.1109/TSMC.1973.5408575
[9] S. Agrawal, M. Jindal, G. N. Pillai, “Momentum Analysis Based Stock Market Prediction Using Adaptive NeuroFuzzy Inference System (ANFIS),” Proceedings of the International Multi Conference of Engineers and Computer Scientists, Hong Kong, 17-19 March 2010.
[10] M. Ekman and M. Bengtsson, “Adaptive Rule-Based Stock Trading: A Test of the Efficient Market Hypothesis,” MS Thesis, Uppsala University, Uppsala, 2004.
[11] J. M. Anthony, N. F. Robert, L. Yang, A. W. Nathaniel, and D. B. Steven, “An Introduction to Decision Tree Modeling,” Journal of Chemometrics, Vol. 18, No. 6, 2004, pp. 275-285. doi:10.1002/cem.873
[12] L. Breiman, “Random Forests,” Machine Learning Journal, Vol. 45, No. 1, 2001, p. 532.
[13] M. Maragoudakis and D. Serpanos, “Towards Stock Market Data Mining Using Enriched Random Forests from Textual Resources and Technical Indicators,” Artificial Intelligence Applications and Innovations IFIP Advances in Information and Communication Technology, Larnaca, 6-7 October 2010, pp. 278-286
[14] S. Fong and J. Tai, “The Application of Trend Following Strategies in Stock Market Trading,” 5th International Joint Conference on INC, IMS and IDC, Seoul, 25-27 August 2009.
[15] Q.-G. Wang, J. Li, Q. Qin, S. Z. Sam Ge, “Linear, Adaptive and Nonlinear Trading Models for Singapore Stock Market with Random Forests,” Proceedings of 9th IEEE International Conference on Control and Automation, Santiago, 19-21 December 2011, pp. 726-731.
[16] J. H. Friedman, “Greedy Function Approximation: A Gradient Boosting Machine,” Technical Report, Stanford University, Stanford, 1999.
[17] J. H. Friedman, “Stochastic Gradient Boosting,” Technical Report, Stanford University, Stanford, 1999.
[18] Chart School, Stock Chart.com, 2010. http://stockcharts.com/school/doku.php?id=chart_school:technical_indicators
[19] Schoolworkout Math, “Spearman’s Rank Correlation Coefficient,” 2011. http://www.schoolworkout.co.uk/documents/s1/Spearmans%20Correlation%20Coefficient.pdf
[20] J. M. Anthony, N. F. Robert, L. Yang, A. W. Nathaniel and D. B. Steven, “An Introduction to Decision Tree Modeling,” Journal of Chemometrics, Vol. 18, No. 6, 2004, pp. 275-285. doi:10.1002/cem.873
[21] L. Breiman, “Bagging Predictors,” Machine Learning, Vol. 26, No. 2, 1996, pp. 123-140. doi:10.1007/BF00058655
[22] Wikipedia. http://en.wikipedia.org/wiki/Adaptive_neuro_fuzzy_inference_system
[23] Fees: Schedules, DBS Vikers Online, 2010. http://www.dbsvonline.com/English/Pfee.asp?SessionID=&RefNo=&AccountNum=&Alternate=&Level=Public&ResidentType=
[24] Monetary Authority of Singapore, Financial DatabaseInterest Rate of Banks and Finance Companies, 2010. https://secure.mas.gov.sg/msb/InterestRatesOfBanksAndFinanceCompanies.aspx

Copyright © 2024 by authors and Scientific Research Publishing Inc.

Creative Commons License

This work and the related PDF file are licensed under a Creative Commons Attribution 4.0 International License.