# Neural Networks in Narrow Stock Markets

^{*}

## Abstract

**:**

## 1. Introduction and Related Work

#### 1.1. Neural Networks

#### 1.2. Stale Prices and Data Availability

## 2. Methods

#### 2.1. Training Algorithms

#### 2.1.1. Quasi Newton

#### 2.1.2. Conjugate Gradient

#### 2.1.3. Gradient Descent

#### 2.1.4. Other Methods

## 3. Results

#### 3.1. Training Algorithm

#### 3.2. Indexes

## 4. Discussion

## 5. Conclusions

## Author Contributions

## Funding

## Conflicts of Interest

## Appendix A

**Figure A1.**Forecasting accuracy comparison of different moving averages using the quasi Newton (BFG) training algorithm (99% confidence interval).

**Figure A2.**Forecasting accuracy comparison of different moving averages using the conjugate gradient (with restarts) training algorithm (99% confidence interval).

**Figure A3.**Forecasting accuracy comparison of different moving averages using the conjugate gradient Fetcher Powell training algorithm (99% confidence interval).

**Figure A4.**Forecasting accuracy comparison of different moving averages using the conjugate gradient Polak Ribiere training algorithm (99% confidence interval).

**Figure A5.**Forecasting accuracy comparison of different moving averages using the gradient descent (adaptive learning) training algorithm (99% confidence interval).

**Figure A6.**Forecasting accuracy comparison of different moving averages using the gradient descent (momentum) training algorithm (99% confidence interval).

**Figure A7.**Forecasting accuracy comparison of different moving averages using the gradient descent (momentum and adaptive learning) training algorithm (99% confidence interval).

**Figure A8.**Forecasting accuracy comparison of different moving averages using the Levenberg Marquardt training algorithm (99% confidence interval).

**Figure A9.**Forecasting accuracy comparison of different moving averages using the resilient backpropagation training algorithm (99% confidence interval).

## Appendix B

**Figure A10.**Results using conjugate gradient (with restarts) training per country, 99% confidence interval, using the 50, 100 and 200 days moving average.

**Figure A11.**Results using conjugate gradient Fetcher Powell training per country, 99% confidence interval, using the 50, 100 and 200 days moving average.

**Figure A12.**Results using gradient descent (adaptive learning) training per country, 99% confidence interval, using the 50, 100 and 200 days moving average.

**Figure A13.**Results using gradient descent (momentum) training per country, 99% confidence interval, using the 50, 100 and 200 days moving average.

**Figure A14.**Results using Levenberg Marquardt training per country, 99% confidence interval, using the 50, 100 and 200 days moving average.

**Figure A16.**Results using resilient backpropagation training per country, 99% confidence interval, using the 50, 100 and 200 days moving average.

**Figure A17.**Results using Polak Ribiere training per country, 99% confidence interval, using the 50, 100 and 200 days moving average.

**Figure A18.**Results using gradient descent with momentum and adaptive learning training per country, 99% confidence interval, using the 50, 100 and 200 days moving average.

## References

- Whang, J.; Wang, J.; Zhang, Z.; Guo, S. Forecasting stock indices with back propagation neural network. Expert Syst. Appl.
**2011**, 38, 14346–14355. [Google Scholar] [CrossRef] - Zhang, G.; Patuwo, B.; Hu, N. Forecasting with artificial neural networks: The state of the art. Int. J. Forecast.
**1998**, 14, 35–62. [Google Scholar] [CrossRef] - Zhang, L.; Suganthan, P. A Survey of randomized algorithms for training neural networks. Inf. Sci.
**2016**, 364, 146–155. [Google Scholar] [CrossRef] - Cao, W.; Wang, X.; Ming, Z.; Gao, J. A review on neural networks with random weights. Neurocomputing
**2018**, 275, 278–287. [Google Scholar] [CrossRef] - Zoicas-lenciu, A. The sensitivity of moving average trading rules performance with respect to methodological assumptions. Procedia Econ. Financ.
**2015**, 32, 1353–1361. [Google Scholar] [CrossRef] [Green Version] - Johnston, F.; Boyland, J.; Meadows, M.; Shale, E. Some properties of a simple moving average when applied to forecasting a time series. J. Oper. Res. Soc.
**1999**, 50, 758–766. [Google Scholar] [CrossRef] - Gencay, R.; Stengos, T. Moving average rules, volume and the predictability of security returns with feedforward networks. J. Forecast.
**1999**, 50, 758–766. [Google Scholar] [CrossRef] - Larson, M. Moving Average Convergence/Divergence (MACD); Wiley: New York, NY, USA, 2007. [Google Scholar]
- Raudys, A.; Lenciasuskas, V.; Malcius, E. Moving averages for financial data smoothing. Information and Software Technologies. In Communications in Computer and Information Science, Proceedings of the ICIST 2013; Springer: Berlin/Heidelberg, Germany, 2013; Volume 403, pp. 34–45. [Google Scholar] [CrossRef]
- Granger, C. Forecasting stock market prices: Lessons for forecasters. Int. J. Forecast.
**1992**, 8, 3–13. [Google Scholar] [CrossRef] - Shively, P. The nonlinear dynamics of stock prices. Q. Rev. Econ. Financ.
**2003**, 43, 505–517. [Google Scholar] [CrossRef] - Wang, J.; Wang, J.; Zhang, Z.; Guo, S. Stock index forecasting based on a hybrid model. Omega
**2012**, 40, 758–766. [Google Scholar] [CrossRef] - Barnes, P. Thin trading and stock market efficiency: The case of the Kuala Lumpur Stock Exchange. J. Bus. Financ. Account.
**1986**, 13, 609–623. [Google Scholar] [CrossRef] - Bruand, M.; Gibson-Asner, R. The effects of newly listed derivatives in a thin stock market. Rev. Deriv. Res.
**1998**, 2, 58–86. [Google Scholar] [CrossRef] - Ilkka, V.; Paavo, Y. Forecasting stock market prices in a thin security market. Omega
**1987**, 15, 145–155. [Google Scholar] - Fama, E. Efficient Capital Markets: II. J. Financ.
**1991**, 46, 1575–1617. [Google Scholar] [CrossRef] - Idowu, P.; Osakwe, C.; Kayode, A. Prediction of stock market in Nigeria using artificial neural network. Int. J. Intell. Syst. Technol. Appl.
**2012**, 4, 68–74. [Google Scholar] [CrossRef] [Green Version] - Senol, D.; Ozturan, M. Stock price direction prediction using artificial neural network approach: The case of Turkey. J. Artif. Intell.
**2008**, 2, 70–77. [Google Scholar] [CrossRef] [Green Version] - Samarawickrama, A.; Fernando, T. A recurrent neural network approach in predicting daily stock price an application to the Sri Lankan stock market. In Proceedings of the 2017 IEEE International Conference on Industrial and Information Systems (ICISS), Peradeniya, Sri Lanka, 15–16 December 2017. [Google Scholar]
- Apostolos, A.; Refenes, N. Stock performing modeling using neural networks: A comparative study with a regression model. Neural Netw.
**1994**, 7, 375–388. [Google Scholar] [CrossRef] - Ballings, M.; Poel, D.; Hespeels, N.; Grip, R. Evaluating multiple classifiers for stock price direction prediction. Expert Syst. Appl.
**2015**, 20, 7046–7056. [Google Scholar] [CrossRef] - Kanas, A. Neural network linear forecast for stock returns. Int. J. Financ. Econ.
**2011**, 6, 245–254. [Google Scholar] [CrossRef] - Lahmiri, S. Intraday stock price forecasting based on variational mode decomposition. J. Comput. Sci.
**2016**, 12, 23–27. [Google Scholar] [CrossRef] - Li, Y.; Li, X.; Wang, H. Based on multiple scales forecasting stock prices with a hybrid forecasting system. American J. Ind. Bus. Manag.
**2016**, 6, 1102–1112. [Google Scholar] [CrossRef] [Green Version] - Tong-seng, Q.; Srinivasan, B. Improving returns on stock investment through neural network selection. Expert Syst. Appl.
**1999**, 17, 295–301. [Google Scholar] [CrossRef] - Guresen, E.; Kayakutlu, G.; Dalm, T. Using artificial neural network models in stock market index prediction. Expert Syst. Appl.
**2011**, 38, 10389–10397. [Google Scholar] [CrossRef] - Moghaddam, A.; Moghaddam, M.; Esfandyari, M. Stock market index prediction using artificial neural networks. J. Econ. Financ. Adm. Sci.
**2016**, 21, 89–93. [Google Scholar] [CrossRef] [Green Version] - Mingyue, Q.; Yu, S. Predicting the direction of stock market index movements using an optimized artificial neural network model. PLoS ONE
**2016**, 11, e0155133. [Google Scholar] [CrossRef] [Green Version] - Mohamed, M. Forecasting stock exchange movements using neural networks: Empirical evidence from Kuawit. Expert Syst. Appl.
**2010**, 37, 6302–6309. [Google Scholar] [CrossRef] - Matlab. Available online: https://www.mathworks.com (accessed on 4 April 2000).
- Dennis, J.; Schnabel, R.B. Numerical Methods in Unconstrained Optimization and Nonlinear Equations; SIAM: Philadelphia, PA, USA, 1996. [Google Scholar] [CrossRef]
- Al-Baali, M. On the Fletcher-Reeves method. IMA J. Numer. Anal.
**1984**, 5, 121–124. [Google Scholar] [CrossRef] - Khoda, K.; Storey, C. Generalized Polak Ribiere algorithm. J. Optim. Theory Appl.
**1992**, 75, 345–354. [Google Scholar] [CrossRef] - Zhang, L.; Zhou, W.; Dong-Hui, L. A descent modified Polak-Ribiere-Polyak conjugate gradient method and its global convergence. IMA J. Numer. Anal.
**2006**, 26, 629–640. [Google Scholar] [CrossRef] - Powel, M. Restart procedures for the conjugate gradient model. Math. Program.
**1977**, 12, 241–254. [Google Scholar] [CrossRef] - Battiti, R. First and second order methods for learning: Between steepest descent and newton’s method. Neural Comput.
**1992**, 4, 141–166. [Google Scholar] [CrossRef]

