Code available upon request
Stock Market Sim is a Java-based application designed to help users learn and experiment with stock investments in a virtual environment. It provides tools to analyze stocks, create portfolios, and simulate investment strategies without using real money. The program follows a Model-View-Controller (MVC) architecture, ensuring a clear separation of concerns between data management, user interface, and application logic.
Features
- Recording of Stock Transactions:
- Create and manage multiple portfolios containing various stocks.
- Track over 100 different stock symbols over many years.
- Stock transactions may be recorded, and the history of the portfolio may be queried to find its value, or its composition at any given time.
- The program will automatically take into account what days the stock exchange was open, as well as any holidays, and will provide helpful suggestions to assist in correcting invalid dates.
- Stock Analysis:
- Calculate the gain or loss of a stock over a specified period.
- Compute the x-day moving average for a stock on a specific date.
- Identify x-day crossovers for a stock within a specified date range.
- Rebalancing Portfolios:
- Rebalance a portfolio based on specified target weights for stocks on a specific date.
- File saving:
- Portfolio files may be saved and retrieved from a XML file, as well as imported from previos sessions.
- Performance Over Time:
- Visualize the performance of a portfolio over a specified time range using a bar chart. The chart will display portfolio value at regular intervals (day, month, or year) within the specified range.
- Scale of the chart will reflect the range of portfolio values, ensuring readability and clarity.
- User Interface:
- GUI interface (see below)
- Text-based cli.
- Data Source:
- Retrieves historical stock data from Alpha Vantage API.
- Supports a wide range of stock ticker symbols and historical dates.
- If API calls run out, there is historical data of 3 stocks (AAPL, AMZN, GOOG) that come with bundled the project and may be used locally instead.