Objective

The objective for assignment 2 is to continue to build the trading system that was started in assignment 1 with new requirements and changes. The focus will be on developing visualizations to show the trader time-series and analytics.

Requirements

The new trading system will have the same requirements as assignment 1 but with the following additional requirements or modifications:

Data Source

Software and Database

Application is developed using

Application

The application is developed using Python data structures. Most of the web scraping is done using packages requests and BeautifulSoup (bs4). For persistence, data is stored in the Sqlite database. It is accessed using object-relational mapper (ORM) SQLAlchemy. Web pages use the Bootstrap framework. Tables are exposed as classes.

Graphs on the website are developed using Matplotlib package.

Application source code uploaded to GitHub https://github.com/akulapa/data602-assignment2. Currently, it is set up as a private folder (course requirement).

Docker image is created with empty Sqlite database traders.db. Image is uploaded to Docker Cloud and can be downloaded using the following command

docker pull akulapa/ubuntu1604:data602-assignment2

After downloading, to create a Docker container execute the following

docker run -v /etc/localtime:/etc/localtime:ro -p 8080:5000 akulapa/ubuntu1604:data602-assignment2

-v option sets local time inside docker container using time from the host machine. The application runs on the port 5000 inside the container and is mapped to 8080 while accessing the website.

http://localhost:8080

Once Docker container is started and on first access of website, complete symbol list is downloaded from NASDAQ website. The downloaded file is saved to the folder. After saving the file it is uploaded into the Sqlite database, tickerData table. Additionally, Symbols can be refreshed anytime by clicking on top right button Ticker List Update.

/usr/src/data602-assignment2/app/instance/temp/tickerlist.csv

Home page for the application is displayed as follows.

Available funds is displayed on each page.

The symbol can be keyed in manually or by using the searchable drop down. Enter Key or click on Search button will get traders to the details page. Symbol validation is done against the list downloaded from NASDAQ website. If Symbol does not exist in the list following message is displayed.