Welcome to the Risk Analytics Portfolio Management project! This project is designed to fetch market data, calculate portfolio returns, and compute Value at Risk (VaR) for a given portfolio of stocks.
- Introduction
- Features
- Prerequisites
- Setup
- Building the Project
- Running the Executable
- Running Tests
- Contributing
- License
This project fetches market data from the Alpha Vantage API, calculates daily returns for a portfolio of stocks, and computes the Value at Risk (VaR) at a 95% confidence level. The project is written in C++ and uses libcurl
for making HTTP requests and nlohmann/json
for parsing JSON data.
- Fetch market data for a portfolio of stocks
- Calculate daily returns for each stock
- Compute portfolio returns
- Calculate Value at Risk (VaR) at a 95% confidence level
- Print detailed results
- C++17 compatible compiler (e.g.,
g++
) - CMake (version 3.10 or higher)
libcurl
librarynlohmann/json
library- Google Test (for running tests)
-
Clone the repository:
git clone https://github.com/omerhalid/risk-analytics-portfolio-management.git cd risk-analytics-portfolio-management
-
Install the required libraries:
libcurl: Follow the instructions on the libcurl website to install libcurl. nlohmann/json: Follow the instructions on the nlohmann/json GitHub page to install the JSON library. Google Test: Follow the instructions on the Google Test GitHub page to install Google Test.
- Compile and run the project (Cmake option will come soon.) COMPILE
g++ -std=c++17 -Iinc -c src/main.cpp -o build/main.o
g++ -std=c++17 -Iinc -c src/MarketDataHandler.cpp -o build/MarketDataHandler.o
g++ -std=c++17 -Iinc -c src/Portfolio.cpp -o build/Portfolio.o
g++ build/main.o build/MarketDataHandler.o build/Portfolio.o -o build/RiskAnalyticsPortfolioManagement -L"C:/Users/katka/source/market_data_handler/curl/lib" -lcurl
RUN
cd build
RiskAnalyticsPortfolioManagement.exe
Contributing Contributions are welcome! Please fork the repository and submit pull requests for any enhancements or bug fixes.
License This project is licensed under the MIT License.