Neural Network and Neuro Fuzzy Model for Forecasting Equity Market Data

Similar documents
Analysis of Hybrid Soft and Hard Computing Techniques for Forex Monitoring Systems

Evolutive Neural Net Fuzzy Filtering: Basic Description

Kamaldeep Kaur University School of Information Technology GGS Indraprastha University Delhi

Python Machine Learning

Learning Methods for Fuzzy Systems

A Neural Network GUI Tested on Text-To-Phoneme Mapping

Course Outline. Course Grading. Where to go for help. Academic Integrity. EE-589 Introduction to Neural Networks NN 1 EE

Module 12. Machine Learning. Version 2 CSE IIT, Kharagpur

The Method of Immersion the Problem of Comparing Technical Objects in an Expert Shell in the Class of Artificial Intelligence Algorithms

Artificial Neural Networks written examination

Artificial Neural Networks

BUSINESS INTELLIGENCE FROM WEB USAGE MINING

Early Model of Student's Graduation Prediction Based on Neural Network

Knowledge-Based - Systems

Time series prediction

Classification Using ANN: A Review

Test Effort Estimation Using Neural Network

The 9 th International Scientific Conference elearning and software for Education Bucharest, April 25-26, / X

FUZZY EXPERT. Dr. Kasim M. Al-Aubidy. Philadelphia University. Computer Eng. Dept February 2002 University of Damascus-Syria

ENME 605 Advanced Control Systems, Fall 2015 Department of Mechanical Engineering

arxiv: v1 [cs.lg] 15 Jun 2015

Soft Computing based Learning for Cognitive Radio

Evolution of Symbolisation in Chimpanzees and Neural Nets

Ph.D in Advance Machine Learning (computer science) PhD submitted, degree to be awarded on convocation, sept B.Tech in Computer science and

Assignment 1: Predicting Amazon Review Ratings

I-COMPETERE: Using Applied Intelligence in search of competency gaps in software project managers.

QuickStroke: An Incremental On-line Chinese Handwriting Recognition System

INPE São José dos Campos

A Reinforcement Learning Variant for Control Scheduling

Dinesh K. Sharma, Ph.D. Department of Management School of Business and Economics Fayetteville State University

Machine Learning and Data Mining. Ensembles of Learners. Prof. Alexander Ihler

Lecture 1: Machine Learning Basics

Lecture 10: Reinforcement Learning

Softprop: Softmax Neural Network Backpropagation Learning

Seminar - Organic Computing

On the Formation of Phoneme Categories in DNN Acoustic Models

OPTIMIZATINON OF TRAINING SETS FOR HEBBIAN-LEARNING- BASED CLASSIFIERS

HIERARCHICAL DEEP LEARNING ARCHITECTURE FOR 10K OBJECTS CLASSIFICATION

Neuro-Symbolic Approaches for Knowledge Representation in Expert Systems

Human Emotion Recognition From Speech

School of Innovative Technologies and Engineering

Axiom 2013 Team Description Paper

CSL465/603 - Machine Learning

Framewise Phoneme Classification with Bidirectional LSTM and Other Neural Network Architectures

Unsupervised Learning of Word Semantic Embedding using the Deep Structured Semantic Model

Deep search. Enhancing a search bar using machine learning. Ilgün Ilgün & Cedric Reichenbach

CS Machine Learning

Machine Learning from Garden Path Sentences: The Application of Computational Linguistics

*** * * * COUNCIL * * CONSEIL OFEUROPE * * * DE L'EUROPE. Proceedings of the 9th Symposium on Legal Data Processing in Europe

Using the Attribute Hierarchy Method to Make Diagnostic Inferences about Examinees Cognitive Skills in Algebra on the SAT

A study of speaker adaptation for DNN-based speech synthesis

Modeling function word errors in DNN-HMM based LVCSR systems

Computerized Adaptive Psychological Testing A Personalisation Perspective

DIRECT ADAPTATION OF HYBRID DNN/HMM MODEL FOR FAST SPEAKER ADAPTATION IN LVCSR BASED ON SPEAKER CODE

System Implementation for SemEval-2017 Task 4 Subtask A Based on Interpolated Deep Neural Networks

Reduce the Failure Rate of the Screwing Process with Six Sigma Approach

The Good Judgment Project: A large scale test of different methods of combining expert predictions

A New Perspective on Combining GMM and DNN Frameworks for Speaker Adaptation

STA 225: Introductory Statistics (CT)

Knowledge based expert systems D H A N A N J A Y K A L B A N D E

Dublin City Schools Mathematics Graded Course of Study GRADE 4

Issues in the Mining of Heart Failure Datasets

Learning Optimal Dialogue Strategies: A Case Study of a Spoken Dialogue Agent for

Lecture 1: Basic Concepts of Machine Learning

Testing A Moving Target: How Do We Test Machine Learning Systems? Peter Varhol Technology Strategy Research, USA

Learning to Schedule Straight-Line Code

Word Segmentation of Off-line Handwritten Documents

Knowledge Transfer in Deep Convolutional Neural Nets

Circuit Simulators: A Revolutionary E-Learning Platform

(Sub)Gradient Descent

Probability and Statistics Curriculum Pacing Guide

A SURVEY OF FUZZY COGNITIVE MAP LEARNING METHODS

Rule Learning With Negation: Issues Regarding Effectiveness

Rule Chaining in Fuzzy Expert Systems

Modeling function word errors in DNN-HMM based LVCSR systems

An OO Framework for building Intelligence and Learning properties in Software Agents

Interaction Design Considerations for an Aircraft Carrier Deck Agent-based Simulation

A student diagnosing and evaluation system for laboratory-based academic exercises

Comparison of EM and Two-Step Cluster Method for Mixed Data: An Application

Using the Artificial Neural Networks for Identification Unknown Person

An empirical study of learning speed in backpropagation

Australian Journal of Basic and Applied Sciences

Introduction to Ensemble Learning Featuring Successes in the Netflix Prize Competition

ME 443/643 Design Techniques in Mechanical Engineering. Lecture 1: Introduction

Speaker Identification by Comparison of Smart Methods. Abstract

Grade 6: Correlated to AGS Basic Math Skills

Bluetooth mlearning Applications for the Classroom of the Future

Detailed course syllabus

An Online Handwriting Recognition System For Turkish

EECS 571 PRINCIPLES OF REAL-TIME COMPUTING Fall 10. Instructor: Kang G. Shin, 4605 CSE, ;

Master s Programme in Computer, Communication and Information Sciences, Study guide , ELEC Majors

SINGLE DOCUMENT AUTOMATIC TEXT SUMMARIZATION USING TERM FREQUENCY-INVERSE DOCUMENT FREQUENCY (TF-IDF)

Applied Research in Fuzzy Technology

MASTER OF SCIENCE (M.S.) MAJOR IN COMPUTER SCIENCE

Predicting Student Attrition in MOOCs using Sentiment Analysis and Neural Networks

Learning Structural Correspondences Across Different Linguistic Domains with Synchronous Neural Language Models

University of Groningen. Systemen, planning, netwerken Bosman, Aart

Bluetooth mlearning Applications for the Classroom of the Future

Semi-Supervised GMM and DNN Acoustic Model Training with Multi-system Combination and Confidence Re-calibration

SAM - Sensors, Actuators and Microcontrollers in Mobile Robots

Transcription:

