27.03.2014 Views

SEKE 2012 Proceedings - Knowledge Systems Institute

SEKE 2012 Proceedings - Knowledge Systems Institute

SEKE 2012 Proceedings - Knowledge Systems Institute

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

and if ss i (c) =0if was neutral (s i (c) =0). Finally, the<br />

prediction for this company’s stock is done as follows:<br />

{<br />

Pred(c) =<br />

up if ∑ i s i(c) > 0<br />

down if ∑ i s i(c) < 0<br />

The system can use the aforementioned algorithm and<br />

provide the user with predictions on whether specific stocks<br />

will go up or down. However, this data can be also used as<br />

input to predict the percentage change in the stock price.<br />

One approach would be to build a prediction model, using<br />

machine learning techniques such as decision trees or<br />

association rules, that will generate a set of rules linking the<br />

sentiment score of each company with a specific percentage<br />

change (range) in the stock price. To achieve that, a training<br />

process is needed, as described in Figure 2.<br />

The training of the system is performed as follows: for<br />

each company c the system starts by retrieving the latest<br />

news and generating a prediction Pred(c) as described<br />

above. This prediction is stored in the database. The system<br />

periodically retrieves the stock quotes for the same companies<br />

and stores the trend (up/down), as well as the percentage<br />

of stock change. It also classifies the previous prediction<br />

as accurate or not. The process is repeated until we<br />

have a statistically significant sample and sufficient prediction<br />

accuracy, in which case we can train the system to generate<br />

the rules.<br />

In order to generate rules, we can use appropriate machine<br />

learning techniques such as association rules or decision<br />

trees. The input to the algorithm is the company’s<br />

ticker (unique id), its sentiment score, and its prediction and<br />

the output is a set of rules correlating the aforementioned<br />

data with a percentage range that signifies the change of the<br />

stock (note that, in the case of association rules, we should<br />

keep only the rules that comply with this format). The rules<br />

are in turn stored in the database and can subsequently be<br />

used for real-time predictions of percentage changes.<br />

5 System Prototype<br />

Based on the proposed architecture, we built a system<br />

prototype. The Client was built using Android SDK and<br />

ADT plugin for Eclipse. It communicates with the Server<br />

using RESTful WebServices hosted on a cloud. The Prediction<br />

Engine and the Training Engine are written in Perl, and<br />

the Process Engine is written in Java. The database used is<br />

MySQL. For more technical details on the prototype’s design,<br />

the reader may refer to [4].<br />

The user interface was implemented especially to accommodate<br />

the limitations of a mobile application. The<br />

first time the user uses the application, he/she is asked to<br />

provide some personal data in the registration page. Once<br />

the registration is complete, the user has access to the afore-<br />

Figure 4. Company details for Appliance Recycling Centers<br />

of America (ARCI) stock<br />

mentioned functionality, through 5 menu options: Markets,<br />

MyProfile, News, Prediction, and Search.<br />

The News section allows the user to enter the company<br />

name or the ticker of the company whose news the user<br />

wants to search. If the text box is left empty, all financial<br />

news will appear, ordered by time (newest first).<br />

The Search section allows the user to search for stock<br />

quotes. The user may enter the company’s name or ticker<br />

symbol, or the first letters of any of the above. In the latter<br />

case, the user will be given the option to choose among the<br />

companies that match this description. Once a company is<br />

selected, the system shows the value of the company’s stock<br />

price, change in the stock, percentage change in the stock,<br />

as well as the volume of stocks traded. The user is then<br />

given the option to either buy, add to watch list, check the<br />

company-related news, or get the prediction for that company’s<br />

stock. An example is shown in Figure 4.<br />

The user’s activity can be reviewed from the MyProfile<br />

section. This section provides several options.<br />

The MyPortfolio tab allows the user to see details like<br />

their name, rank, amount of money in cash and equities,<br />

total current worth, as well as the stocks the user owns.<br />

Asample screen is shown in Figure 5. The Watchlist tab<br />

shows the stocks the user has put in his/her watch list. These<br />

17

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!