Skip to content

mjreddy/Stock-Tracker

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stock Tracker

Good afternoon, traders!

Stock Tracker is a program that can help you on your day-to-day trading by allowing you to easily track & model stock prices so you can buy at the right time! The data gathered will be displayed to the user in a database table, and current information will be shown in the Tkinter widget. If the stock is lower than the set target price, a new table is created called 'watchlist' and the stocks data is added to it. This allows the user to quickly know which stocks have reached the target prices.


Instructions

  • Run 'main.py'
  • Input the name or ticker of the stock or select it from the drop down menu
  • Input a target price you would like the stock to reach
  • Click the 'Enter' button or press the 'Enter' button on your keyboard
  • Output:

  • The current time, name of the stock, the price, and previous closing price will be displayed on the tkinter widget
  • The stock information, date and time will be added to corresponding databases in new-data-stocks.db
  • Models will be created and available to be viewed by clicking the name of the stock displayed in the stock information frame

Using Auto Run feature

  • Input the name or ticker of the stock or select it from the drop down menu
  • Input a target price you would like the stock to reach
  • Press 'Auto Run' button
  • Click the 'End' button to end the Auto Run thread
  • Output:

  • The stock you have inputted will be scraped every 10 minutes. If the price of the stock is less than the target price, an email will be sent to the specified Outlook email address.

  • Auto Running all stocks

  • Input 'all' into the Stocks input field
  • Click the 'Auto Run' button
  • Output:

  • All stocks in the AllStocks table in the new-data-stocks.db will be webscraped and the information will be added to the specified stocks table, as well as the AllStocks table

  • NOTE: You can still scrape other stocks while auto run is active


    NOTE: You must use an outlook email to send the emails, gmail will not work


Using Run All feature

  • Click 'Run All'
  • Output:

  • All stocks you have previously searched that are saved in your data-stocks.db file will be web scraped and displayed in the GUI.
  • The prices will be added to the database
  • NOTE: Once you start the Run All feature, you cannot end it until it is complete


Creating stock portfoilios

  • Click the 'settings' button
  • Type the name you would like to name the stock group into the 'Group Name' entry widget
  • Type the stock names that you would like to add to the group into the 'Stock Names' entry widget
  • Press the 'Enter' button
  • Output:

  • A newly created stock group/portfolio table will be created containing the name of the group and the stocks within it. The table will be added to the new-stocks-data.db database file

Searching with stock portfolios

  • After creating a stock group/portfolio under the settings tab, search the name of the group in the 'Stocks' input field
  • Press the 'Enter' button
  • Output:

  • The stock information for the stocks within the stock group will be displayed in the stock information frame
  • The stock information will be added to the AllStocks and the specified stocks database table

Searching with sectors

  • Type 's tech', 's real estate', or 's finance' into the stock input field
  • Leave the target price input field empty
  • Click the 'Enter' Button

Viewing Graphs

  • After you have filled out the input fields and clicked the 'Enter' button, stock information will be displayed. Clicking the stock name will display a graph of price history pulled from the new-data-stocks database file.
  • Normal plots on the graph will be displayed with the color blue, but the highest price will be displayed in pink
  • Increases in stock price will have a green line connecting the plots, and decreases will be connected with a red line
  • Output:

  • A predefined list of popular stocks in the specified sector will be displayed to the user in the tkinter GUI
  • The stock information will be added to that sectors database table

NOTE: Data displayed on the graph will only be data that has been collected when you run that specific stock. Unless you are using the Auto Run feature and letting the program run, stocks will have to be searched manually.


Under the hood

  • Using Tkinter to create GUI
  • Using requests & BeautifulSoup4 to webscrape stock information from 'google.com/finance'
  • Using SQLite3 to create and manipulate databases
  • Using matplotlib to create graphs displaying stock prices
  • Using datetime package to collect date and time information
  • Using threading package to create multiple threads to increase speed

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%