0% found this document useful (0 votes)
12 views6 pages

MVPJES DecisionSupportSystemforInvestmentinStockMarketusingOAA-SVM

The document presents a decision support system for stock market investment using the One-Against-All Support Vector Machine (OAA-SVM) algorithm, aimed at improving prediction accuracy for stock prices. It discusses the importance of technical analysis and machine learning techniques in predicting stock trends and provides a framework for data processing, prediction, and visualization. The proposed system utilizes historical data from the NSE and BSE, incorporates various technical indicators, and aims to assist investors in making informed trading decisions.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views6 pages

MVPJES DecisionSupportSystemforInvestmentinStockMarketusingOAA-SVM

The document presents a decision support system for stock market investment using the One-Against-All Support Vector Machine (OAA-SVM) algorithm, aimed at improving prediction accuracy for stock prices. It discusses the importance of technical analysis and machine learning techniques in predicting stock trends and provides a framework for data processing, prediction, and visualization. The proposed system utilizes historical data from the NSE and BSE, incorporates various technical indicators, and aims to assist investors in making informed trading decisions.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

MVP Journal of Engineering Sciences, Vol 1(1), DOI: 10.

18311/mvpjes/2018/v1i1/18256, June 2018 ISSN (Online) : to be Applied

Decision Support System for Investment in Stock


Market using OAA-SVM
Himanshu Shrimalve, Shreya Sulakhe, Madhavi Sontakke, Mayuri Thakare and S. A. Talekar*
NDMVPS’s KBT College of Engineering, Department of Computer Engineering, Nashik - 422013,
Maharashtra, India; [email protected]

Abstract
The investment in stock market could be high-risk. Because of the movement of a stock price depends on several factors,
such as currency exchange rate, economics situation, and flow of funds. In stock market, depending on a stock selection and
a suitable time on trading successful investors can earn maximum profits. Because of the financial crisis and scoring profits,
it is mandatory to have a secure prediction of the values of the stocks. Generally, investors use two Statistical techniques for
making a decision, which are the fundamental analysis and the technical analysis and many no of machine learning models
have been investigated for stock prediction such as Genetic Algorithm (GA), Support Vector Machine (SVM) and Neural
Network (NN). In proposed system, we will use the binary tree SVM algorithm which is one of the mainstream algorithms
for multi-class classification in the fields of pattern recognition and machine learning. In order to reduce the training and
testing time of system, One-Against-All SVM (OAA-SVM) algorithms will be proposed for multi-class classification.

Keywords: Hyper-Plane, Optimization, EMA, MACD, OAA, RSI, SVM

1. Introduction (buying or selling) to investors. Furthermore, technical


analysis is able to generate technical indicators in order to
The Indian stock market is considered to be one of the ear- understand trends of stock price and the momentum of
liest in Asia, which is in operation since 1875. However, buying and selling a stock, which is represented by a stock
it remained largely outside the global integration process chart. Artificial Intelligence (AI) which is a technique to
until 1991. Stock market prediction is the act of trying to increase intelligence on the information system has been
determine the future value of a company stock or other developed continuously. Machine Learning (ML), which
financial instruments traded on an exchange. The suc- is an AI tool, can be employed to learn and recognize
cessful prediction of a stock’s future price could yield related data patterns on the classification problems. It can
significant profit. The efficient market hypothesis suggests be also applied for solving problems in a stock market.
that stock prices reflect all currently available information Currently, there are several types of ML model used such
and any price changes that are not based on newly revealed as Support Vector Machines (SVM). The model has used
information thus are inherently unpredictable. We are the preprocessed data set of closing value of NSE and BSE
using Technical analysis technique to enhance investors India First, we will take dataset from NSE & BSE India
for trading, it is a statistical technique using an open- Official website which contains historical stock informa-
ing price, a closing price and a volume in each day for tion of various industries. Then by using real time values
stock trading. This technique can provide a trading signal of stocks and News the algorithm i.e. SVM will generate

*Author for correspondence


Decision Support System for Investment....

