Stock-Base is a portmanteau of Stock screener and portfolio managing database.
The wave of finance in the youth of our country is rising rapidly as we witnessed a pandemic and a year-long lockdown. There are a number websites which act as a good portfolio manager or a stock screener in the Indian finance arena, but there is yet to be an application/website which would provide the convince of being both, a screener AND a portfolio manager.
The goal of our project Stock-base is to integrate the features of a typical portfolio management system and an Indian stock screener, like Google Finance and Screener for example.
Stockbase would be a one-stop solution for keeping the records and updates of portfolio in check, while also acting as a good stock screener, saving people’s time from fruitlessly juggling between different websites for researching a stock.
- Python 3.8 or higher
- cryptography==3.4.7
- pprint==0.1
- requests==2.25.1
- json==2.0.9
-
Download the
10.mp4file from here. -
Load the create.sql file in the database folder to create the database.
-
Insert data into the database using the insert.sql file in the database folder.
-
Run the main.py file to start the application.
Highlights
- User Authentication
- Stock Screener
- Portfolio Management
- Stock Details
- Stock Comparison
- Stock Watchlist
- Stock Search
Authorises the user to access the application. The user can either login or register to access the application.
The stock screener is a feature which allows the user to search for stocks based on various parameters like market cap, price, etc. The user can also filter the stocks based on the parameters.
The portfolio management feature allows the user to keep track of the stocks they own. The user can add stocks to their portfolio, update the quantity of stocks, and delete stocks from their portfolio.
The stock details feature allows the user to view the details of a particular stock. The user can view the stock price, market cap, etc. of a stock.
The stock comparison feature allows the user to compare the details of two stocks. The user can compare the stock price, market cap, etc. of two stocks.
The stock watchlist feature allows the user to add stocks to their watchlist. The user can add stocks to their watchlist, view the stocks in their watchlist, and delete stocks from their watchlist.
The stock search feature allows the user to search for a stock. The user can search for a stock by entering the stock name or the stock symbol.
The app feedback feature allows the user to give feedback about the application. The user can give feedback about the application by entering their account ID, title, and comments.
- Inserting feedback: Inserts feedback into the feedback table.
INSERT INTO feedback (account_id, title, comments) VALUES (%s, %s, %s);- Deleting stock from watchlist: Deletes a stock from the watchlist table.
DELETE FROM watchlist WHERE serialNo = '%s' AND accountId = '%s' - Update Current Price: Updates the current price of a stock in the stock table.
UPDATE stock SET currentPrice = '%s' WHERE symbol = '%s'- Fetch all stocks: Fetches all the stocks from the stock table.
SELECT * FROM stock- Get total investment: Gets the total investment of done in a stock.
SELECT SUM(quantity*PurchasePrice) AS total_investment from transactions INNER JOIN comprisesof ON comprisesof.transactionID = transactions.transactionID WHERE comprisesof.securityCode = \'%s\';- usernameStartsWithLetter: Checks if the username starts with a specified letter.
SELECT * FROM account WHERE username LIKE '%s';- getTransactionWithMaxPurchasePrice: Gets the transaction with the maximum purchase price.
"SELECT * FROM Transactions WHERE purchasePrice = (SELECT MAX(purchasePrice) FROM Transactions)- stocksWithStockPElessThanAValue: Gets the stocks with stock PE less than a specified value.
SELECT * FROM stock WHERE stockPE <= s;- priceChangePositive: Gets the stocks with positive price change.
SELECT SecurityCode FROM stock WHERE currentPrice - prevClose > 0;