Skip to content

Scraping Google Finance with BeautifulSoup to create a portfolio tracker. Scraped data is stored into an SQLite database.

Notifications You must be signed in to change notification settings

adilsaid64/google-finance-scraper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Google Finance Scraper and Portfolio Tracker

A simple scraping project that scrapes real-time stock data from Google Finance using BeautifulSoup. Data structuring is done through the use of dataclasses. The script calculates portfolio valuation and stores data into a SQLite database using sqlite3 for future analysis.

Features

  • Real-Time Price Updates: The script fetches the latest prices from Google Finance.
  • Currency Conversion: The script standardizes all prices to USD. This allows portfolios to be evaluated more easily regardless of the original stock currency.
  • SQLite Database Integration: Stores portfolio information in an SQLite database for future analysis of historical data. Using SQLite databases is also a more scalable alternative to traditional methods like CSV.

Screenshot

Alt text

Future Work

The initial scope of the project was to practice web-scraping and database modelling, so I stopped the project after that was done. However, to take this project further, we could:

  • Create a frontend using Flask or Streamlit that allows users to add and remove stocks from their portfolios.
  • Use the data stored to create a timeseries for the portfolio to allow users to analyze how their portfolio has changed over time. This is possible because timeseries data is stored in the database, so we can use modules like Plotly or Matplotlib to create timeseries plots.
  • Include error handling and better user feedback.

About

Scraping Google Finance with BeautifulSoup to create a portfolio tracker. Scraped data is stored into an SQLite database.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages