Skip to content

TheGreatCorrine/StockSim

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

StockSim

Java Maven mongoDB Figma GitHub CI/CD

Table of Contents

Overview

StockSim is a sophisticated desktop trading simulator designed to replicate real-world market conditions with high fidelity.

Built with a focus on educational value and practical experience, it provides business students, aspiring traders, and financial professionals with a risk-free environment to develop and refine their trading strategies.

The platform offers real-time market data integration through Finnhub API and supports various trading operations including long positions, short selling, and portfolio management.

Requirements

Development Requirements

  • Java Development Kit (JDK) 21 or higher
  • Apache Maven 3.8.8 or higher

System Requirements

  • Internet connection for real-time market data

How to Install

Build from Source

  1. Clone this repository
  2. Set up environmental variables in .env.local
  3. Build the main app
    mvn clean package
    java -jar target/StockSim.jar

Download

  1. Download the latest release from releases
  2. Run the jar file:
    java -jar StockSim.jar

API Tokens

Finnhub API Key (For Stock Data)

  • Create a Finnhub account at https://finnhub.io/.
  • Click "Get free API key" to generate your API key.
  • Add the key to your .env.local file as: STOCK_API_KEY=your_finnhub_api_key

MongoDB Username and Password (For User Data)

  • Create a MongoDB Atlas account at https://www.mongodb.com/.
  • Share your MongoDB username and IP address with our team to be added to the project's cluster. (Note: All University of Toronto IP addresses are pre-whitelisted.)
  • Once added, you'll receive the MongoDB API key.
  • Add the key to your .env.local file as: MONGODB_API_KEY=your_mongodb_api_key

Key Features

For detailed information about use cases and user stories, please refer to this page.

Registration

registration

Log In

log-in

Dashboard

dashboard

Trade Simulation

On this view, user can view real-time stock information, sort and filter them by ticker, company, and industry, then execute trades.

User's assets and portfolio will be displayed to provide information.

trade-simulation

Transaction History

This view shows all transactions of the user.

history

How to Contribute

  1. Fork the repository
  2. Open issues for api keys
  3. Create a new branch
  4. Make changes and commit
  5. Create a pull request

Financial Terminologies

  • Balance: The amount of cash currently available in your account.
  • Portfolio: The collection of all stocks you currently hold. For example, if you own 100 shares of AAPL (Apple Inc.) and -50 shares of AMZN (Amazon), these positions comprise your portfolio.
    • Portfolio Value: The total market value of all stocks in your portfolio. For example, if AAPL trades at $10 per share and AMZN at $5 per share, your portfolio value would be (100 × $10) + (-50 × $5) = $750
  • Assets: Your total wealth, calculated as the sum of your cash balance and portfolio value.
  • Position: The quantity of shares you hold in a particular stock. A position can be:
    • Positive (Long Position): Owning shares, e.g., +100 shares of AAPL
    • Zero: No current position
    • Negative (Short Position): Borrowed shares that must be returned, e.g., -100 shares of AAPL
  • Order Entry: The process of submitting trade orders to the market:
    • Buy (+): Purchasing shares by paying cash, increasing your position
    • Sell (-): Selling shares to receive cash, decreasing your position

Accessibility

Please refer to the Accessibility Report.

Credits

Name GitHub Username
Angel Chen AngelChen09
Yue Cheng ivorkchan
Corrine Xiang TheGreatCorrine
Raine Yang Raine-Yang-UofT
Jifeng Qiu thqi3541

About

csc207 group project

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%