Inspiration

We were inspired to help people understand how to grow their money, the value of diversification, risk management, and the impact inflation can have on their purchasing power.

What it does

The simulation allows users to put their money in a savings account, stocks, or CD's. At the end of each year their value reflecting actual stock prices, CD rates, and savings account values. Users will then have the option to buy, sell, or put their money in other assets. At the very end of the simulation the users final assets will be listed along with their profit and the value of their cash after inflation.

How we built it We developed a web-based investing simulator using vanilla HTML, CSS, and JavaScript for the front end, with localStorage to persist user portfolios across sessions. Investments like savings accounts and CDs are tracked year by year, applying compound interest and maturity logic. For the AI assistant, we built a Node/Express backend that exposes a /ai-chat route, connects to the OpenAI Chat Completions API, and returns JSON responses. A custom popup widget (styled with CSS and controlled with JavaScript) consumes this endpoint to provide real-time, in-app financial explanations.

Challenges we ran into We had to handle floating-point precision issues in money calculations, especially with compounding interest and CD maturities. Another challenge was designing the system prompt so the AI stays educational and avoids giving financial advice. We also had to carefully manage UI state transitions between “buy,” “sell,” and “end” screens while keeping data consistent across pages.

Accomplishments that we're proud of We successfully delivered a complete, multi-page simulator with investment options, year-to-year progression, and clean financial summaries. We also integrated a generative AI assistant directly into the experience, allowing users to ask questions about financial terms without leaving the app. Getting the CD maturity logic, rounding fixes, and popup notifications to work smoothly alongside the AI chat is something we’re especially proud of.

What we learned We learned how to integrate a generative AI API into a custom web app safely, how to handle precision and rounding in financial simulations, and how to design prompts that shape AI behavior effectively. On the front-end side, we deepened our understanding of state management across multiple HTML pages and improved our skills in creating reusable UI components like popups and chat widgets. We learned how to work well and to code as a team.

What's next for FinanceSim

Future plans include expanding asset classes to cover bonds, index funds, and retirement accounts, making the simulator more comprehensive. We aim to add richer stock market features such as historical price charts, dividends, and market events to create a more dynamic experience. On the AI side, we’ll build context awareness so explanations can directly reference a user’s portfolio and simulation progress. We also plan to move from localStorage to a backend database with user accounts, enabling persistence across devices and new modes like classroom or multiplayer play where users can compare strategies in real time.

Share this project:

Updates