🚀 Stock Trading Platform

Java-based Trading Simulation System with OOP & File I/O

CodeAlpha Internship Project

⬇️ Download & Experience Stock Trading Platform

This is a Java Desktop Application - Experience the full power of stock market simulation!

💡 System Requirements: Java JDK 11+ | Windows/Mac/Linux | Any Java IDE

▶️ How to Run Stock Trading Platform

1️⃣ Clone Repository

Download the project from GitHub or clone using Git

2️⃣ Open in IDE

Import project in IntelliJ IDEA, Eclipse, VS Code, or any Java IDE

3️⃣ Run Application

Execute TradingPlatform.java file to start the application

4️⃣ Start Trading

Professional console interface will launch - Begin your trading journey!

📊 Project Overview

A comprehensive Java console application that simulates a stock trading environment with real-time market data, portfolio management, and persistent data storage. Built using Object-Oriented Programming principles and Java serialization for data persistence.

Java OOP File I/O Serialization HashMap VS Code

✨ Key Features

📈 Real-time Market Data

Dynamic stock prices with automatic updates every 5 seconds, simulating real market fluctuations.

💰 Buy/Sell Operations

Complete trading functionality with balance verification and transaction recording.

📋 Portfolio Management

Track stock holdings, calculate total portfolio value, and view performance metrics.

💾 Data Persistence

Save and load portfolio data using Java serialization for permanent storage.

💻 Sample Code

Here's a glimpse of the Portfolio class implementation:

public class Portfolio implements Serializable { private static final long serialVersionUID = 1L; private Map<String, Integer> holdings; // Stock symbol → quantity private double totalValue; public void addStock(String symbol, int quantity) { holdings.put(symbol, holdings.getOrDefault(symbol, 0) + quantity); } public void updateTotalValue(Map<String, Stock> availableStocks) { totalValue = 0.0; for (Map.Entry<String, Integer> holding : holdings.entrySet()) { String symbol = holding.getKey(); int quantity = holding.getValue(); if (availableStocks.containsKey(symbol)) { double currentPrice = availableStocks.get(symbol).getCurrentPrice(); totalValue += currentPrice * quantity; } } } }

📁 Project Links

Built for CodeAlpha Internship Program
Developed by: Manish Kumar
Technology Stack: Java, OOP, File I/O, VS Code