the correct predicted values and graph or chart which will OAA-Neural Network for classifying the stock data into
be prediction of stock of specific company and helping 3 different classes such as, buying data, selling data and
Investors for making decision. We are using ML tech- holding data. But there are several limitations that, train-
nique because it will automatically predict the results that ing time required for neural network are more, it required
company shares are good to buy/sell or not. So that cus- large memory to store the data and neural network not
tomer will get basic idea related to company’s stock value. suitable for large dataset3.
Customer will see prediction and will decide to invest his Binoy B. Nair, N. Mohana Dharini, V.P. Mohandas
money into specific company. proposed a system “Hybrid Decision tree and Neuro-
Fuzzy” which has Large searching time and large memory
required6.
2. Related Work QIU Mingyue, LI Cheng, SONG Yu proposed a sys-
In day to day life many peoples make invest in stocks, tem “Hybrid Genetic Algorithm and Artificial Neural
but some people have not get sufficient knowledge about Network” which has high convergence rate4.
stock due to which people have lost their money in stocks. To overcame the drawbacks of all above system we will
There are many myths related about investing in stock. use the technique OAA-SVM invented by Xiaowei Yang,
To give people sufficient knowledge and analysis of stock Qiaozhen Yu, Lifang He, Teng Jiao Guo, their proposed
many researchers had contributed their knowledge and a system “The one-against-all partition based binary tree
came up with the solution. support vector machine algorithms for multi-class clas-
Radu Iacomin, proposed a system “Stock Market sification” will be useful for classifying various dataset2.
Prediction” which will use various machine learning We will use this technique in to develop our system which
algorithm such as Support Vector Machine with feature will classify data in 3 classes such as, buying data, sell-
selection algorithm but this technique will be suitable for ing data and holding data. As we will combine Support
only single class classification1. Vector Machine with One-Against-All multiclass classifi-
Sabaithip Boonpeng, Piyasak Jeatrakul pro­posed a cation algorithm it will give an optimal solution with less
system “Decision Support System for Investing in Stock training and testing time and requires less space to store
Market by using OAA-Neural Network” which will use the data. It is summarized in the Table 1.

Table 1. Related work


Title Year Technology Used Limitations
Stock Market Prediction IEEE (2016) SupportVector SingleClass
Machine classification
technique
Decision Support System for Investing in 2016 OAA-Neural More training time required.Large
Stock Market by using Network memory to store data.Not suitable
OAA-Neural Network for large
datasets.
Multi-class pattern ResearchGate (2006) Artificial Neural Ambiguityand uncovered space
classification using Network regions.
neural networks
A Stock market trend IEEE (2016) HybridDecision Largesearching timeand large
prediction system using a hybrid decision tree andNeuro-Fuzzy Memoryrequired.
tree-neuro-fuzzy system
Application of the IEEE (2016) Hybrid Genetic Highconvergence
Artificial Neural Network in predictingthe Algorithm and rate
direction of stockmarket index Artificial Neural
Network

2 Vol 1(1) | June 2018 | www.informaticsjournals.com/index.php/mvpjes/index MVP Journal of Engineering Sciences


Himanshu Shrimalve, Shreya Sulakhe, Madhavi Sontakke, Mayuri Thakare and S. A. Talekar

3. Proposed Framework • Prediction System Module


This module fetches the input data/stock from NSE/BSE
For giving advice by predicting prices in stock mar- India according to user requirements. Then it will nor-
ket, this method applies on 2 years of data which is malize the data using technical indicators. After that data
retrieved from NSE and BSE India. As the architectural will be divided into training and testing data for better
design shows, we first extract the data into datasets accuracy, using cross-validation technique. Training
from the NSE and BSE India. Then we calculate the dataset will be given to algorithm (OAA-SVM) for classi-
value of technical indicators such as RSI, MACD, SOT. fying and predicting the stock values i. e (Buying, Holding
From this the data preprocessing is performed. The and Selling class).
data is divided into training and testing datasets. After
the training database, data is extracted and then it is • Graphical or Spreadsheet Representation Module
normalized to create input dataset. Using the cross- After Prediction of classes of stock, data will be displayed
validation technique, the datasets which is divided on spreadsheet or in graphical format for better user
into training and testing data goes to the SVM model. interface and understanding.
This process is performed by the training phase and
the remaining part is for testing phase to increase the • News Monitoring Module
performance. Together the training and testing phase, News monitoring module will fetch the daily news
SVM plays an important role to improve the accuracy updates related to stocks, which drastically affects the
followed by the prediction. After this process, the final stock values. This module will be helpful for user to give
output is displayed in the graphical form or spread- an idea for future condition of stock.
sheet form.
• Analysis Module
In analysis module classified data will be given to OAA-
SVM testing which will predict in which company stocks
user has to be invest.

• Data Storing Module


Data storing module stores the historical data and news
which will be access by user.

