A Novel Approach to the Moving Average Distance and Isolation Forest Method for Forecasting Financial Time Series Data
Agus Sihabuddin *
Department of Computer Science and Electronics, University of Gadjah Mada, Yogyakarta, Indonesia.
Nur Rokhman
Department of Computer Science and Electronics, University of Gadjah Mada, Yogyakarta, Indonesia.
Mohammad Edi Wibowo
Department of Computer Science and Electronics, University of Gadjah Mada, Yogyakarta, Indonesia.
Abdul Karim
College of Science and Technology, Korea University, Seoul, South Korea.
*Author to whom correspondence should be addressed.
Abstract
Aims: The main aim of this research is to propose a new approach to financial time series data feature extraction using Moving Average Distance combined with Isolation Forest.
Study Design: Building a feature extraction using Moving Average Distance and Isolation Forest for time series data.
Methodology: We propose a Moving Average Distance to calculate the distance of the recent price to a moving average as input for the Isolation Forest algorithm. The distance measurement used in this research is measured in daily periods of 2,3,4,5,10, and 20. This period variation is used to observe the effect of different short, medium, and long terms on the forecasting accuracy. This moving average distance and isolation forest combination enrich the feature used as input for LSTM as a forecasting algorithm.
Results: The daily S&P 500 and SSE index are used as datasets to test the proposed method. The research results showed that the proposed method outperformed the accuracy of previous research. The 3-daily period of moving average distance was the best parameter for the model and gave the best accuracy performance measure for both datasets; we found that the more extended period than that tends to reduce the accuracy.
Conclusion: Our experimental results showed that the proposed method improves the ability of LSTM as a time series forecasting algorithm and outperforms the previous research results.
Keywords: Moving average distance, isolation forest, abnormal detection, time series, forecasting, LSTM