Keywords

1 Introduction

Forecasting exchange rate is a very challenging task as it is one of the most important financial markets for investors. Since exchange rates are highly volatile in nature and changes rapidly over short period of time, the investors are very anxious to determine the future trend of the exchange rates in the markets to reduce the risk. Many financial models have been used to analyze the behavior of the exchange rate because of the fact that exchange rates are dynamic, non-linear, non-stationary, chaotic and complex in nature. Thus conventional methodology can hardly forecast the exchange rate. Hence financial industry is depending upon advance computer technologies in order to maintain competitiveness in the global economy [1].

A particle swarm optimization back propagation network (PSOBPN) model where PSO is used to select the optimal input layer neuron for prediction of exchange rates by back propagation network (BPN) has been proposed in [2]. In [3] a hybrid model is used to forecast the future trend of the exchange rates that combines both fundamental and technical analysis. Three ANN based forecasting model are investigated to predict the six exchange rates Australian dollar [4]. Reference [5] proposed a forecasting model based on neural network with weighted fuzzy membership functions (NEWFM) to predict the GBP/USD and Indian rupee/USD exchange rate using the Haar wavelet transforms (WT). A model based on multilayer perceptron (MLP) neural network using Bayesian learning and markov chain montecarlo (MCMC) method for forecasting exchange rates has been reported in [6]. The study in [7] proposed a generalized auto regressive conditional heteroskedasticity (GARCH) model to predict the future changes in exchange rates and ant colony algorithm was used for optimization. The paper in [8] indicated the use of functional link artificial neural network which is a single layer feed forward network for task classification because of its simple architectural design and less computational complexity. An integrated functional link interval type-2 fuzzy neural system (FLIT2FNS) for predicting the stock market indices has been proposed recently in [9]. The hybrid model uses a TSK (Takagi-Sugano-Kang) type fuzzy rule base that employs type-2 fuzzy sets in the antecedent parts and the outputs from the functional link artificial neural network (FLANN) in the consequent parts. Back propagation and particle swarm optimization (PSO) learning algorithms have been used independently to optimize the parameters of all the forecasting models. An adaptive model for the forecast of exchange rates has proposed in [10], in which the weights of the network are updated based on differential evolution (DE) algorithm. In the recent past teaching-learning based optimization (TLBO) [1113] has been used for mechanical design optimization problems due to its less computational complexity and high consistency. It has no algorithm-specific parameters unlike other evolutionary optimization techniques. TLBO requires only common controlling parameters like population size and number of generations for its working.

In this paper we have proposed a simple model for forecasting, using functional link artificial neural network (FLANN) as the basic model and teaching-learning based optimization algorithm as the learning tool to accurately and efficiently predict the exchange rate of US Dollar in terms of Indian Rupees, Singapore Dollar and Canadian Dollar. The organization of the paper is as follows: Sect. 1 deals with literature review, problem formulation and motivation behind the problem selection. Section 2 describes the detail of teaching-learning based optimization. Section 3 outlines the process of feature extraction from raw data set. The development and algorithm of the proposed model and the weight optimization of the network based on TLBO is described in Sect. 4. The simulation study and result analysis is discussed in Sect. 5. Finally the conclusion is discussed in Sect. 6.

2 Teaching-Learning Based Optimization

TLBO was introduced by Rao, Savsani and Vakharia in [11] as a meta-heuristic, population based optimization algorithm. Recently this technique was used for the optimization of mechanical design problem. TLBO have been used to obtain approximate global solution for non-linear problem with less computational complexity. It is a simple algorithm because no algorithm parameters are required for the working of the algorithm. It is inspired by passing of knowledge within a classroom environment, where a learner acquires knowledge from its teacher and other classmates. The teacher is considered as a highly learned person. As TLBO is a population based approach, it uses a population of solution to reach the global or optimal solution. In this technique the population is considered as a group of learners. Every optimization algorithm has design variables. In TLBO different design variables are considered as different subjects and the result obtained by each learner is taken as fitness values. The learner with best fitness value is considered as teacher. The teacher tries to disseminate knowledge among learners, which will in turn increase the knowledge level of the whole class and help learners to get good marks or grades. The quality of the students is judged from the mean value of the population. The teacher tries to move the mean of the class to its own level thus increasing the learners’ level to a new mean. As the mean increases to a new level, a new teacher is obtained of better quality than the students. The algorithm has the following steps:

A. Initialization Phase: A population of size \(P_{n}\) each having number of design variables (D), of variables is initialized such that, \((x_{i}\) = 1, 2, . ., \(P_{n}\)) and \((x_{ij}, j = 1, 2, . ., D)\). Each variable has to be optimized so that the objective function is minimized.

population =

$$\begin{aligned} \begin{bmatrix} a_{1,1}&a_{1,2}&\cdots&a_{1,n} \\ a_{2,1}&a_{2,2}&\cdots&a_{2,n} \\ \vdots&\vdots&\ddots&\vdots \\ a_{m,1}&a_{m,2}&\cdots&a_{m,n} \end{bmatrix} \end{aligned}$$

B. Teacher Phase: The mean of the population is calculated column-wise, which gives the mean of each subject (variable)

$$\begin{aligned} M_{new,D}= [m_{1},m_{2},....,m_{D}] \end{aligned}$$
(1)

The learner with minimum objective function is considered as the teacher for that iteration. Hence,

$$\begin{aligned} X_{teacher}= X_{f(X)=min} \end{aligned}$$

The teacher will try to shift the mean from \(M_{D}\) towards \(X_{teacher}\) which will act as a new mean

$$\begin{aligned} M_{D} = X_{teacher,D} \end{aligned}$$

The difference between two means is given as

$$\begin{aligned} Difference mean_{i}=r(M_{new}- T_{F}M_{i}) \end{aligned}$$
(2)

Where r is a random number within the range [0,1] and \(T_{f}\) can either be 1 or 2 which is decided accordingly The obtained difference is added to the current solution to update its values using \(T_{f}=\) round[1+rand(0,1)2-1]

The current solution is updated by using the Eq. (3),

$$\begin{aligned} X^{'}_{new,D}= X_{old,D} + DifferenceMean_{D} \end{aligned}$$
(3)

Accept \(X^{'}_{new,D}\) if it gives better function value.

C. Learner Phase: In this phase the learners enhance their knowledge through mutual interaction. Two learners are randomly chosen p and q such that \(X^{'}_{new-p,D}\) \(\ne \) \(X^{'}_{new-q,D}\) (where \(X^{'}_{new-p,D}\) and \(X^{'}_{new-q,D}\) are the updated values of \(X_{old-p,D}\) and \(X_{old-q,D}\) at the end of the teacher phase)

$$\begin{aligned} X^{"}_{new-p,D}= X^{'}_{new-p,D} + r(X^{'}_{new-p,D}-X^{'}_{new-q,D})If X^{'}_{new-p,D}<X^{'}_{new-q,D} \end{aligned}$$
(4)
$$\begin{aligned} X^{"}_{new-p,D}= X^{'}_{new-p,D} + r(X^{'}_{new-q,D}-X^{'}_{new-p,D})If X^{'}_{new-p,D}>X^{'}_{new-q,D} \end{aligned}$$
(5)

\(X^{"}_{new-p,D}\) is accepted if it gives a better function value.

3 Feature Extraction from Raw Data

The past exchange rate data which consists of one currency value for each month is collected for the period January 1973 to October 2013, January 1981 to March 2014 and January 1999 to March 2014 for Indian Rupees, Singapore Dollar and Canadian Dollar respectively with respect to US Dollar. Then the values were normalized so that the values lie between 0 and +1 by dividing each value by the maximum value in the entire data set. A sliding window of size 12 containing past 11 months normalized values and the present value is used to extract three features for each i.e. 12th month value, mean and variance of each group are given as input to the model. In this way 488, 399 and 183 set of features of Indian Rupees, Singapore Dollar and Canadian Dollar respectively were extracted. Out of the total obtained set of features 80 % of the features set are used for training and remaining 20 % of the features are used for testing the performance of the model.

4 Development of FLANN Based Prediction Model

The hybrid model consists of a FLANN as shown in Fig. 1. The weights of the prediction model are updated by the principle of TLBO. FLANN is a single layer neural network in which each input pattern undergoes functional expansion and increases in the input vector dimensionality. Each member of the population in TLBO represents a possible weight vector of the model which is updated to progressively minimize the mean square error(MSE).

Fig. 1.
figure 1

A FLANN-TLBO based prediction model

The development of the prediction model proceeds as follows:

Step-1. Features are extracted from the raw data and are given as input to the FLANN.

Step-2. The weights of the model are initialized randomly and these weights act as the member of the initial population having P individual. Each member of the population constitutes D number of parameters which represent the weight values of the FLANN.

Step-3. Out of total K set of features, L sets (80 % of K approximately) are used for training and rest (K-L) sets are used for testing the performance of the model.

Step-4. The first feature set is applied to the model and the corresponding desired output is obtained. The output of the model corresponding to the \(i^{th}\) set of feature is estimated as

$$\begin{aligned} y_{i}=\sum ^{D} _{d=1}w_{i,d}x_{i,d} \end{aligned}$$
(6)

Step-5.After the application of L number of training sets, L errors is produced. The mean square error(MSE) for a set of parameters corresponding to the \(i^{th}\) individual is determined by

$$\begin{aligned} MSE(i)=\frac{\sum ^{L}_{l=1}e^{2}(l)}{L}\end{aligned}$$
(7)

where the error is calculated as

$$\begin{aligned} e_{i}=d_{i}-y_{i}\end{aligned}$$
(8)

This is repeated for P times.

Step-6.The weight(each individual) is updated in two phases. In teacher phase the weight is updated using (3). The fitness value of the new population is computed. Comparison is done between the two fitness values, the one with minimum fitness value is selected for the learner phase. In the learner phase the weight is updated using (4) or (5). The fitness value of the new population is again computed. Comparison is done between the two fitness values; the one with minimum fitness value is selected for the next generation. The entire process is repeated for certain generations.

Step-7. At each generation minimum MSE is obtained and plotted against the number of generation to show the learning characteristics of the model.

Step-8. The learning process is stopped when MMSE reaches to a minimum possible floor level.

Step-9. The potential ability of the model is tested with the known feature of some previous months.

5 Simulation Study and Result Analysis

The simulation study is carried out to signify and estimate the prediction performance of the proposed model (FLANN-TLBO) and is compared with the result obtained from DE and PSO based models. The data set has been taken from the website www.forecasts.org. Simulation has been done for the prediction of three different exchange rates (Indian Rupees, Singapore Dollar and Canadian Dollar with respect to US Dollar). The prediction efficiency of the model is assessed for 1 month, 3 months and 6 months ahead. The entire data set is divided into training set and testing set. All the inputs are normalized by using (9)

$$\begin{aligned} y_{i}=\frac{x_{i}}{x_{max}} \end{aligned}$$
(9)

where \(y_{i}\), \(x_{i}\) and \(x_{max}\) represent the normalized, actual value and maximum value in the entire data set respectively.

The input pattern are extracted from the data set by grouping the data using a shifting window of size 12 and the 12th value, mean and variance of each group is taken as input to the FLANN. These three extracted features are first functionally expanded using trigonometric function. Then the expanded input are weighted and summed to obtain the output. After all the patterns are applied to each individual weight vector and the minimum MSE (MMSE) is obtained then weights of the model are updated using teaching-learning based optimization technique. The performance of the model is determined by calculating the mean absolute percentage of error (MAPE) as given in (10).

$$\begin{aligned} MAPE(k)=\frac{1}{M}\sum ^{M}_{m=1}\frac{y(m)-\hat{y}(m)}{y(m)} \end{aligned}$$
(10)

where y(m), \(\hat{y}(m)\) and M represents actual exchange price, predicted exchange price and total number of test samples respectively.

The convergence characteristics of FLANN-TLBO of US Dollar to Indian Rupees for 1 month, 3 months and 6 months ahead is obtained and shown in the Fig. 2. From these figures it is contemplated that TLBO has faster convergence rate. The comparison of convergence characteristics of FLANN-TLBO along FLANN-DE and FLANN-PSO has been shown in the Fig. 3. The comparison of actual and predicted values of US Dollar to Indian Rupees for 1 month ahead prediction are shown in Fig. 4 during testing period. In Fig. 5 the comparison of actual and predicted values of US Dollar to Singapore Dollar for 6 months ahead prediction during training period is depicted. Similarly Fig. 6 represents the actual and predicted values of US Dollar to Canadian Dollar for 3 months ahead prediction during training period. The MAPE values obtained for the three data sets by using FLANN-TLBO, FLANN-DE and FLANN-PSO are given in Tables 1, 2 and 3. From the following tables it is revealed that FLANN-TLBO based model gives better prediction performance than the other two models.

Table 1. Comparison of MAPE obtained by different prediction models for Indian Rupees
Table 2. Comparison of MAPE obtained by different prediction models for Singapore Dollar
Table 3. Comparison of MAPE obtained by different prediction models for Canadian Dollar
Fig. 2.
figure 2

Comparison of convergence characteristics for different months ahead prediction for Indian Rupees using FLANN-TLBO model

Fig. 3.
figure 3

Comparison of convergence characteristics for one month ahead prediction for Indian rupees of different prediction models

Fig. 4.
figure 4

Comparison of actual and predicted value of Indian Rupees for 1 month ahead prediction using FLANN-TLBO model during testing

Fig. 5.
figure 5

Comparison of actual and predicted value of Singapore Dollar for 6 months ahead prediction using FLANN-TLBO model during training

Fig. 6.
figure 6

Comparison of actual and predicted value of Canadian Dollar for 3 months ahead prediction using FLANN-TLBO model during training

6 Conclusion

The proposed forecasting model is developed first, and is then combined with TLBO to optimize the network training process. The model is used to predict different exchange rates fromthe past exchange rate values. The performance of the proposed model is compared with two other models, FLANN-DE and FLANN-PSO. Also, TLBO perform better than the other two optimization technique, having less computational complexity. The comparison among the three models indicates that the proposed FLANN-TLBO model provides superior prediction accuracy than FLANN-DE and FLANN-PSO.