Skip to content

Latest commit

 

History

History
30 lines (24 loc) · 1.41 KB

updated README.md

File metadata and controls

30 lines (24 loc) · 1.41 KB

Stock-Portfolio

This C code implements a simple stock portfolio tracking system. The data structure used in this project includes a Trees to manage user portfolios, where each node represents a stock in the portfolio. The code also utilizes linked lists to manage user information.

Features:

  1. User Management:
  • Create a new user with a specified risk threshold.
  • Display the portfolio of all users.
  1. Stock Portfolio Management:
  • Add a stock to the portfolio with details such as symbol, name, purchase price, and quantity.
  • Find a stock by symbol.
  • Calculate the portfolio value.
  • Display the entire portfolio.
  • Remove a stock from the portfolio.
  • Update stock information (name, purchase price, quantity).
  • Display a stock quantity histogram.

3.Transaction Handling:

  • Sell stocks with specified quantity and sell price.
  • Calculate net profit/loss and update the user's total gain/loss.
  • Display the return on investment (ROI) for each user.
  • Calculate and display capital gains tax.

4.Risk Management:

  • Calculate the standard deviation of historical prices for a given stock.
  • Analyze the overall portfolio risk by calculating the standard deviation of all stocks.
  • Display risk exposure and suggest actions if it exceeds the user's risk threshold.

This mini project provides a foundation for a basic stock portfolio management system and can be extended to include more sophisticated features and enhancements.