https://github.com/vansh626/stockportfoliotracker
A C++ command-line stock portfolio tracker with live price fetching and CAGR calculator.
https://github.com/vansh626/stockportfoliotracker
cpp cpr finance json portfolio-tracker stock-market terminal-app
Last synced: about 2 months ago
JSON representation
A C++ command-line stock portfolio tracker with live price fetching and CAGR calculator.
- Host: GitHub
- URL: https://github.com/vansh626/stockportfoliotracker
- Owner: Vansh626
- Created: 2025-06-26T13:26:54.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-26T14:02:38.000Z (about 1 year ago)
- Last Synced: 2025-06-26T15:19:06.424Z (about 1 year ago)
- Topics: cpp, cpr, finance, json, portfolio-tracker, stock-market, terminal-app
- Language: C++
- Homepage:
- Size: 140 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# StockPortfolioTracker
A C++ command-line stock portfolio tracker with live price fetching and CAGR (Compound Annual Growth Rate) calculator.
---
## Features
- Add and remove stocks
- View your portfolio
- Calculate CAGR for any stock
- Save and load from JSON
- Fetch real-time stock prices using Yahoo Finance (fallback to Twelve Data API)
---
## Technologies Used
- **C++17**
- **[nlohmann/json](https://github.com/nlohmann/json)** for JSON parsing
- **[CPR](https://github.com/libcpr/cpr)** for HTTP requests
- **CMake** for build configuration
---
## Getting Started
### Prerequisites
- C++ compiler (MSVC / MinGW / GCC)
- [CMake](https://cmake.org/)
- Git
- vcpkg (for dependency management)
### Setup Instructions
```bash
# Clone the repository
git clone https://github.com/Vansh626/StockPortfolioTracker.git
cd StockPortfolioTracker
# Install CPR using vcpkg (if not already installed)
./vcpkg install cpr
# Create build directory and compile
mkdir build && cd build
cmake .. -DCMAKE_TOOLCHAIN_FILE=../vcpkg/scripts/buildsystems/vcpkg.cmake
cmake --build .