Inspiration
When it comes to making financial investments, the stock markets have a lot to offer. Many avoid investing in stocks, however, because they are afraid of the many associated risks. The economy can go bad at any given moment. As such, news about the occasional market recession or slump doesn’t help matters; potential investors quickly lose their confidence, and consequently, it's easy to be excluded from this market of opportunities.
What it does
Intellistocks offers a personalized recommendation system for daily stock market fluctuation and platform for investment portfolio management with a focus on an accessible, user-friendly, portal for not just investing in stocks, but also learning about various aspects of the market. With Intellistocks' use of machine learning and artificial intelligence for predicting daily change in opening prices, we strive to alleviate some of the risks and provide to both beginners and experienced investors tips and tools for making informed financial decisions.
How I built it
On the front end, we built a web app where the user can feed recent news headlines of a given day and predict the next day's opening market price with information regarding the performance of the model used in generating predictions. News headlines are generated using a widget from FeedGrabbr and embedded into the dashboard for feeding to the model. The user can also develop an investment portfolio and watchlist for individual stocks. The portfolio uses autocompletion and error handling for selecting stocks within the Dow Jones Industrial Average. With a user dashboard and secure authentication using OAuth-based Google Sign-In, these services are personalized to each user and their account. The front end was built in a Flask web app and hosted using Google App Engine.
On the back end, user information, which consists of personal information and portfolio holdings, and news headlines from recommendations, is stored in Cloud Firestore, a Google Cloud document-based database. For the recommendation service, we leverage machine learning and AI to use GloVe to create word embeddings on the text-based news headlines and CNNs followed by LSTMs using Keras running on top of TensorFlow to build our model.
The model was trained on 8 years of daily news headlines from a public dataset generated by headlines crawled from the Reddit WorldNews Channel ranked by reddit users' votes. The model was trained using Google Cloud's Colab notebooks while leveraging Google's Cloud GPU, but with the use of Google Cloud's AI Platform, the model can be updated to be trained with user-provided recent news data.
Challenges I ran into
It was hard to optimize the machine learning model to our expectations as while the model was trained on a sufficient amount of data, there's always some randomness to movements in stocks that cannot be attributed to what was released in the news. Otherwise, while we did have some experience with the technologies we used, the process of integrating these technologies proved challenging. It took a good bit of experimentation in each part of the workflow until we had a working web app where we could run our machine learning model.
Accomplishments that I'm proud of
The web app makes efficient use of Google Cloud's various products to create a clean, scalable front end and back end. With the support of Google's OAuth Sign-In, the site is personalized to each individual who uses our site, which opens up a great deal of opportunities moving forward.
What I learned
Coming from a background in bioinformatics and computer vision, it was interesting to see how machine learning could be applied to something so different. As such, I learned a good amount from the process of processing the data with word embeddings to training a deep neural network. Besides that, a lot of my time was spent with using JavaScript to inject HTML on the client side, so I learned more about using asynchronous as opposed to synchronous programming.
What's next for Intellistocks
The next steps would be further optimizing the recommendation system in order to provide a more reliable service. Because the site is currently focused on the 30 stocks within the Dow Jones Industrial Average, expanding it would also make the site more reliable and easy to use.
Built With
- bootstrap
- css3
- firestore
- flask
- google-app-engine
- google-cloud
- google-gmail-oauth
- html5
- javascript
- keras
- python
- tensorflow
Log in or sign up for Devpost to join the conversation.