Skip to content

JoshuaDada007/StockPortfolio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Investment Portfolio Tracker

A console-based Java application that reads a user's stock portfolio from a remote CSV file, fetches live stock data from the Financial Modeling Prep API, and provides analysis such as total investment value, the cheapest and most expensive stocks, and average stock price.


πŸ“Œ Features

  • πŸ”Ž Live Stock Data – Fetches up-to-date stock prices, volumes, and market caps using Financial Modeling Prep API.
  • πŸ“ˆ Portfolio Analysis – Calculates total investment per stock and total portfolio value.
  • πŸ’Ή Stock Comparison – Identifies the cheapest and most expensive stocks in the portfolio.
  • πŸ“Š Average Stock Price – Computes the average price of all stocks.
  • πŸ“„ Remote CSV Parsing – Loads and reads a remote CSV of stock symbols and shares.
  • βœ… Test Coverage – Includes JUnit-based unit tests to validate logic and ensure reliability.

πŸ› οΈ Technologies Used

  • Java 17
  • Apache Commons CSV
  • Jackson (FasterXML)
  • JUnit 4

πŸ“‚ Sample CSV Format

Your portfolio should be structured like this:

Symbol,Shares
AAPL,500
NFLX,200
IBM,300

πŸš€ How to Run the App

  1. Clone the repo
    git clone https://github.com/JoshuaDada007/StockPortfolio.git
    
     2.	Update the CSV URL

Open InvestmentTest.java and replace the default URL with your own public CSV:

String url = "https://your-csv-link.com/yourfile.csv";

3.	Open the project in IntelliJ or any Java IDE.
4.	Ensure Java 17+ is installed.
5.	Run InvestmentTest to fetch live stock data and view analysis.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages