Professional Documents
Culture Documents
Foreign exchange value prediction models are playing a vital role in financial decision making and global business trading.
Forecasting the foreign exchange values with high accuracy, became a prominent research topic for both academic and
economic research scholars. Due to the complexity and chaotic nature of foreign exchange dataset values, minimizing the
range of prediction errors become another prominent research challenge in this area. Although many former researches were
designed various time series prediction models, they were suffering from the prediction accuracy and prediction errors. In this
paper, we proposed a Fuzzy based Support Vector Regression (F-SVR) model, to address the former research limitations by
incorporating the fuzzy logic with SVR. Fuzzy membership functions are used in this model to assign the time coefficients
along with the data points, to get the more control on training and prediction process of SVR. Experiments conducted on USD-
INR dataset using the proposed F-SVR model with various kernel functions proven that, the F-SVR with radial basis kernel
function recorded the high prediction accuracy and less prediction error range than the traditional SVR kernels.
Keywords
Support Vector Machines, Fuzzy Logic, F-SVR, Foreign exchange value forecasting, USD-INR data set
( )
n
descent [7] model cost functions of SVR. Although
∑ ( yi − ȳ i )2 the SVM and SVR follows the same methodology, in
i=1
MSE= ( 4) SVM the hyper plane is used for classification, where
2N
as in SVR the hyper plane is used for forecasting the
While analyzing the chaotic time series and continuous future values. Unlike the linear regression
predicting the future values, many research scholars
model with minimized error rate functions, the SVR
[23], [24], [1] and [3] observed that the SVM assures the approximation of error rate, which is
recorded high accuracy, when compared to the other
tolerance to a certain threshold ( E ) value at any
prediction models like ANN [16] and Random
given time. Because of this, it is termed as the
Walks. Tyree and Long (1995) et al [30], compared
Epsilon Insensitive Support Vector Regression ( E -
the Random Walk model predicted exchange values
SVR [9]) with L2 loss function. Using the predictor(
against the ANN’s. For this they have chosen the
USD-DEM dataset, to execute the scheduled Uni-
x ) and criterion( y ) variables, E -SVR defines a
Variant and Multi-Variant prediction operations. function f(x), which results the ȳ from y ,in subject to
From these simulations, they noticed that the random ( y− ȳ ) ≤ E . This guaranteed error range helps the
walks are recorded high accuracy and lowest error forex investors and traders in calculating the max risk
rate than ANN’s. NanthaKumaran and Tilakaratne et associated with their trading.
al (2017) [24], evaluated the performance of Support To forecast the future values of the aforementioned
Vector Regression (SVR) model and Artificial training dataset Ɗ, using a non-linear SVR function
Neural Networks(ANN’s), in forecasting the foreign f(x), is formulated by Vapnik et al.[8] as:
T
exchange values, using the EUR/LKR and JPY/LKR f ( x )= y =W . Ф ( ϰi ) + b (5)
datasets. In this comparison SVR recoded high When compared the linear regression related Eq(1)
directional accuracy and MSE over ANN’s. Alamili against the nonlinear regression Eq(5), the nonlinear
M [1] conducted the experimental analysis and regression model is especially designed to transform
comparison between ANNs and SVMs, with the help the linearly inseparable data to the high dimensional
of two forex datasets (i.e. EUR/USD dataset and feature space Ф ( ϰ i ), using the training data weight
Mackey-Glass data set). By insisting various
combinations of ϒ, Ϲ and ω values, Alamili proven vector W T and the scalar b values as aforementioned.
that the SV Regression achieved the high hit rate and Generally the SVR [11] is used to find the
less margin errors compared to ANNs. Rajesh et al compatible hyper plane with aware of E -insensitive
(2019) [27] conducted the experiments on stock trend loss function, to minimize the error range. To achieve
predictions with SVM, Random Forest and KNN this, the function f ( x ) is transformed to find the
classifiers, in combination with heat map and optimal hyper plane, to minimize the error rate
ensemble learning methods, to achieve the high between predictor variables ( y )and criterion
accuracy in stock predictions. Murali Krishna et al variables ( ȳ ) (with most E -deviation), for the whole
(2019) [18] proposed the ARIMA and ANN models training data T is defined as follows:
for the future gold price forecasting. Experiments on 1 T
standard gold dataset had proven that, the Feed (min) W W (6)
2
Forward Neural Network (FFNK) shown the high
accuracy (in terms of MAE and RMSE) than the subject to: ( y i−W T . Ф ( ϰ i) −b ) ≤ E
ARIMA model. But in case of sale value prediction E ≥ ( b+W T .Ф ( ϰi ) − y i) w h ere E ≥ 0
experiments by SagarImambi et al [14] shown that, While doing the regression with linearly inseparable
the ARIMA model forecasted the future sale values data, the value of W should be minimized to a
efficiently. possible level to keep the function flat. At this time a
set of misclassification values may be raised due to
I. 3.Fuzzy Reliance Support Vector the limitations in considering the data range for
Regression training. Soft margin is the boundary selection
model, which plays a vital role in SVR by allowing 0.1, 0.2 …, 1). This is a reliable methodology to
the limited range of errors if required. The distance solve the fuzziness of any real world problems with
from the hyper plane to any misclassification point is feasible solutions. In forecasting the time series data,
represented with (slack variable ξ) and to control the SVR became a reliable model with assured max E
soft margin, a regularization constant variable Ϲ is deviation, but it is slightly suffering in maintaining
added as presented below: the consistency in accuracy and prediction error rate
m
1 values. Some former researches [4] and [31] also
( min ) W T W +Ϲ ∑ ¿ ¿ discussed the sensitiveness of SVM with noisy data
2 i=1
and outliners. To suffer from these limitations the
subject to: ( i
y −W
T
. Ф ( ϰ i ) −b ) ≤ E+ ξ+¿i ¿ main issues associated with support vector regression
−¿ ≥ ( b+W . Ф (ϰ i )− y i ) wh ere ξi are: SVR is unable to calculate the priority of dataset
+¿ ,¿
T −¿ ,ξ i ¿
¿
E+ ξ i
variables in predictions and SVR cannot assigns the
Ϲ≥0 time coefficients with data points. From the dataset
The increased value of Ϲ decreases the analysis, we noticed that the foreign exchange value
misclassifications count that leads to over-fitting prediction process mostly relies on recent past history
problem and the decreased value of Ϲ increases the points than its earlier ones. Providing the uniform
misclassifications count that leads to under-fitting weights to all data points of a time series training set,
problem. With the help of the regularization leads to increase the error rate in future predictions.
parameter Ϲ , the criterion ( y ) variable values, which In order to address these limitations, we proposed the
greater than the threshold value ( E ¿are penalized use of fuzzy membership functions with SVR is
respectively, to control the over-fitting and under- termed as Fuzzy SVR (F-SVR) in this paper. In F-
fitting problems. The max upper distance of the SVR method, the fuzzy membership function [20]
+¿¿
misclassification value is (ξ i )and the max lower and [17] assigns the time coefficient value (t i) using
−¿ ¿
distance of the misclassification value is ξ i . In order the fuzzy membership (qi) functions.
to solve the quadratic of Eq(7) and to adopt this The fuzzy membership value (q i) (denotes the
model for nonlinear functions, the Lagrangian [22] attitude) of a predictor variable (ϰ i), which is a non-
nonnegative multipliers (αi and αi*) and the dual negative value (0< qi ≤1) and is labeled with the
formulation of nonlinear SVR are substituted in points of training dataset Ḏ as {(ϰ 1, γ1, q1), (ϰ2, γ2, q2)
Eq(7). At Final the standard Eq(5) related decision … (ϰm, γm, qm)}.
function f ( x ) is defined as follows: In this F-SVR model, the dataset main variable ( ϰ k )
m
vector size is calculated and the fuzzy memberships
f ( x )=∑ (¿ α i−α ¿i )K ( ϰi , ϰ j)+b (8)¿ are assigned by starting from the lower bound ( σ > 0)
i=1
points in a sequential manner. In this case the linear
Where the training data weight vector W is
membership function of time ti from qi is defined as:
represented with the lagrangeian multipliers as:
m q i=f ( t i )=w . t i +b (11)
{ }
W =∑ (¿ α i−α )¿ ¿
i t 1 >0
i=1
Here the inner products of the predictor subject to t m=1
variables〈ϰi .ϰi〉are substituted with kernel functions f ( t 1 )=σ
K ( ϰi ,ϰ j ) to map the predictor vectors ϰ i and ϰj to By applying the boundary constraints, we defined the
the high dimensional feature space models like Ф ( ϰ i ) fuzzy membership function of time(t i) as:
( )
and Ф ( ϰ j ). Most frequently using semi-definite t −t
2
[ ]
2
−‖ϰi −ϰ j‖ redesigned soft-margin with slack variables. In F-
K ( ϰi , ϰ j )=exp Guassian Radial Basis SVR model the fuzzy membership of time(q ¿¿ i) ¿ is
2 σ2
multiplied with slack variables to obtain a different
Function (10) weight, which impacts on the regression error values
3.2 Fuzzy reliance Support Vector Regression (F- of various data points directly.
SVR) m
1
Fuzzy logic mimics the human behavior, while ( min ) W T W +Ϲ ∑ (q ¿¿ i)¿ ¿¿
making the decisions on uncertain data. Unlike the 2 i=1
boolean logic (0 or 1), fuzzy expands the decision
criteria by increasing the possible decision targets (0,
subject to: ( y i−W . Ф ( ϰ i) −b ) ≤ E+ ξ+¿i ¿
T
−¿ ≥ ( b+W . Ф (ϰ i )− y i ) wh ere qi >0∧ξ i
+¿ ,Ϲ ≥0 ¿
i=1 i=1
Subject to
m
∑ (α i−α ¿i )=0 , 0 ≤ αi ≤ qi Ϲ∧αi , α¿i ⋵(0 , Ϲ) Figure 3: F-SVR predictions with polynomial kernel model
i=1
In traditional SVR, only one regularization parameter
Ϲ is defined, where as in proposed F-SVR the data
point ϰ icontains regularization constant Ϲ along with
multiple q ivalues to get the better control over
training and predictions.
4. Experimental Analysis
This section describes the selected USD-INR dataset
for experiments and the results obtained from the
comparisons with F-SVR. In order to conduct the
experiments on foreign exchange value predictions
using F-SVR model, USD-INR dataset with 3 years Figure 4: SVR predictions with RBF kernel model
data (i.e. since May-2017 to May-2020) is selected.
This data set contains total 6 columns (price, open,
high, low, volume and change) and hundreds of rows.
To know the more information regarding the nature
of dataset please refer section 2.1. We designed the
prototype of F-SVR using python programming
language and executed the experiments on a PC with
Intel core - i3-4030 @ 1.9GHz processor, 4 GB
RAM, 500 GB hard disk and windows 7 OS.
In order to conduct the F_SVR experiments, the total
dataset with (800+) records are trained and this Figure 5: F-SVR predictions with RBF kernel model
knowledge is used to forecast the final year data
using various kernel models. Mean Squared Error From figure [2-5], the total four graphs are
[MSE], Root Mean Square Error [RMSE], representing the results of experimental activities
Normalized Root Mean Square Error [NRMSE], Max conducted on USD_INR dataset using the F-SVR
Positive Prediction Error [MPPE] and Max Negative with linear kernel (fig.2), F-SVR with polynomial
Prediction Error [MNPE] are the selected metrics [5] kernel (fig.3), SVR with rbf kernel (fig.4) and F-SVR
to measure the performance of F-SVR model. with rbf kernel (fig.5). The above graph
representations (fig.2 and 3) are clearly exposing membership function assigns the time coefficient
that, the F-SVR linear and polynomial kernels are values with respective predictor variables using the
recorded less accuracy and high error rate, in finding fuzzy membership function to minimize the
the best fit hyper planes and forecasting the future prediction errors. Experiments on USD-INR dataset
values. At the same time the Radial Basis Function using the F-SVR prototype proven that, the F-SVR
(rbf) kernel with SVR shown the better results than with rbf kernel function recorded low predictions
F-SVR linear and polynomial kernels. Finally our errors and high prediction accuracy. Prominent
proposed approach F-SVR with rbf kernel is proven metrics of machine learning like MSE, RMSE,
as more accurate prediction model than the other NRMSE and prediction errors are used to measure
three kernel models. the performance of the proposed F-SVR model with
various kernel functions.
References
[1] Alamili, M. (2011). “Exchange rate prediction
using support vector machines: a comparison with
artificial neural networks”.
[2] Banchhor, C. and Srinivasu, N. (2018). “Fcnb:
Fuzzy correlative naı̈ ve bayes classifier with
mapreduce framework for big data classification”.
Journal of Intelligent Systems, 29(1):994–1006.
Figure 6: SVR vs. F-SVR prediction error comparison with RBF [3] Bhargav, P. S., Reddy, G. N., Chand, R. R., K, P.,
kernel model and Mathur, A. (2019). “Sentiment analysis for hotel
rating using machine learning algorithms”.
International Journal of Innovative Technology and
Exploring Engineering (IJITEE), 8(6).
[4] Boser, B. E., Guyon, I. M., and Vapnik, V. N.
(1992). “A training algorithm for optimal margin
classifiers”. In Proceedings of the fifth annual
workshop on Computational learning theory, pages
Tab-1.Experimental Results comparison of SVR and F-SVR 144–152.
kernel models on USD-INR dataset [5] Botchkarev, A. (2019). “A new typology design
In order to prove the efficiency of F_SVR in of performance metrics to measure errors in machine
controlling the prediction error range, the prediction learning regression algorithms”. Interdisciplinary
error values of the traditional SVR with rbf kernel Journal of Information, Knowledge & Management,
and the F-SVR with rbf kernel are compared (as 14.
shown in fig.6). From this comparison, we noticed [6] Brown, J. (2015). “Forex Trading: The Basics
that the F_SVR with rbf kernel perfectly limited the Explained in Simple Terms, Plus Free Bonus Trading
error ranges to a least possible value with small System. Forex, Forex for Beginners, Make Money
deviations. In other hand the traditional SVR with rbf Online, Currency Trad”. CreateSpace Independent
kernel lost the grip on controlling the error range to a Publishing Platform.
specific least possible value. This is another [7] Cheng, W.-Y. and Juang, C.-F. (2013). “A fuzzy
prominent dimension we have chosen to prove the model with online incremental svm and margin-
efficiency of our proposed F_SVR model. Finally the selective gradient descent learning for classification
experimental statistics were presented in table-1, to problems”. IEEE Transactions on Fuzzy systems,
represent the accuracy of proposed F-SVR model 22(2):324–337.
with various kernel functions. [8] Cortes, C. and Vapnik, V. (1995). “Support-
5. Conclusion vector networks. Machine learning”, 20(3):273–297.
Support vector regression is a prominent supervised [9] Dash, Y., Mishra, S. K., and Panigrahi, B. K.
prediction model, which is used for test set values (2019). “Prediction of south west monsoon rainfall
prediction based on training knowledge. While for kerala, india using ε-svr model”. In 2019 2nd
predicting the foreign exchange information, recent International Conference on Intelligent Computing,
data values have the higher impact on predictions Instrumentation and Control Technologies
than its earlier data values. TraditionalSVR cannot (ICICICT), volume 1, pages 746–748. IEEE.
consider the time coefficient values impact on time [10] Deboeck, G. J. (1994). “Trading on the edge:
series value predictions. In this paper,fuzzy based neural, genetic, and fuzzy systems for chaotic
support vector regression model F-SVR is proposed financial markets”, volume 39. John Wiley & Sons.
to forecast data values from the linearly inseparable [11] Drucker, H., Burges, C. J., Kaufman, L., Smola,
foreign exchange datasets. In F-SVR, the fuzzy A. J., and Vapnik, V.(1997). “Support vector
regression machines”. In Advances in neural in ICT for Emerging Regions (ICTer), pages 1–8.
information processing systems, pages 155–161. IEEE.
[12] Hsieh, D. A. (1992). “A nonlinear stochastic 25] Nayak, R. K., Tripathy, R., Mishra, D., Burugari,
rational expectations model of exchange rates”. V. K., Selvaraj, P., Sethy, A., and Jena, B. (2019).
Journal of International Money and Finance, “Indian stock market prediction based on rough set
11(3):235–250. and support vector machine approach”. In Intelligent
[13] Huang, W., Lai, K. K., Nakamori, Y., and and Cloud Computing, pages 345–355. Springer.
Wang, S. (2004). “Forecasting foreign exchange rates 26] Prathyusha, A. (2020). “Diabetic prediction using
with artificial neural networks: A review”. kernel based support vector machine”. International
International Journal of Information Technology & Journal of Advanced Trends in Computer Science
Decision Making, 3(01):145–165. and Engineering, 9:1178–1183.
[14] Imambi, S. S., Vidyullatha, P., V.B.T.Santhi, 27] Rajesh, P., Srinivas, N., Reddy, K. V.,
M., and Babu, P. H. (2018). “Explore big data and VamsiPriya, G., Dwija, M. V., and Himaja, D.
forecasting future values using univariate arima (2019). “Stock trend prediction using ensemble
model in r”. International Journal of Engineering and learning techniques in python”. International Journal
Technology, 7. of Innovative Technology and Exploring
[15] Inoue, T. and Abe, S. (2001). “Fuzzy support Engineering, 8(5):150–155.
vector machines for pattern classification”. In 28] Rosenblatt, F. (1957). “The perceptron, a
IJCNN’01. International Joint Conference on Neural perceiving and recognizing automaton Project Para”.
Networks. Proceedings (Cat. No. 01CH37222), Cornell Aeronautical Laboratory.
volume 2, pages 1449–1454.300IEEE. 29] Tripathy, R., Nayak, R. K., Das, P., and Mishra,
[16] Ismail, M., Vardhan, V. H., Mounika, V. A., and D. “Cellular cholesterol prediction of mammalian
Padmini, K. S. “An effective heart disease prediction atp-binding cassette (abc) proteins based on fuzzy c-
method using artificial neural network”. International means with support vector machine algorithms”.
Journal of Innovative Technology and Exploring Journal of Intelligent & Fuzzy Systems, (Preprint):1–
Engineering’at, 8:1529–1532. 8.
[17] Jiang, X., Yi, Z., and Lv, J. C. (2006). “Fuzzy [30] Tyree, E. W. and Long, J. (1995). “Forecasting
svm with a new fuzzy membership function”. Neural currency exchange rates: neural networks and the
Computing & Applications, 15(3-4):268–276. random walk model”. In City University Working
[18] Krishna, K. M., Reddy, N. K., and Sharma, M. Paper, Proceedings of the Third International
R. “Forecasting of daily prices of gold in india using Conference on Artificial Intelligence Applications.
arima and ffnn models”. Citeseer.
[19] Leelavathi, R., Kumar, G. S., and Murty, M. [31] Zhang, X. (1999). “Using class-center vectors to
(2018). “Nabla integral for fuzzy functions on time build support vector machines”. In Neural Networks
scales”. International Journal of Applied for Signal Processing IX: Proceedings of the 1999
Mathematics, 31(5):669–678. IEEE Signal Processing Society Workshop (Cat. No.
[20] Lin, C.-F. and Wang, S.-D. (2002). “Fuzzy 98TH8468), pages 3–11. IEEE.
support vector machines”. IEEE transactions on
neural networks, 13(2):464–471.
[21] Liu, J.-X., Li, J., and Tan, Y.-J. (2005). “An
empirical assessment on the robustness of support
vector regression with different kernels”. In 2005
International Conference on Machine Learning and
Cybernetics, volume 7, pages 4289–4294. IEEE.
[22] Mangasarian, O. L. and Musicant, D. R. (2001).
“Lagrangian support vector machines”. Journal of
Machine Learning Research, 1(Mar):161–177.
[23] Mukherjee, S., Osuna, E., and Girosi, F. (1997).
“Nonlinear prediction of chaotic time series using
support vector machines”. In Neural Networks for
Signal Processing VII. Proceedings of the 1997 IEEE
Signal Processing Society Workshop, pages 511–
520. IEEE.
[24] Nanthakumaran, P. and Tilakaratne, C. (2017).
“A comparison of accuracy of forecasting models: A
study on selected foreign exchange rates”. In 2017
Seventeenth International Conference on Advances