Neural Network and Neuro Fuzzy Model for Forecasting Equity Market Data 1* Berna Seref and 2 Necaattin Barisci *1 Faculty of Engineering, Department of Computer Engineering Dumlupinar University, Turkey 2 Faculty of Technology, Department of Computer Engineering Gazi University, Turkey Abstract The prediction of future events is done by using various form of models. In this study, equity market data prediction is developed based on neural network and neuro fuzzy model by using the past equity market data. The analysis of the two models is performed by using the same input and output data which is obtained from http://borsaistanbul.com/en/data/data/equity-market-data/bulletin-data. System is trained, fuzzy rules are discovered and future predictions are made. Accuracy of these two models is compared. Key words: Neural network model, neuro fuzzy model, fuzzy rules, predictions 1. Introduction Equity market data prediction has a big importance for the people who are interested in investment and trade. It is very hard to predict this data for the reason that it is affected in a positive or negative way from the events such as economic condition, political situation, traders expectations and catastrophes [1]. This situation causes equity market data to become dynamic, nonlinear and complex. However, by using artificial intelligent algorithms and methods such as regression, artificial neural networks (ANN), fuzzy logic (FL) and genetic algorithms, this data can be analyzed and learnt from it to make future predictions. During the last years, stock market data prediction is done with various algorithms. For example, in a study, it is predicted by using Neuro Fuzzy Inference System and outputs are found with an accuracy rate of 98.3% [2]. In other study, genetic algorithm is used to determine connection weights for artificial neural networks with the aim of predicting stock price index [3]. In this study, Artificial Neural Networks (ANN) and Neuro Fuzzy Systems are used to contruct two models in order to predict equity market data and compare efficiency of these models. In order to construct these models, as an input and output, historical data which is obtained from http://borsaistanbul.com/en/data/data/equity-market-data/bulletin-data for three months is used. For the first model, data is trained and predictions are made by using Neural Networks Tool (NNTool). For the second model, Adaptive Neuro Fuzzy Inference System (ANFIS) is used, data is trained by using back propagation algorithm and then tested. The rest of the paper is structured as follows. In section 2, background about Artificial Neural Networks (ANN), Fuzzy Logic (FL), Neural Networks Tool (NNTool) and Adaptive Neuro *Corresponding author: Address: Faculty of Engineering, Department of Computer Engineering Dumlupinar University, 43100, Kutahya TURKEY. E-mail address: berna.seref@dpu.edu.tr.

B. SEREF et al./ ISITES2014 Karabuk - TURKEY 670 Fuzzy Inference System (ANFIS) Tool is given. Then, for the first model, system is trained by using Neural Networks Tool (NNTool) and for the second model, system is trained by using Neuro Fuzzy Inference System (ANFIS) tool. After that, predictions are made. In section 3, results of these predictions are given. In section 4, these results are compared. Finally, conclusions of the study is summarized and future directions of work is explained. 2. Materials and Method In this study, prediction of equity market data is based on neural network and neuro fuzzy inferences system back propagation algorithm. Inputs are carried on Neural Networks Tool (NNTool) and Neuro Fuzzy Inference System (ANFIS) Tool and equity market data for 15 days is predicted. Artificial Neural Networks (ANN) are developed to examine and mimic central nervous system, especially brain. It consists of interconnected neurons or nodes which receive input signal from other nodes or external stimuli, process transformed output by using some functions, and send it to other neurons or final result [4]. Number of layers, number of nodes in each layer and connection between them identify architecture of network. Multi Layer Perceptron (MLP) which is used in this study as an ANN form consists of input layer, output layer and hidden layer. Input layer receives external information, output layer produces solution of this network, hidden layer which is between input layer and output layer enables to create complex models, and discover non-linear dependencies between input and predicted data [5]. Fuzzy Logic was introduced by Lotfi A. Zadeh in the year of 1965 [6], the reason of creating fuzzy logic is representing data which is imprecision and not clearly defined [7]. Fuzzy logic variables may have a membership value which is 0, 1 and any value between 0 and 1. As a result, basis for approximate reasoning is provided [8]. In this study, as a fuzzy inference system, Takagi-Sugeno system is used. Thus, output is lineer or constant. In addition, to train fuzzy inference system, backpropagation optimization method is chosen. Backpropagation algorithm consists of two stages which are forward and backward. In forward stage, signal is fed in a forward manner until getting the output. After that, in backward stage, error which is difference between desired output and actual output is calculated [9]. Then, this error is propagated to the connections by adjusting connection weights with the aim of decreasing magnitude of error and train network. Neural Network Toolbox helps creating, training and simulating neural networks by providing many functions and applications. Neural Network Toolbox supports both supervised and unsupervised learning and can be used for data fitting, time-series prediction and clustering [10]. Neural Networks Tool (NNTool) is one of the Graphical User Interface (GUI) tools included in Neural Network Toolbox [11]. In this study, by using this tool, firstly input, output and target data is loaded to the system. Then, network type, training function, adaption learning function, performance function and number of layers are chosen. As a result, a neural network is created. After that, this network is trained, and performance and regression of this network is examined.

