Elsevier

Expert Systems with Applications

Volume 41, Issue 14, 15 October 2014, Pages 6235-6250
Expert Systems with Applications

Financial forecasting using ANFIS networks with Quantum-behaved Particle Swarm Optimization

https://doi.org/10.1016/j.eswa.2014.04.003Get rights and content

Abstract

To be successful in financial market trading it is necessary to correctly predict future market trends. Most professional traders use technical analysis to forecast future market prices. In this paper, we present a new hybrid intelligent method to forecast financial time series, especially for the Foreign Exchange Market (FX). To emulate the way real traders make predictions, this method uses both historical market data and chart patterns to forecast market trends. First, wavelet full decomposition of time series analysis was used as an Adaptive Network-based Fuzzy Inference System (ANFIS) input data for forecasting future market prices. Also, Quantum-behaved Particle Swarm Optimization (QPSO) for tuning the ANFIS membership functions has been used. The second part of this paper proposes a novel hybrid Dynamic Time Warping (DTW)-Wavelet Transform (WT) method for automatic pattern extraction. The results indicate that the presented hybrid method is a very useful and effective one for financial price forecasting and financial pattern extraction.

Introduction

The FX is the largest global market today. According to the September 2013 report of the Bank for International Settlements (2013), Global FX turnover reached $5.3 trillion a day in 2013. There are two main groups that trade on the FX market. The first group is companies and governments that use the FX market to convert domestic currency into a foreign currency for international business transactions. The second group consists of investors that trade in order to make a profit on the Forex market. Speculators on the FX market range from large banks to home-based operators (Archer, 2010).

As with other financial markets, the most important factor for being successful in FX trading is the ability to correctly predict future market fluctuations. If a speculator can “buy low and sell high”, then he or she will make a profit. There are wild variations in exchange rates on the FX market, and it is difficult for traders to make the right decision to buy or sell. Forecasting future FX exchange rates is an intriguing subject for many speculators. They use artificial intelligent models to forecast future market values and look for complex chart patterns. The objective of this paper is to propose a hybrid artificial intelligence model as a trading advisory system. An ANFIS-QPSO hybrid system is used as a one-step-ahead forecasting method. Wavelet coefficients of time series are used as the ANFIS input parameters. The paper also presents a hybrid Dynamic Time Warping (DTW)-Wavelet Transform (WT) method for automatic pattern extraction from a financial time series. This study attempts to make correct trading signals based on forecasted market values and identified chart patterns. The proposed model can help traders to reduce trading risks and to increase their profit.

According to the efficient market theory, it is nearly impossible to accurately make long-term predictions based on historical market data. But in the short-term, there are some hidden repeating patterns that, if we can identify them, could help us make a profit from the market (Liu & Kwong, 2007). Professional traders use two major types of analysis to make accurate decisions in financial markets: fundamental and technical. Fundamental analysis is based on the overall state of the economy, the state of the industry and a company’s overall financial situation. Technical analysis, on the other hand, relies on charts and historical data, and is based on the idea that history will repeat itself. Therefore, by analyzing past data, we can forecast future market trends. The two main methods used for technical analysis are statistical-based indicators and chart patterns. Statistical methods include the use of moving averages to find a mathematical relationship between past data that can be used for evaluating future market values. Finally, if a specific pattern appears in a chart, chart patterns analysis can be used to predict the future trends.

There are many papers dealing with financial market forecasting. Many of them employ soft computing techniques, such as genetic algorithms, neural networks, and neuro-fuzzy systems. Most previous works have presented methods to try to accurately predict the market. Obviously, based on the current human knowledge, it is impossible to correctly predict the exact market values. Therefore, researchers have used complicated methods to minimize forecasting error. To be successful in real market trading, professional traders place great value on predicting future market trends. Instead of trying to forecast an exact market value, the model proposed in this paper provides a trading advisory signal generated from predicted market trends.