**Figure 4.**Results for CAC index (France) using the 100-day moving average (MA) and quasi Newton (BFG) training algorithm. After a certain point, around 30 neurons, the forecasting accuracy, measured as the R-squared of the regression between the actual and forecasted values, decreases as the number of neurons increases.

**Figure 5.**Forecasting accuracy comparison of different moving averages using the Secant training algorithm (OSS). After a certain number of neurons, and regardless of the index analyzed, the forecasting accuracy of the algorithms decreases when additional neurons are added.

Indexes | Countries | Abbreviation |
---|---|---|

Very deep market | ||

Dow Jones Industrial Average | U.S. | DJ |

Deep markets | ||

FTSE 100 Index | U.K. | FTSE |

Deustche Bourse DAX | Germany | DAX |

CAC 40 Index | France | CAC |

Moderately narrow market | ||

IBEX 35 | Spain | IBEX |

CSI 300 | China | CSI |

OMX Riga (RIGSE) | Latvia | RIGSE |

Narrow markets | ||

Tunisia Stock Exchange Index (Tusise) | Tunisia | Tusise |

FTSE Namibia | Namibia | Namibia |

Tanzania All Share Index | Tanzania | Tanzania |

Abbreviation | Algorithm |
---|---|

BFG | Quasi Newton training algorithm |

CGB | Conjugate Gradient (with restarts) |

CGF | Conjugate Gradient Fetcher Powell |

CGP | Conjugate Gradient Polak Ribiere |

DA | Gradient Descent (adaptive learning) |

DM | Gradient Descent (momentum) |

DX | Gradient Descent (momentum and adaptive learning) |

LM | Levenberg Marquardt |

RP | Resilient backpropagation |

OSS | Secant training algorithm |

© 2020 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Alfonso, G.; Ramirez, D.R.
Neural Networks in Narrow Stock Markets. *Symmetry* **2020**, *12*, 1272.
https://doi.org/10.3390/sym12081272

**AMA Style**

Alfonso G, Ramirez DR.
Neural Networks in Narrow Stock Markets. *Symmetry*. 2020; 12(8):1272.
https://doi.org/10.3390/sym12081272

**Chicago/Turabian Style**

Alfonso, Gerardo, and Daniel R. Ramirez.
2020. "Neural Networks in Narrow Stock Markets" *Symmetry* 12, no. 8: 1272.
https://doi.org/10.3390/sym12081272