Hackbright Academy Graduation Project
Smart Investor is a web app aims at advocating financial education for new investors interested in the stock market. The main features are:
- Searching stocks by key words
- Visualizing stock price
- Stock screener
- Bookmarking favorite stocks
- Editing holding stocks value in the watchlist
This project was made at Hackbright Academy in San Francisco over four weeks from Febrary to March 2020.
Deployed to AWS LightSail at www.yichendai.com
Tech Stack: Python, JavaScript, HTML, CSS, Flask, Jinja, jQuery, AJAX, PostgreSQL, SQLAlchemy, Bootstrap, chart.js, Highcharts, unittest
APIs: Alpha Vantage, Edgar Online, Google Auth 2.0
To run Smart Investor requires:
- PostgreSQL
- Python 3.6
- API key for Edgar Online, Alpha Vantage APIs and Google OAuth 2.0 Client IDs
Clone or fork repository:
$ git clone https://github.com/nancydyc/Smart-Investor-Beginner
Create and activate a virtual environment inside your Smart-Investor-Beginner directory:
$ virtualenv env (windows user use command: virtualenv env --always-copy)
$ source env/bin/activate
Install dependencies:
$ pip install -r requirements.txt
Add your API key into the header scripts in static/templates/base.html
Create database:
$ createdb stocks
Run model.py interactively in the terminal, and create database tables of users, stocks, watchlists:
$ python3 -i model.py
>>> db.create_all()
>>> quit()
Run the app from the command line.
$ python3 server.py
The user's profile picture of their Google account is shown on the left hand side of the page. Several questions of user's financial growth goal is listed on the right hand side of the page.
Users type key words of the company name or stock symbol to search a stock.
Users click on show chart button and get a chart with two line graphs of stock weekly history price and Exponential Moving Average. Users can view the chart in full screen, zoom, download or print out a csv file of the stock price data.
Users can do stock screening, filtering by price range.
The screening results is a long table divided by multiple pages through SQLAlchemy paginate method.
Users will be able to bookmark a stock by clicking the star icon in front of it once they log in via Google.
Users need to sign in to get access to the bookmarking feature and editing their watchlists.
- Allow users to sort screening results by price
- Add chat feature to communicate with users
- Add price alert feature
- Allow users to take notes in their watchlist
Smart Investor creator Yichen Dai is a former world language teacher turned software engineer. This is her first fullstack project. She can be found on LinkedIn and on Github.