The innovations of the presented method are as follows:

  • The majority of earlier papers used just one of the technical indicators or chart patterns as a forecasting method. The proposed method uses wavelet decomposition of time series and extracted chart patterns as the system inputs.

  • An ANFIS-QPSO hybrid method has rarely been used for financial forecasting. A novel method for tuning ANFIS membership functions by QPSO has been proposed. Experimental results have shown that this model is very accurate and highly efficient for forecasting in financial markets, especially in the Forex market.

  • DTW has rarely been used for finding patterns in financial time series. In this paper a state-of-the-art hybrid algorithm, combining Dynamic Time Warping and Wavelet Transform, is presented to extract the shaped patterns in financial time series.

  • The majority of earlier papers employed a single shape template or time series as a target pattern. These patterns are generally independent from the input time series. The presented method creates an adaptive pattern based on the main features of pattern and input time series to accurately predict the current data.

Section 2 of this paper provides the literature review, Section 3 reviews basic methods. The proposed method is described in Section 4. Section 5 describes the experiments and makes comparisons. Finally, Section 6 examines the conclusions of the study.

Section snippets

Literature review

Many previous studies used statistical technical indicators to predict the price variations. Some of the proposed methods used soft computing techniques as a forecasting system. Escobar, Moreno, and Munera (2013) presented a new technical indicator based on fuzzy logic. Current indicators used only mathematical models, but Escobar et al. incorporated some aspects of trader behavior, such as risk tendency. They used fuzzy logic to make decisions an ordinary investor.

Cheng, Wei, Liu, and Chen

Adaptive-Network-Based Fuzzy Inference System (ANFIS)

Zadeh (1965) proposed fuzzy logic and Fuzzy Inference Systems (FIS) for the first time in 1965. In fuzzy logic, data can be a member of more than one set. In fuzzy logic, models are represented by if-then rules and linguistic variables. Every fuzzy inference system has three main parts: fuzzy rules, membership functions and a reasoning mechanism. There are three types of fuzzy inference systems: the Mamdani system, where the fuzzy output has to be defuzzified (Mamdani, 1976), the Takagi–Sugeno

The proposed method

This article has proposed a novel method for forecasting financial time series. In the first instance, an ANFIS-wavelet tuned with QPSO is used as a one-step-ahead forecasting system. Also a novel Dynamic Time Warping (DTW)-wavelet hybrid method is proposed for automatic pattern extraction. Finally, dependent upon the outputs of the proposed method, the system makes some trading decisions, like ‘buy’, ‘sell’ or ‘neutral’. In this article we tried to create a decision support system that

Experiments and comparisons

In this section, to demonstrate the proposed model and to introduce the proposed method step-by-step, the daily exchange rates of four major currency pairs from January 2011 to December 2013 are used as the experimental dataset. The four major currency pairs used are EUR/USD, USD/JPY, GBP/USD and USD/CHF. The first part describes the machine learning model. The second part presents the pattern recognition method. The third part generates some trading advice from the system.

Conclusions

The main purpose of this paper was to create a Forex trading advisory system that used both chart patterns and past exchange rate values in the decision making process and that would perform like a real trader. We proposed a state-of-the-art method that forecast one-step-ahead market values by using a hybrid of ANFIS, QPSO and WT, and also extracted chart patterns by using WT and DTW at the same time. In addition, unlike most methods in the literature review, the proposed system generates

Acknowledgements

The authors gratefully acknowledge anonymous reviewers for their valuable comments and suggestions. Also we would like to appreciate the help and support rendered by Mr. James Morrison from JamesEdits for editing this paper.

