Inspiration
Turns out, when a few young investors get together, it’s not uncommon for stock news to sneak its way into conversations, especially when you’re supposed to be brainstorming a hackalytics project. With a mix of beginner and more experienced investors on our team, we realized we all shared the same question: how healthy is our portfolio, really? Not just in terms of profits, but in diversification, risk, and long-term stability. We wanted to build something that could help investors at any level better understand their portfolios.
What it does
SafePlay is a Chrome extension focused on portfolio health, not day trading. Instead of trying to maximize short-term profits, SafePlay helps users understand how safe and balanced their investments are using historical market data and common portfolio metrics. Features include:
- Portfolio diversification by sector
- Historical volatility (risk)
- Risk-adjusted performance using the Sharpe ratio
- A "Test Stock" feature that lets users simulate adding a stock to their portfolio and see how it impacts diversification, risk, and overall portfolio health
How we built it
We built SafePlay in cooperation with coding agents and two of the sponsors' tools: Sphinyx and Databricks. Using JavaScript, we made a pipeline to scrape user investment information from either their Fidelity or SoFi account, and used yfinance to get access to stock history for analysis. We used Sphynx to build stock information datasets. It wrote hundreds of lines of Jupyter notebook commands in minutes. We used this dataset as part of the drop-down and search menu functionality in the test stock feature. Using Databricks, we built an analytics pipeline and generated charts to visualize portfolio health, including volatility and returns. Using one of our portfolios, a cluster analysis was performed that grouped stocks by historical behavior. This showed that higher-quality growth stocks and underperformers often have similar volatility, highlighting that higher risk correlated with poor performance. Would we have been able to build this without them? Maybe, but I couldn't imagine building this much in such a short amount of time.
Challenges we ran into
Outside of merge conflicts, our hardest challenges were implementing the Databricks pipeline for analytics and visuals, as well as building the scraper that worked across different broker UIs and changing page structures. We were only able to save one visual with Databricks; many of the charts we created stayed inside Databricks without being fully implemented in the extension's functionality.
Accomplishments that we’re proud of
We are very proud of the design and functionality of the Chrome extension. We were able to successfully add scrape functionality to two brokerages, add three different features involving diversification/volatility/optimization, and a frontend that explains recommendations in simple terms. We are especially proud of the “Test Stock” feature, which simulates adding a stock to the users' portfolio and compares before/after portfolio health.
What we learned
Each of us was fairly new to parts of the stack, so we learned how to connect and design browser extensions and improved our git and collaboration skills by delegating tasks that would prevent merge conflicts. This benefited the project in the long run as well because we were able to add far more functionality in relatively short periods.
What’s next for SafePlay
Right now, only Fidelity and SoFi pages are supported. With more time, we would add more broker integrations, include funds and non-equities, and save portfolio history so users can track improvement over time.
Log in or sign up for Devpost to join the conversation.