Stock Market Simulator
Designing and developing a portfolio management tool powered by real-time stock data
Creating portfolios, tracking investments, and querying stock data in real-time
Building a scalable stock portfolio manager
The Stock Market Simulator was my final project for Object-Oriented Design. Built in Java using the Swing framework, it enables users to create, manage, and analyze virtual stock portfolios using real-time data from the Alphavantage API. The project challenged me to architect a scalable application using the MVC pattern, handle external data sources, and design an intuitive GUI experience.
Managing real-time data with efficiency and clarity
Managing real-time financial data within a desktop application required both efficient caching and clear data visualization. Additionally, I needed to ensure users could easily save, load, and modify portfolios without data conflicts or performance lag. The challenge was creating a system that balanced technical performance with user-friendly interaction.
Modular architecture with flexible interaction modes
I implemented a modular architecture using MVC principles to separate logic, UI, and data handling. The app supports both text-based and GUI modes, allowing users to perform portfolio operations interactively or through command-line input. This dual-mode approach provided flexibility while maintaining code reusability and scalability.
From design to development
Planning
Architecture Design
MVC Pattern
Development
Model & Controller
API Integration
Interface
GUI Design
User Testing
Refinement
Data Caching
Performance
Comprehensive portfolio management capabilities
- Create and manage multiple portfolios containing various stocks
- Buy or sell shares by specifying the stock ticker, quantity, and date
- Save and load portfolios seamlessly from local files
- View real-time portfolio value and composition on any market day
- Access cached stock data for GOOG, AAPL, AMZN, NFLX, NVDA, SGN, and MSFT
- Switch between GUI and text-based interfaces for flexible interaction
Structured design with MVC principles
The simulator follows the MVC (Model-View-Controller) pattern to ensure maintainability and scalability:
Model
Handles portfolio data, stock caching, and API interactions with the Alphavantage service. Manages data persistence and retrieval for efficient performance.
View
Built using Java Swing for a responsive, user-friendly interface. Provides clear visual feedback for all portfolio operations and real-time value updates.
Controller
Manages user input, command execution, and synchronization between model and view. Ensures smooth data flow and error handling across the application.
By separating responsibilities, I ensured maintainability and scalability for future enhancements, such as analytics dashboards or additional API integrations.
Simple and readable portfolio storage
Saved portfolios are stored as .txt files using a clean, human-readable structure that makes debugging and manual editing straightforward:
Portfolio: test3
Stock: AAPL
Quantity: 50
---
Stock: GOOG
Quantity: 25
---
Number of Stocks: 2
A robust application demonstrating software design principles
I successfully developed a fully functional stock market simulator that demonstrates strong object-oriented design principles. The application efficiently manages real-time financial data while providing an intuitive user experience through both GUI and command-line interfaces. By implementing the MVC pattern and focusing on modular architecture, I created a scalable foundation that could easily support future features like advanced analytics, portfolio comparison tools, or additional API integrations.
Learning through architectural challenges
This project deepened my understanding of software architecture and design principles. Implementing the MVC pattern in a real-world context helped me appreciate how structure impacts scalability and readability. Overcoming challenges with caching and external APIs taught me the importance of debugging, persistence, and adaptability—skills I continue to apply in both development and design projects.
Working with financial data also reinforced the importance of data accuracy and user trust. Every feature decision needed to balance performance optimization with reliability, ensuring users could confidently manage their virtual portfolios without worrying about data inconsistencies or system failures.
Previous Project