References (86)

  • A. Cohen et al.

    Wavelets on the interval and fast wavelet transform

    Applied and Computational Harmonic

    (1993)
  • R. Ebrahimpour et al.

    Mixture of MLP-experts for trend forecasting of time series: A case study of the Tehran stock exchange

    International Journal of Forecasting

    (2011)
  • A. Escobar et al.

    A technical analysis indicator based on fuzzy logic

    Electronic Notes in Theoretical Computer Science

    (2013)
  • A. Esfahanipour et al.

    Adapted Neuro-Fuzzy Inference System on indirect approach TSK fuzzy rule base for stock market analysis

    Expert Systems with Applications

    (2010)
  • T.-J. Hsieh et al.

    Forecasting stock markets using wavelet transforms and recurrent neural networks: An integrated system based on artificial bee colony algorithm

    Applied Soft Computing

    (2011)
  • S.-C. Huang

    Integrating spectral clustering with wavelet based kernel partial least square regressions for financial modeling and forecasting

    Applied Mathematics and Computation

    (2011)
  • S.-C. Huang

    Forecasting stock indices with wavelet domain kernel partial least square regressions

    Applied Soft Computing

    (2011)
  • Z. Jagnjic et al.

    Time series classification based on qualitative space fragmentation

    Advanced Engineering Informatics

    (2009)
  • A. Jalalian et al.

    GDTW-P-SVMs: Variable-length time series analysis using support vector machines

    Neurocomputing

    (2013)
  • L.-J. Kao et al.

    A hybrid approach by integrating wavelet-based feature extraction with MARS and SVR for stock index forecasting

    Decision Support Systems

    (2013)
  • A. Kazem et al.

    Support vector regression with chaos-based firefly algorithm for stock market price forecasting

    Applied Soft Computing

    (2013)
  • P. Ładyzynski et al.

    Particle swarm intelligence tunning of fuzzy geometric protoforms for price patterns recognition and stock trading

    Expert Systems with Applications

    (2013)
  • Q. Lan et al.

    Reversal pattern discovery in financial time series based on fuzzy candlestick lines

    Systems Engineering Procedia

    (2011)
  • S. Lee et al.

    How many reference patterns can improve profitability for real-time trading in futures market?

    Expert Systems with Applications

    (2012)
  • H. Li

    Asynchronism-based principal component analysis for time series data mining

    Expert Systems with Applications

    (2014)
  • S.-T. Li et al.

    Knowledge discovery in financial investment for forecasting and trading strategy through wavelet-based SOM networks

    Expert Systems with Applications

    (2008)
  • Z. Liao et al.

    Forecasting model of global stock index by stochastic time effective neural network

    Expert Systems with Applications

    (2010)
  • J.N. Liu et al.

    Automatic extraction and identification of chart patterns towards financial forecast

    Applied Soft Computing

    (2007)
  • E.H. Mamdani

    Advances in the linguistic synthesis of fuzzy controllers

    International Journal of Man-Machine Studies

    (1976)
  • P. Melin et al.

    A new approach for time series prediction using ensembles of ANFIS models

    Expert Systems with Applications

    (2012)
  • J. Reboredo et al.

    Wavelet-based evidence of the impact of oil prices on stock returns

    International Review of Economics and Finance

    (2014)
  • J. Sun et al.

    Quantum-behaved particle swarm optimization with Gaussian distributed local attractor point

    Applied Mathematics and Computation

    (2011)
  • E. Sun et al.

    A new wavelet-based denoising algorithm for high-frequency financial data mining

    European Journal of Operational Research

    (2012)
  • I. Svalina et al.

    An adaptive network-based fuzzy inference system (ANFIS) for the forecasting: The case of close price indices

    Expert Systems with Applications

    (2013)
  • Z. Tan et al.

    Stock trading with cycles: A financial application of ANFIS and reinforcement learning

    Expert Systems with Applications

    (2011)
  • B. Vanstone et al.

    An empirical methodology for developing stockmarket trading systems using artificial neural networks

    Expert Systems with Applications

    (2009)
  • B. Vanstone et al.

    Enhancing stockmarket trading performance with ANNs

    Expert Systems with Applications

    (2010)
  • B. Vanstone et al.

    Creating trading systems with fundamental variables and neural networks: The Aby case study

    Mathematics and Computers in Simulation

    (2012)
  • V.M. Velichko et al.

    Automatic recognition of 200 words

    International Journal of Man-Machine Studies

    (1970)
  • J.-L. Wang et al.

    Trading rule discovery in the US stock market: An empirical study

    Expert Systems with Applications

    (2009)
  • B. Wang et al.

    A novel text mining approach to financial time series forecasting

    Neurocomputing

    (2012)
  • L.-Y. Wei

    A GA-weighted ANFIS model based on multiple stock market volatility causality for TAIEX forecasting

    Applied Soft Computing

    (2013)
  • L.-Y. Wei

    A hybrid model based on ANFIS and adaptive expectation genetic algorithm to forecast TAIEX

    Economic Modelling

    (2013)
  • Cited by (154)

    • Forecasting US stock price using hybrid of wavelet transforms and adaptive neuro fuzzy inference system

      2024, International Journal of System Assurance Engineering and Management
    View all citing articles on Scopus
    View full text