Skip to main content

Development of Artificial Intelligence Algorithm Trading Systems

  • Chapter
  • First Online:
Automation of Trading Machine for Traders

Abstract

With easier fund management due to computational trading algorithms, which can learn from multiple sources of information, technical trading rules evolved to include artificial intelligence machine learning method using variants of neural networks. Backpropagation neural network outperforms common technical analysis indicators and traditional statistical models. Neural networks are used in machine learning by inputting past historical price data and technical indicators to predict the next output. The training is performed to achieve the lowest mean error between the predicted output and the target which is the actual close. This chapter applies a neural network enhanced technical indicator (N-CAMA′) to crude light oil futures (CLOF) which experienced high volatility in recent years.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 49.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Hardcover Book
USD 64.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  • Andrada-Felix, J., & Fernandex-Rodriguez, F. (2008). Improving moving average trading rules with boosting and statistical learning methods. Journal of Forecasting, 27, 433–449.

    Article  Google Scholar 

  • Atsalakis, G. S., & Valavanis, K. P. (2009). Surveying stock market forecasting techniques—Part II: Soft computing methods. Expert Systems with Applications, 36(3), 5932–5941.

    Article  Google Scholar 

  • Bahrammirzaee, A. (2010). A comparative survey of artificial intelligence applications in finance: Artificial neural networks, expert system and hybrid intelligent systems. Neural Computing and Applications, 19(8), 1165–1195.

    Article  Google Scholar 

  • Brock, W., Lakonishok, J., & LeBaron, B. (1992, December). Simple technical trading rules and the stochastic properties of stock returns. Journal of Finance, 47(5), 1731–1764.

    Google Scholar 

  • Cevik, S., & Sedik, T. (2011). A barrel of oil or a bottle of wine: How do global growth dynamics affect commodity prices? (Working Paper 11/01). Washington, DC: International Monetary Fund.

    Google Scholar 

  • Chan, J. (2005, March/April). Using time series volatilities to trade trends: Trading technique—BBZ. Australian Technical Analysts Association Journal, 31–38.

    Google Scholar 

  • Chan, J. (2006, March). Trading trends with the Bollinger bands Z-Test. Technical Analysis of Stocks & Commodities, 24(3), 46–52.

    Google Scholar 

  • Chan Phooi M’ng, J., & Mehralizadeh, M. (2016). Forecasting East Asian indices futures via a novel hybrid of wavelet-PCA denoising and artificial neural network models. PLOS One, 11(6), e0156338.

    Google Scholar 

  • Chan Phooi M’ng, J. (2018). Dynamically adjustable moving average (AMA′) technical analysis indicator to forecast Asian Tigers’ futures markets. Physica A: Statistical Mechanics and Its Applications, 509, 336–345.

    Article  Google Scholar 

  • Fernández-Pérez, A., Fernández-Rodríguez, F., & Sosvilla-Rivero, S. (2012). Detecting trends in the foreign exchange markets. Applied Economics Letters, 19(5), 493–503.

    Google Scholar 

  • Fernandez-Rodrıguez, F., Gonzalez-Martel, C., & Sosvilla-Rivero, S. (2000). On the profitability of technical trading rules based on artificial neural networks: Evidence from the Madrid stock market. Economic Letters, 69(1), 89–94.

    Google Scholar 

  • Kaastra, I., & Boyd, M. (1996). Designing a neural network for forecasting financial and economic time series. Neurocomputing, 10(3), 215–236.

    Article  Google Scholar 

  • Lukac, L., Brorsen, B., & Irwin, S. (1988). Similarity of computer guided technical trading systems. Journal of Futures Markets, 8, 1–13, 64.

    Google Scholar 

  • Olson, D. (2004). Have trading rule profits in the currency markets declined over time? Journal of Banking & Finance, 28, 85–105.

    Article  Google Scholar 

  • Siegelmann, H. T., Horne, B. G., & Giles, C. L. (1997). Computational capabilities of recurrent NARX neural networks. IEEE Transactions on Systems, Man, and Cybernetics, Part B: Cybernetics, 27(2), 208–215.

    Article  Google Scholar 

  • Yao, J., Chew, L. T., & Poh, H.-L. (1999). Neural networks for technical analysis: A study on KLCI. International Journal of Theoretical and Applied Finance, 2(2), 221–241.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Jacinta Chan .

Appendix

Appendix

In this study, MATLAB’s “narxnet” NARNNX is used to establish a one-step-ahead prediction model. The NARNNX model is built on the linear ARX method, which is generally applied in time series modeling.

The fundamental equation for the NARX model is:

$$\hat{c}_{t + 1} = f\left( {C_{t,} C_{t - 1} , \ldots ,C_{t - d,} {\text{AMA}}_{t,} {\text{AMA}}_{t - 1} , \, \ldots ,{\text{AMA}}_{t - d} } \right)$$
(5.3)

where the obtained value of the dependent output signal ĉt+1 is regressed on d former values of the target signal Ct and d previous values of exogenous (independent) input signals AMAt. NARNNX model by applying a FBNN to estimate the function f. Moreover, weights and biases in an FBNN will be adjusted continuously to minimize the error term between output ĉt+1 and target Ct to achieve the lowest mean of the error terms.

The architecture of a NARX network includes the number of hidden layers, the number of delays (the number of past data of that network that account for training), and portions of training, validation, and testing. NARX networks divide the data into three subsets: training set, validation set, and testing set, which sets will be spread randomly along the time series, with a configured percentage for each of them; in this study, the proportions are training 75%, validation 15%, and testing 15%.

In this experiment, the close and AMA′ are processed as inputs. Using 10 neurons, 2 delays, 1 hidden layer, and Levenberg-Marquardt optimization, 2000–2014 data is used for training. The output is then used as the predicted close for the next day.

The training period is from 2 January 2000 to 31 December 2014 while the validation period is from 2 January 2015 to 31 December 2017 and the out-of-sample period is from 2 January 2018 to 31 December 2018. The method used is similar to the approach used by Yao et al. (1999) which is to long the futures when the predicted output is higher than the current close and to short otherwise.

We ran tests from one to 15 neurons. Interestingly, 10-neurons ANN model is selected in accordance with the earlier tests to employ the model with the least NMSE.

Although the best architecture to apply depends on the type of the problem to be solved by the network, there is no rule of thumb to select the number of hidden layers and delays (Kaastra & Boyd, 1996). In this study, Levenberg-Marquardt optimization is used as the training algorithm, which is a built-in.

The objective of this exercise is to determine whether the abnormal return from utilizing the forecast of next period’s price is significantly higher than the passive buy-and-hold control. If ĉt+1 > Ct, where, ĉt+1 is the predicted closing price output for the next period, and Ct is the current closing price, the trading strategy is to buy, and if otherwise, the strategy is to sell.

The results of the prediction accuracy shown in hit rate and the profitability performance will be evaluated.

Rights and permissions

Reprints and permissions

Copyright information

© 2019 The Author(s)

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

Cite this chapter

Chan, J. (2019). Development of Artificial Intelligence Algorithm Trading Systems. In: Automation of Trading Machine for Traders. Palgrave Pivot, Singapore. https://doi.org/10.1007/978-981-13-9945-9_5

Download citation

  • DOI: https://doi.org/10.1007/978-981-13-9945-9_5

  • Published:

  • Publisher Name: Palgrave Pivot, Singapore

  • Print ISBN: 978-981-13-9944-2

  • Online ISBN: 978-981-13-9945-9

  • eBook Packages: Economics and FinanceEconomics and Finance (R0)

Publish with us

Policies and ethics