Data Science in Finance and Economics (May 2022)

An investment strategy based on the first derivative of the moving averages difference with parameters adapted by machine learning

  • Antoni Wilinski ,
  • Mateusz Sochanowski,
  • Wojciech Nowicki

DOI
https://doi.org/10.3934/DSFE.2022005
Journal volume & issue
Vol. 2, no. 2
pp. 96 – 116

Abstract

Read online

The article presents a certain investment strategy based on the difference between two moving averages, modified to allow the extraction of patterns. The strategy concept dropped the traditionally considered intersections of two averages and opening positions just after those intersections. Based on the observation of changes happening in the moving averages difference, it has been noticed that for some values of this difference and some values of additional strategy parameters, an interesting pattern appears that allows short-term prediction. These patterns also depended on the first derivative of the moving averages difference and the location of the current price relative to certain thresholds of the difference. Therefore, the strategy uses five parameters, including Stop Loss, adapted to the properties of the time series through machine learning. The importance of machine learning is highlighted by comparing simulation results with and without it. The strategy effectiveness was tested in the Matlab environment on the time series of the WIG20 (primary index of the Warsaw Stock Exchange) historical data. Satisfactory results were obtained considered in terms of minimizing investment risk measured by the Calmar indicator.

Keywords