B. SEREF et al./ ISITES2014 Karabuk - TURKEY 671 The Adaptive Network-based Fuzzy Inference System (ANFIS) is a fuzzy inferences system that uses ANN to determine fuzzy rules and fuzzy membership functions [12]. In other words, it is the combination of fuzzy logic and neural network which are two powerful paradigms [13]. Takagi-Sugeno type fuzzy system with two inputs and one output is shown in Figure 1. This network contains five distinct layers which makes it multi-layer network. Figure 1. The ANFIS structure In this study, ANFIS is used to predict equity market data for 15 days by using historical data. In order to form a forward network structure, Takagi-Sugeno fuzzy system is used. As a training fuzzy inference system optimization method, backpropagation algorithm is chosen. 2.1. Theory/calculation Equity market daily bulletin which is first session data of a bank is obtained from the address of http://borsaistanbul.com/en/data/data/equity-market-data/bulletin-data. Training data is belongs to a period of 90 days starting from September 12, 2013 to January 24, 2014. Checking data is belongs to a period of 15 days starting from January 27, 2014 to February 14, 2014. Training data consists of 90 pairs. Each pair has 3 inputs and 1 output. Checking data consists of 15 pairs, each pair of this data has 3 inputs and 1 output. While opening price, the lowest price and the highest price are used as an input, closing price is used as an output. NNTool is used to simulate and analyze the network for Neural Network Model. ANFIS is used for Neuro Fuzzy Model. Equity market daily bulletin first session data for 15 days is predicted. 2.1.1 Neural Network Model For this model, firstly system is trained by using 90 pairs of input data and 90 target data. Then, equity market daily bulletin first session data is predicted for 15 days.

B. SEREF et al./ ISITES2014 Karabuk - TURKEY 672 As a network type feed-forward backpropagation is chosen. In order to train system Levenberg- Marquardt (TRAINLM) function, to adapt learning function LEARNGDM function which refers to gradient descent with momentum weight and bias learning [14], as a performance function Mean Squared Error (MSE), as a transfer function PURELIN functions are used. Network is created with 2 layers which is shown in Figure 2 and with features that mentioned above. Then, system is trained. After training the system, new inputs are loaded to the system to predict outputs of them and predictions are made. 2.1.2. Neuro Fuzzy Model Figure 2. Skeleton of neural network Training and checking data is loaded to the system. To partition input space and construct Fuzzy Inference System (FIS), grid partition method and subtractive clustering method are used. For grid partition method 27 rules, for subtractive clustering method 3 rules are constructed by ANFIS automatically. For both methods, system is trained by using backpropagation algorithm for 100 epochs with no error tolerance. For grid partition method, performance of system is examined by using trimf, trapmf, gbellmf, gaussmf, gauss2mf, pimf, dsigmf and psigf Membership Function (MF) Types. Then, MF Type which gives the best result is chosen to compare performance of system with the performance when subtractive clustering method is used. After that, in order to partition input space and construct FIS, subtractive clustering method is experimented with the features that range of influence is 0.5, squash factor is 1.25, accept ratio is 0.5 and reject ratio is 0.15. Finally, the best method is chosen for Neuro Fuzzy Model to compare efficiency of the network with Neural Network Model. Then, predictions are made. 3. Results In this study, predictions of equity market daily bulletin first session data for 15 days are made by using NNTool and ANFIS which are based on Neural Network Model and Neuro Fuzzy Model.

B. SEREF et al./ ISITES2014 Karabuk - TURKEY 673 For Neuro Fuzzy Model, performance of grid partition method by using gaussmf MF Type showed better performance with average testing error 0.050028 between other MF Types which are trimf, trapmf, gbellmf, gauss2mf, pimf, dsigmf and psigf. On the other hand, for Neuro Fuzzy Model, it is observed that when subtractive clustering method is used instead of grid partition method in order to generate FIS, performance of the system is improved with the average testing error 0.026273. Because of this reason, subtractive clustering method is used for Neuro Fuzzy Model in order to compare performance of the system with Neural Network Model. At the end of the experiment, it is observed that prediction performance of Neural Network Model is better then Neuro Fuzzy Model s with the lower mean squared error. Details of experiment is explained below. For Neural Network Model, best validation performance is achieved at epoch 5 with the value of 0.00053677 which is shown in Figure 3. Regression of the training is shown in Figure 4. Figure 3. Performace of the system Figure 4. Regression

B. SEREF et al./ ISITES2014 Karabuk - TURKEY 674 For Neuro Fuzzy Model, when grid partition method is used to construct FIS and as a Membership Function (MF) Type trimf, trapmf, gbellmf, gaussmf, gauss2mf, pimf, dsigmf, psigf are experimented, it is observed that for this example and for grid partition method, gaussmf MF Type gives the best result with average testing error 0.050028. Gbellmf, pimf, trim, gauss2mf, tramp, dsigmf and psigmf MF Types followed gaussmf MF Type with the average testing errors 0.074333, 0.25361, 0.49829, 0.61863, 0.83945, 0.86431 and 0.86432. Because of its better performance, gaussmf MF Type is chosen for grid partition method. FIS is generated. Backpropagation optimization algorithm is chosen as an optimization method, system is trained with no error tolerance for 100 epochs and as it is shown in Figure 5, error for 100 th epoch is found 0.045022. Figure 5. Training error When FIS output is checked against checking data which is loaded to the system before, Figure 6 is obtained. As it is seen, when grid partition method is used with gaussmf MF Type and system is trained by using backpropagation algorithm for 100 epochs with no error tolerance, average error tolerance testing error is 0.050028.

B. SEREF et al./ ISITES2014 Karabuk - TURKEY 675 Figure 6. Plotting checking data aganist FIS output When subtractive clustering method is chosen to generate FIS with the features that range of influence is 0.5, squash factor 1.25, accept ratio 0.5 and reject ratio 0.15, training error and average testing error decreases greatly as it is shown in Figure 7 and Figure 8. Figure 7. Training error

B. SEREF et al./ ISITES2014 Karabuk - TURKEY 676 Figure 8. Plotting checking data aganist FIS output For the reason that average testing error of subtractive clustering method is lower, it is chosen to generate FIS for Neuro Fuzzy Model. After that, outputs are predicted based on Neural Network and Neuro Fuzzy Models. Actual output, predicted output by NNTool and predicted output by ANFIS are listed in Table 1. According to these results, to find the best model which predicts more close to actual output, mean squared errors between actual data and predicted data that produced by NNTool and ANFIS are calculated. While mean squared error for Neural Network Model is found 0.002010361, mean squared error for Neuro Fuzzy Model is found 0.010864294. According to these results, it can be said that Neural Network Model gives better results for this sample.

