Git Product home page Git Product logo

stockoverflow's Introduction

StockOverflow

Hackabull 2022 Submission

Inspiration

Our team's leading financial expert, Eric Higgins, pitched us an idea for a website. Yahoo Finance's website is a bloated, confusing mess. With StockOverflow, you know exactly what you're getting: a clean, and visually pleasing dashboard with only the most critical of information (plus a news feed)!

What it does

We scrape stock market data from Yahoo using the yfinance library and WrapAPI, then load it into CockroachDB as a cache. By using CockroachDB, loading speeds are drastically reduced, and an extra layer of reliability is added (CockroachDB is a "distributed SQL database designed for speed, scale, and survival; trusted by thousands of innovators around the globe").

How we built it

We started off our project by creating a new Python3 repository on Replit: an online IDE with handy hosting and multiplayer features. This allowed us to collaborate in real-time from the get-go. I (Marcus Weinberger) decided to choose the Flask web framework to develop StockOverflow as it provides templating features and a simple syntax. Additionally, our team member Michael Clark has previous experience with it.

We found ways to scrape data from Yahoo Finance, but after realising it was a little slow, we decided to integrate CockroachDB as a cache. This was done using Flask-SQLAlchemy to ensure thread safety, so that multiple operations on the database don't collide. The frontend website contains little-to-no JavaScript, so that we can achieve maximum performace. This is why Flask was a good choice, as the templating features let us loop through data with a familiar Python syntax.

Challenges we ran into

Learning CockroachDB took some time, as Marcus was used to document-collection based databases, and no one had extensive experience with SQL. However, once we realised we could create schemas in Python, this solved a lot of our issues with data validation.

We also struggled a lot with designing the frontend, as we tend to favor backend development.

Accomplishments that we're proud of

The python yfinance library was missing one key feature that we needed - the ability to scrape "trending" stocks. This was resolved by using the third-party scraping service, WrapAPI. Deciphering Yahoo's class names gave us all a headache. (image)

What we learned

Two of our members learned the Flask framework, as this was their first time using it. Another member learned from the CSS experience of our lead frontend developer, Michael. This was also a first time using CockroachDB for all of us, so we all gained another tool in our arsenal.

What's next for Stock Overflow

Adding charts, and graph data is the first step in our future, as we feel some of the depth of our data is lacking. We are also searching for new ways to use CockroachDB. I also plan on exploring AWS Lambda, as I'm certain some of our web scraping functions could run on their serverless architecture - potentially speeding up our service.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.