Inspiration
FantaStock was inspired by our interest in financial literacy. We took a page from popular games like fantasy football and created a fun way to pit friends together in the stock market.
What it does
FantaStock acts like a regular "paper trading" broker, which means that it allows users to use fake money instead of their real savings while still tracking the stock market.
Users pick stocks which they think will perform well, and are able to trade them, buying and selling as much as they want within the budget that is allocated by the game. After a certain number of days, their trading is counted as finished. You compete against your friends, joining leagues which allow you to track other people's investment strategies. At the end of a given time period, whoever has the highest net worth is the winner.
How we built it
We build FantaStock using a pretty diverse tech stack.
All our data is stored in MongoDB (usernames, passwords/tokens, portfolio choices, groups, stock prices, etc.). We dynamically scrape stock price data from APIs interfacing with yahoo finance to get us reliable information.
To connect to our database, we developed a RESTful API using python flask. Using this API we were able to test creating, reading, updating, and deleting all the information on our database. This API supported a wide variety of actions, from creating user profiles to deleting leagues to keeping track of the time.
The frontend we present to the user was developed in React., and we took advantage of MaterialUI to have a consistent design pattern.
Challenges we ran into
We ran into a couple of challenges. While using MaterialUI, some of the modifications we wanted to make (like adding ticks for our graphs, or connecting search fields to our scraped list of stock names. The documentation was good in some parts, but in some places we had to experiment with many settings to find something that worked, as the documentation was a little bit out of date.
It was also challenging to get our secure sign in with auth0 working. The sample application they provide has a lot of extra code in our opinion, so it's confusing to try and use. But after a bit of time paring the code down to its essential parts we were able to transfer auth0 to our application and get it to work.
Accomplishments that we're proud of
One thing we are proud of was the implementation of auth0, like we mentioned. It adds an extra layer of security to our application, and it helped keep our database logic lighter, as we didn't have to worry too much about the security issues associated with storing passwords.
We were also proud of our method of grabbing stock prices. We reasoned that if we tried to load all the historical values of every stock in the NASDAQ at once, we would run into some issues with a laggy frontend and a clunky user experience. We tried to make this faster by only adding a stock to our database once some user has actually requested it.
The social component of our application is also pretty cool, as it adds a sort of incentive and game structure to the app. By getting accurate tracking of your friend's strategies and seeing who is in the lead across all the days you are competing, we felt we developed something that could actually be quite engaging.
What we learned
We learned a lot about the types of data a brokerage type of institution may need to store.
The importance of planning out database structure beforehand also became evident to us. We started out trying to develop the frontend and backend in parallel, but it quickly became apparent that it would benefit us greatly if we focused on the way our data should be structured first, as everything else flowed naturally after that.
What's next for FantaStock
Next for FantaStock we want to integrate a more fine-grained time scale. Currently our stock data is recorded daily, but we feel it would be much more engaging to have stock prices which vary by the minute.
Our interface is also a bit minimalistic now, so adding some of the tools we noticed available on other platforms like Robinhood or Fidelity (bar charts, indicators, time limits, etc.) might be useful. Some of the data we display could also be organized in a more compact and effective way.
Finally, we want to expand the selection of financial tools we offer to include stocks beyond the NASDAQ, cryptocurrencies, options, and other financial derivatives. The more comprehensive our offering is, the more useful our app can be for helping people discover effective ways to invest their money.

Log in or sign up for Devpost to join the conversation.