4. Mathematical Model
Let S be a system such that, S= {I, F, O}
Where I = Set of Inputs.
I = {I1, I2}
I1 = Historical data from NSE India.
I2 = Personalized data set.
Where F = set of functions.
F = {F1, F2, F3, F4, F5}
F1 = Function for Extraction of Real Time data
F2 = Function for Data Normalization
F3 = Function for Data Analysis
F4 = Function for Training and Testing System
Figure 1. Architecture of proposed system. F5 = Function for Decision Making
Where O = set of outputs, O = {O1, O2, O3}
The proposed system will be divided into several inde- O1 = Prediction of stock Exchange
pendent modules: O2 = Graphical representation i.e. Pie Charts

Vol 1(1) | June 2018 | www.informaticsjournals.com/index.php/mvpjes/index MVP Journal of Engineering Sciences 3


Decision Support System for Investment....

D% line = 3 period moving average of % K line(5.1.4)


Stochastic technique indicates trading signals when % K
line and %D line are across each other above 80 or below
20. The experiment results which include the buying and
the selling signal are shown in Figure 6. The selling signal
is generated when %K line and %D line across each other
above 80 while the buying signal is indicated when %K
line and %D line across each other below 20.

Figure 2. Mathematical Model. 5.1.3 Moving Average Convergence and


Divergence (MACD)
5. Algorithmic Solution MACD technique is proposed by Gerald Appel. This
technique can indicate trading signals (buying and sell-
We will follow the following methodology for developing ing) and also the trends of a stock price (upward trend,
our proposed system. downward trend and sideway trend). MACD technique
Step 1: Fetch data of stock from NSE of last 2 years. indicates trading signal based on the difference of two
Step 2: Calculate the value of Technical indicators such moving average lines. These are 12 days and 26 days.
as, RSI, MACD, SOT etc. MACD value is calculated by the following formula3.
Step 3: Train model using these indicators and training MACD Line = EMA(12) – EMA(26)(5.1.5)
dataset (Using OAA-SVM Algorithm).
Step 4: Test the model using testing dataset (Using OAA- MACD technique indicates trading. When MACD crosses
SVM Algorithm). over zero line, the buying signal is indicated and the trend
Step 5: Evaluate system using various evaluation tech- of stock price is starting an upward trend. While MACD
niques. crosses under zero line, the selling signal is generated and
the downward trend is beginning
5.1 Technical Indicators
5.1.1 Relative Strength Index (RSI) 5.2 Classification Algorithm
RSI indicates trading signal based on the relationship of 5.2.1 Support Vector Machine (SVM)
stock price in the current day and stock price in the past Support Vector Machine (SVM) is Supervised Learning
period. RSI value can be calculated by the following for- technique of Machine Learning (ML). It analyzes the data
mula:3. and also recognize the patterns, which are used for regres-
sion and classification analysis. SVM training algorithm
RSI = 100 – [100 / 1 + RS] (5.1.1) builds a model that assigns new examples to one category
or the other, making it a non-probabilistic binary linear
RS = Average Of 14 days closes
classifier. An SVM model is a representation of the exam-
up / Average Of 14 days closes up(5.1.2)
ples as points in space, mapped so that the examples of
the separate categories are divided by a clear gap that is as
5.1.2 Stochastic Oscillatory Technique (SOT)
wide as possible. New examples are then mapped into that
Stochastic Oscillator technique compares the current same space and predicted to belong to a category based
close price of a stock with its price range over a period on which side of the gap they fall.
in the past. It uses two lines for generating trading signal, SVM builds hyper-plane or set of hyper-planes, which
which are %K line and %D line. These lines are calculated can be used for regression and classification. Good sepa-
by the following formula:3. ration is done by hyperplane that also has largest distance,
K% line = 100 – (Receentcloses – if margin is higher generalization of error of classifier is
LowestLow(n)) / (HighestHigh(n) – LowestLow)(5.1.3) lower8.

4 Vol 1(1) | June 2018 | www.informaticsjournals.com/index.php/mvpjes/index MVP Journal of Engineering Sciences


Himanshu Shrimalve, Shreya Sulakhe, Madhavi Sontakke, Mayuri Thakare and S. A. Talekar

• Equation of attributes lies below the hyperplane:


H2: W0 + W1.X1 + W2. X2 ≤ –1 (5.2.4)
• Combining equation of attribute above hyperplane
(H1) and below the hyperplane (H2), we got an equa-
tion given below:
Yi(W0 + W1.X1 + W2. X2) ∀i
• Maximum Marginal Hyperplane (MMH) given by,