B. SEREF et al./ ISITES2014 Karabuk - TURKEY 677 Table 1. Predicted Outputs Produced by NNTool and ANFIS Actual Output Predicted Output Calculated by NNTool Predicted Output Calculated by ANFIS 2.58 2.5950 2.6082 2.62 2.6235 2.6384 2,59 2.6236 2.6247 2.56 2.5732 2.5967 2.59 2.5743 2.5997 2.55 2.5835 2.5808 2.59 2.5387 2.5565 2.54 2.5381 2.5762 2.59 2.5634 2.5875 2.64 2.6632 2.6828 2.63 2.6196 2.6317 2.65 2.6472 2.6702 2.63 2.6490 2,6549 2.61 2.6143 2,6228 2.64 2.6153 2.6330 4. Discussion It is very hard to predict equity market data because of its dynamic, nonlinear and complex behavior. In this study, prediction of these data is done by using Neural Network Model and Neuro Fuzzy Model. It is seen that performance of Neural Network Model is better than Neuro Fuzzy Models. Conclusions In this study, prediction of equity market data which is based on neural network and neuro fuzzy inferences system is done by using NNTool and ANFIS on matlab platform. The same training data which consists of 90 pairs and the same checking data which consists of 15 pairs are carried on NNTool and ANFIS. Predictions which are shown in Table 1 are done with these tools. Then, mean squared error between actual data and predicted data is calculated for these models. It is found that while mean squared error for Neural Network Model is 0.002010361, mean squared error for Neuro Fuzzy Model is 0.010864294. As a result, it is seen that Neural Network Model s predictions are more close to the actual outputs with lower mean squared error. As a future work, it is planned to create a system which is combination of Neural Network Model and Fuzzy Logic Model with the aim of improving prediction correctness of the system.

B. SEREF et al./ ISITES2014 Karabuk - TURKEY 678 References [1] Phichhang Ou, Hengshan Wang. Prediction of Stock Market Index Movement by Ten Data Mining Techniques. Modern Applied Science 2009;28:42. [2] Melek Acar Boyacioglu, Derya Avci. An Adaptive Network-Based Fuzzy Inference System (ANFIS) for the prediction of stock market return: The case of the Istanbul Stock Exchange, 2010;37: 7908-7912. [3] Kyoung-jae Kim, Ingoo Han. Genetic algorithms approach to feature discretization in artificial neural networks for the prediction of stock price index, 2000;19-125-132. [4] Guoqiang Zhang, B. Eddy Patuwo, Michael Y. Hu. Forecasting with artificial neural networks:: The state of the art. International Journal of Forecasting 1998;14:35-62. [5] Guoqiang Zhang, Michael Y. Hu, B Eddy Patuwo, Daniel C. Indro. Artificial neural networks in bankruptcy prediction: General framework and cross-validation analysis. European Journal of Operational Research 1999;116:16-32. [6] Zadeh, L. A. Fuzzy Sets, Information and Control, 1965;8-338-353. [7] Noel Garcia-Diaz, Cuauhtemoc Lopez-Martin, Arturo Chavoya. A Comparative Study of Two Fuzzy Logic Models for Software Development Effort Estimation. Procedia Technology 2013;7:305-314. [8] Kumru M. Assessing the visual quality of sanitary ware by fuzzy logic. Applied Soft Computing 2013;13:3646-3656. [9] Mostafa I. Soliman, Samir A. Mohamed. A highly efficient implementation of a backpropagation learning algorithm using matrix ISA. Journal of Parallel and Distributed Computing 2008;68: 949-961. [10] http://www.mathworks.com/products/neural-network/ 24.03.2014. [11] http://suraj.lums.edu.pk/~cs333s02/handouts/matlab_6.pdf 23.03.2014. [12] JANG, J.S.R. ANFIS: adaptive-network-based fuzzy inference system. IEEE Transactions on Systems, Man and Cybernetics 1993;23:665-685. [13] Mohsen Annabestani, Nadia Naghavi. Nonlinear identification of IPMC actuators based on ANFIS NARX paradigm. Sensors and Actuators A: Physical 2014;209:140-148. [14] Pietro Evangelista, Alan McKinnon, Edward Sweeney. Supply Chain Innovation for Competing in Highly Dynamic Markets: Challenges and Solutions. Business Science Reference 2011;page:343.