Stock Portfolio Project

The project for the EECS 339 database course is to build a stock portfolio website from scratch. My teammate Alan Fu and I built a database-backed web application using Perl,JS, and SQL queries.

Starting with modeling the database, we drew an ER diagram of the stocks which obeys the 3NF restriction. We then used Balsamiq to build a mockup of our website , of which the design conforms to other stock portfolio sites such as Yahoo financial or Google stock portfolio.

Project 2 mockup_006

Figure 1. Website Mockup page 6. The full mockup is here.

The functionalities we have are:

Creating a user account, creating/deleting a portfolio, deposit/withdraw (virtual) cash, view daily stock performance, add a stock transaction, view the statistic performance of the current portfolio, get the historic prices of a stock for the past 10 years, get a prediction on the price of a stock, compare the portfolio’s performance with an automatic trading strategy.

The code for stock price prediction and automatic trading is given to as at the beginning, but we implemented the rest of it. You can try it out at the following website: Link to Stock Portfolio.

We did not spend a lot of time on the UI since that was not the focus of the project. Therefore the website looks a bit less nicer than other stock portfolio sites. We spent most of the time making the queries efficient and the data stored in least space possible. We have 10 years worth of data and it was quite a daunting task at first. By testing different SQL queries and using knowledge on how database managers work, we built a fast website for the users.

stock portfolio sample page.png