Team info

We're a four-person group of Pingry juniors Rhea Kapur, Jessica Yatvitskiy, Eva Schiller, and Emma Huang. We are here at FemmeHacks today representing the Pingry Girl Code club.


It is essential that individuals are equipped with the knowledge and skills to make responsible financial decisions. However, most American teenagers lack this preparation due to an absence of financial education in their curriculum– in fact, only five states require students to take a financial literacy course. We sought to create an interactive financial education game that would excite students (even as young as middle schoolers) to learn about the art of investing in stocks and how to interpret changes in the market. Social media plays an influential role in the lives of today’s teens, and with a Twitter API in our pocket, we combined vast financial information on Twitter with our love for online games to develop FantasyFinance.

What it does

FantasyFinance allows students to make decisions in our stock market simulation game based on their interpretation of the market (via an automatically refreshing stream of financial news on Twitter). With a split-screen layout, students are able to examine market changes in real time and effectively make their decisions in the simulation. FantasyFinance is a great education tool that teaches students to be financially smarter and more aware of what’s happening in the global economy.

How we built it

The front end of the website consists of HTML and JavaScript, and stores information about various stocks and companies within a 3-dimensional array. Each 2D array within it is rotated after the user moves, shuffling the questions and providing a more dynamic experience.

The left sidebar consists of a selection of finance/stock-related tweets, curated programmatically using the Twitter API. Node.js and the Twit NPM module was used to search recent tweets. Filtering by keywords - the financial sectors, company names, company types, cashtags - relevant tweets were selected, the Tweet ID was extracted, and then they were added to the collection programmatically with Python (and direct Twitter API interaction). The tweet descriptions were then parsed, with basic sentiment analysis (based on words involved - percent increase, good/up, bad/down, bullish/bearish) included to determine whether the stock/sector was doing well or poorly.

Based on the information about how the stocks/sectors were doing, the user can then choose to invest in companies from those sectors. The sentiment analysis determines how well a company from a sector is doing, and if that successful company is chosen for investment, then the user will gain points. If not, they’ll lose points.

Challenges we ran into

Connecting all the parts of our project (Twitter API, curated collection of tweets, our game, logos and design) on the website. We originally attempted to connect the back and front ends of our website using an extension of the Java Applet class, then moved on to Python Flask. However, we faced trouble with our user interface, so we ended up switching to JavaScript within the HTML file. This was a challenge because nobody on our team knew JavaScript, but it allowed us to successfully implement the use of buttons as well as our algorithm. We're very grateful for the mentors' help with advising us about what financial info to look for when parsing through tweets, and just in general for webdev problem-solving assistance.

Accomplishments that we're proud of

Our functioning website, curated collection of tweets, logo, and the impact our hack can make as we help it realize its full potential!

What we learned

Serious persistence.

What's next for FantasyFinance

In the future, we would like to enhance the user experience by adding more elements to our game (improving the scoring system with more advanced NLP analysis) and improving the user interface. We will also add more financial literacy videos and educational resources on our website.

Built With

Share this project: