Overall System Architecture
Overall System Architecture
2. The Problem
The problem in brief can be stated as to develop a web based stock market
simulation, which is capable of providing up to date information about the stock
market, and the various stocks a user is interested in. It should also include
• User portfolio management
• Provide with stock history
The data does not have to be obtained from the actual stock market servers and
can be obtained from various web pages that are providing stock data to its
users. This would mean that the problem involves extracting data from a web
site, by looking at the HTML code of the page.
This project develops the software that supports online trading of stocks. The
overall design of the project includes objects such as user manager, stock
manager, transaction etc. The user portfolio manager maintains the details of
the customers that include their personal information. The stock manager
maintains information about the stocks where the transaction involves trading of
the stocks. Only authorized users have access to use this software and are
allowed to carry out transactions like buying and selling of stocks by interacting
with the Stock Exchange. The portfolios of the users are update regularly.
Security provisions are provided for these user accounts.
The terminology involved is briefly described here:
The stock can be defined as the security issued by a corporation that represents
ownership. The stocks can be traded in the market, but the trading has to be
done confirming to certain regulations laid down by the Government. The place
where such trading takes place is called the Stock Market. Each stock is
represented by a Symbol, which is unique. With advances in the technology, the
stock market has started to migrate into the Personal Computers through the
World Wide Web.
A scrolling display of current or recent security prices and/or volume.
3. Ticker Symbol
A system of letters used to uniquely identify a stock or mutual fund. Symbols with
up to three letters are used for stocks that are listed and trade on an exchange.
Symbols with four letters are used for NASDAQ stocks. Symbols with five letters
are used for NASDAQ stocks other than single issues of common stock. Symbols
with five letters ending in X are used for mutual funds.
A collection of investments, all owned by the same individual or organization.
Monitoring a collection a stocks, whether held in a real or imaginary portfolio, for
the purposes of learning how the prices move or profiting from those movements.
Usually done with software or via the Internet.
The number of shares, bonds or contracts traded during a given period, for a
security or an entire exchange.
Broker who deals primarily with transactions involving stock.
One who owns shares of stock in a corporation or mutual fund. For corporations,
along with the ownership comes a right to declare dividends and the right to vote
on certain company matters, including the board of directors.
The price of the last transaction for a given security at the end of a given trading
session also called as closing price.
The lowest price a security or commodity reached in a certain period of time,
usually a single trading session (here also called daily low).
The highest price that was paid for a security during a certain time period.
A benchmark against which financial or economic performance is measured,
such as the S&P 500 or the Consumer Price Index.
Index of market prices of a particular group of stocks, such as the S&P 500 and
the NASDAQ Composite Index.
4. Mutual Fund
An open-ended fund operated by an investment company, which raises money
from shareholders and invests in a group of assets, in accordance with a stated
set of objectives. Benefits include diversification and professional money
management. Shares are issued and redeemed on demand, based on the fund's
net asset value, which is determined at the end of each trading session. A
closed-end fund is often incorrectly referred to as a mutual fund, but is actually
an investment trust.
National Association of Securities Dealers Automated Quotations system
New York Stock Exchange (NYSE):
The oldest and largest stock exchange in the U.S., located on Wall Street in New
York City. Responsible for setting policy, supervising member activities, listing
securities, overseeing the transfer of member seats, and evaluating applicants.
Holds Information about stocks like the closing price, the lowest and highest price
of a stock on a trading day, the volume of stocks that were traded, the price-
earnings ratio, percent yield etc. The customer can trade in the stock market
through the stock manager. If the stock manager does not have the information
asked be customer it retrieves the same from the Internet.
An agreement between a buyer and a seller to exchange an asset for payment.
Or in accounting, any event or condition recorded in the books of account.
Users can set up and manage their own portfolio. Stocks kept in the portfolio are
stored in tables that allow users to keep track of their stocks once they login. In
addition, when the user buys certain stocks from the simulated stock
transactional services, that symbol will automatically be added in the user
portfolio. Additional features such as features for calculating profit from stocks
will allow users to keep track of stock value and enable them to transact the
stocks they have when the stock market is good.
HTML (Hypertext markup Language)
HTML code of a web page tells the browser the way the page has to be
displayed. The data that we are looking for is generally embedded in this HTML
format which has to be retrieved and stored.
The server gets the data on stocks from the Internet. Once it gets the data, the
user can perform the transaction. Each transaction needs to be validated by the
server. The server verifies the validity of the transaction. It also validates the
user. The server is also responsible for adding a new user and deleting users as
and when required. At the end of the transaction, the server removes the stock
data. The server also maintains a timer for each transaction for security
Overall System Architecture
Click here to view the pictorial view
Or use the link http://www.cas.unt.edu/~ravig/csci5350/Overall
The main sub systems of the system are
• User Interface (GUI): The user interface provides a user-friendly graphical
environment using which the user will be able to communicate with the
• Server: The server takes care of the user authentication, modification of the
user preferences, the users stock holdings etc. The user transacts with the
local database to retrieve the relevant data and also takes care of
communicating with the external network.
• Database: The local database stores the details about the users and also
about the stocks. The user data would be the data like the user login,
password, and the current holdings of stock with the user. This part of the
database is the User Portfolio Manager. The other part of the database is
the Stock Manager, which stores the attributes about the stocks. The
attributes of the stocks could be, the symbol, the price, the day’s high and low
value of the stock, the volume of the stock, weekly and monthly high and low
• Internet and Data Extraction: This part of the system is concerned with
retrieving the relevant data from the Internet. The data is obtained from the
HTML code of a particular web site, after passing a relevant query to this web
6. Object Model
All objects have identity and are distinguishable. The purpose of object modeling
is to describe objects. Objects promote understanding of the world and provide a
practical basis for computer implementation. So, we break our system into
objects that are simpler sub blocks of the entire working system. This is
achieved by Object Modeling. It is modeling a system from related but different
viewpoints, each capturing important aspects of the system, all required for a
complete description. Object modeling groups real life object classes and the
relationships between them. The most critical aspect in the design of the object
model is the division of the parent or upper layer object classes and their
relationships with each other. The child or lower layer constitutes by far a less
The object model represents the static structural “data” aspects of a system. The
dynamic model represents the temporal, behavioral, “control” aspects of a
system. The functional model represents the transformational, “function”
aspects: it uses data structures (object model), it sequences operations in time
(dynamic model), and it transforms values (functional model).
The object model precedes the other models-namely dynamic and functional,
because of its simplicity, stability and independence from application related
details. Object model provides the essential communication link between the
computer professional and application designers.
Click here to view the Object Model
Or use the link
Here is a brief description of the objects in the presented Object Model.
The user interface object allows the user to connect to the server and perform
transactions. The user has to provide a valid user name and password to do
this. The user will be having options view the stock holdings, change the stocks
he/she is interested in, and also to trade the stocks.
The server object checks the authenticity of any user during login using the data
from the UserProfileManager object. The server object allows the user to trade,
i.e. buy or sell any stocks.
The Transaction object allows the user to do so after the server passes the
symbol name on which the transaction has to be performed and the quantity of
the shares to be transacted.
7. The DataBaseManager object allows the user to retrieve details about a stock.
The details could be either the current performance of the stock or could be the
performance of the stock during the previous week or month.
The DataExtractor object is used to extract the relevant and required data from
the Internet using the HTML object. The HTML object uses a query passed by
the DataExtractor and then parses the HTML code of the web page to get the
The Stock object and the StockData object contain the data like the previous
closing, last opening, current price, the volume of the stock etc.
The dynamic model describes the aspects of a system that change over time.
The dynamic model is used to specify and implement the control aspects of a
system. The dynamic model contains state diagrams. An object model
describes the possible patterns of objects, attributes, and links that can exist in a
system. Over time, the objects stimulate each other, resulting in a series of
changes to their states. An individual stimulus from one object to another is an
event and this is the most important concept in the dynamic model. One event
follows the other forming the flow of processes in the system. The model also
tells how the system reacts to an error.
The Online Stock Market is an interactive system and hence the dynamic model
is an important part of the overall design.
Click on the links below to see the Dynamic Models.
Or use http://www.cas.unt.edu/~ravig/csci5350/Dynamic%20Model%201.JPG
Or use http://www.cas.unt.edu/~ravig/csci5350/Dynamic%20Model%202.JPG
Or use http://www.cas.unt.edu/~ravig/csci5350/Dynamic%20Model%203.JPG
Here is a brief explanation about the dynamic model presented here is:
When the user starts the program, the user is requested to enter a valid user
name and a password. If the user is found to be valid the data relevant to the
user is retrieved and presented. If the user does not exist in the database he/she
is given an option to create an account by providing some information. After the
user is created the information is updated in the user database. The user is
asked to set his preferences, like the stocks to be displayed, the data to be
displayed etc. The user can exit any time during this process.
8. After displaying the user data, the system waits for the user to enter some thing.
Some of the options are shown in the Dynamic Model, Picture 2. The user can
either request an update on the current stock holdings, or can research by
looking at the stock history. Also the user can also add or delete the stocks of
interest for which the system if going to ask for the symbol to be added or
removed. If the symbol is valid the user database is updated. If the user wants
to either buy or sell a stock, he is prompted to enter the symbol and number of
shares to perform the transaction. If the data entered is valid the specified stock
for the specified amount is either bought or sold. If either the symbol name is
invalid or if the number of shares is invalid, the user is prompted to reenter the
data. After performing the required operations, the user database is updated and
the current holdings are displayed and the system again waits for the user.
In the database manager model (Picture 3) it shows that when the user logs in,
his data is retrieved and displayed. If the user hits the refresh button, more
recent data about the stocks are retrieved from the data extractor and displayed.
Even if the user does not hit the refresh button, after a specified time interval, the
system automatically refreshes the stock data with the current values.
The functional model describes the data value transformations within a system.
It is concerned with the flow of data and contains Data Flow Diagrams. A data
flow diagram is a graph whose nodes are states and whose arcs are transitions
between states caused by events. The functional model hence captures what a
system does, without regard to how or when it is done.
The functional model is designed on the basis of the input and output of the
system. It requires identifying the input/output parameters of the system followed
by their computation based on the functions or processes that control them. The
functional model thus represents a process-to-process data flow.
Click here to see the Functional Model
Or use the link
The main processes as shown in the functional model are described briefly:
• User Authorization process: This process is used to verify whether the user
has a valid account with the database. The user has to enter a valid user ID
and the correct password.
• New user information: If the user does not have an account, an account can
be created by picking a user ID and password and by providing some
required data about the user.
9. • Display user portfolio: This process is used to display the user data, which
is retrieved from the user database.
• Research: The user can research on the stocks on the Internet and can pick
which one he/she would like to buy or sell. The research can be based either
on the current performance of the stock or the previous history of the stock.
• Transaction: Using this process the user will be able to either buy or sell
stocks. The user data is updated after this process.
• Data extraction: The data extraction process involves passing a query to a
predefined web site and parsing the HTML code to obtain the required data.
Group Name: nirvana
Archana Rao Penukonda
Suresh Kumar Paladugu
Ravi Kiran Guntupalli