2
|| w || = Eucledian norm of "W " (5.2.5)
|| w ||
Figure 3. Support Vector Machine.
ii. One Against All – Support Vector Machine
Mathematical Equations (OAA-SVM)
OAA-SVM algorithm is useful to divide the dataset into
• For 2D dataset let, ‘n’ no of classes. This algorithm overcomes the drawback
of SVM, which only suitable to divide data into 2 classes.
D is the dataset containing {xi, yi} no of tuples where,
OAO-SVM needs to construct C(C-1)/2 SVM models
xi = Set of attributes/tuples where each one is trained on data points from two classes.
yi = Set of classes For the training data points from the ith class and the jth
As, dataset is 2D, yi = +1/–1 class, we need to solve the following binary classification
• Equation of hyperplane: problem2.
w.x + b = 0 Where,(5.2.1)

w = Weight vector (Distance of attribute from hyperplane)


x = No of Attribute
b = Scalar/ Bias

Figure 4. Maximum Margin of Hyperplane Figure 5. Conceptual map of OAA-SVM.

• Equation of attributes lies on hyperplane: 1 l


wij, bij, ζ )
Min j(= (wij)T .wij + γ ∑ ζ tij (5.2.6)
W0 + W1.X1 + W2. X2 = 0 (5.2.2) 2 i =1

• Equation of attributes lies above the hyperplane: ij


(wij)T Φ( Xt ) + bij ≥ 1 − ∑Yt =i (5.2.7)
H1: W0 + W1.X1 + W2. X2 ≥ 0 (5.2.3) t

Vol 1(1) | June 2018 | www.informaticsjournals.com/index.php/mvpjes/index MVP Journal of Engineering Sciences 5


Decision Support System for Investment....

7. References
ij
(wij)T Φ( Xt ) + bij ≥ 1 + ∑Yt =i (5.2.8) 1. RaduIacomin. Stock Market Prediction. Romani:
t
Faculty of Automatic Control and Computers University
POLITEHNICA of Bucharest.
Where,
2. Xiaowei Yang, Qiaozhen Yu, Lifang He, Teng Jiao Guo.
ij
The one-against-all partition based binary tree support
∑Yt ≥ 0, t =
t
1………l
vector machine algorithms for multi-class classification.
Guangzhou 510641, PR China: School of Computer Science
and Engineering, South China University of Technology.
3. Sabaithip Boonpeng and Piyasak Jeatrakul. Decision
6. Conclusion Support System for Investing in Stock Market by using
Our proposed system Decision Support System for OAA-Neural Network. Chiang Rai: School of Information
Technology Mae Fah Luang University Muang.
Investing in Stock Market Using OAA-SVM, and we are
4. Qiu Mingyue, Li Cheng, Song Yu. Application of the
using ML technique because it will automatically pre-
Artificial Neural Network in predicting the direction of
dict the results that company shares are good to buy/sell stock market index. Fukuoka, Japan: Department of System
or not. We are going to develop system for investors as Management, Fukuoka Institute of Technology.
the successful prediction of a stock’s future price could 5. Guobin Ou, Yi Lu Murphey. Multi-class pattern classifica-
yield significant profit. The market hypothesis suggests tion using neural networks. Dearborn, USA: Department
that stock prices reflect all currently available informa- of Electrical and Computer Engineering, The University of
tion and any price changes that are not based on newly Michigan-Dearborn.
revealed information thus are inherently unpredictable. 6. Binoy B Nair, Mohana Dharini N, Mohandas VP. A Stock
A model has been used in predicting the direction of the market trend prediction system using a hybrid decision
movement of the closing value of the index. The model tree-neuro-fuzzy system. Coimbatore - 641105, Tamilnadu,
can be used to predict price index value of the stock India: Department of Electronics and Communication
Engineering, Amrita School of Engineering, Amrita Vishwa
market and it used the preprocessed data set of closing
Vidyapeetham.
value of NSE and BSE India. So that customer will get
7. Dan Pilone, Neil Pitan. UML 2.0 IN A NUTSHELL A
basic idea related to company’s stock value. Customer
Desktop Quick Reference.
will see prediction and will decide to invest his money 8. Jiawei Han, Micheline Kamber, Jian Pie. Data Mining
into specific company. Concepts and Techniques.

6 Vol 1(1) | June 2018 | www.informaticsjournals.com/index.php/mvpjes/index MVP Journal of Engineering Sciences

You might also like