A high-performance quantitative finance platform for portfolio risk management and options pricing. Built with C++17 core, Python bindings, and an interactive web dashboard.
Cross-language quantitative finance platform offering:
- Multiple Pricing Models: Black-Scholes, Binomial Tree, Merton Jump Diffusion
- Risk Analytics: Greeks calculation, Value at Risk (Monte Carlo), Portfolio aggregation
- Live Market Data: Automatic fetching from Yahoo Finance with caching
- RESTful API: Flask-based endpoints with comprehensive validation
- Web Dashboard: Interactive portfolio builder and risk visualizer
# Clone repository
git clone https://github.com/Quant-Enthusiasts/Quant-Enthusiasts-Risk-Engine.git
cd Quant-Enthusiasts-Risk-Engine
# Build C++ engine
cd cpp_engine
mkdir build && cd build
cmake .. -GNinja -DCMAKE_BUILD_TYPE=Release
cmake --build .
cmake --install .
# (Optional) Use CMake presets
# Presets are defined under cpp_engine/. Run them from this folder, e.g.
# cmake --preset quantlib
# Setup Python API
cd ../../python_api
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python setup.py build_ext --inplace
# Start API server
python app.pyServer runs at http://127.0.0.1:5000
For detailed setup instructions, see INSTALLATION.md.
JavaScript Dashboard (Frontend)
|
| HTTP/JSON
v
Python API Layer (Flask)
|
| pybind11
v
C++ Risk Engine (Core)
Project Structure:
Quant-Enthusiasts-Risk-Engine/
├── cpp_engine/ # C++ core with pricing models
├── python_api/ # Flask API + Python bindings
├── js_dashboard/ # Web interface
└── docs/ # Additional documentation
| Model | Type | Options | Key Features |
|---|---|---|---|
| Black-Scholes | Analytical | European | Fast, Greeks calculation |
| Binomial Tree | Numerical | European/American | Early exercise, configurable steps |
| Merton Jump Diffusion | Analytical | European | Discontinuous jumps |
- Greeks: Delta, Gamma, Vega, Theta, Rho
- VaR: Monte Carlo simulation (configurable paths), std::thread used for concurrency
- Expected Shortfall: 95%/99% confidence levels
- Portfolio Analytics: Net positions, PV aggregation
- Automatic fetching from Yahoo Finance
- SQLite-based caching (24-hour expiration)
- Bulk ticker updates
- Volatility calculation from historical data
See MARKET_DATA.md for details.
# Fetch market data
curl -X POST http://127.0.0.1:5000/update_market_data \
-H "Content-Type: application/json" \
-d '{"tickers": ["AAPL", "GOOGL"]}'
# Calculate portfolio risk (auto-fetches missing data)
curl -X POST http://127.0.0.1:5000/calculate_risk \
-H "Content-Type: application/json" \
-d '{
"portfolio": [
{
"type": "call",
"strike": 180,
"expiry": 1.0,
"asset_id": "AAPL",
"quantity": 100,
"style": "european"
}
],
"market_data": {}
}'Full API documentation: API.md
| Operation | Latency | Notes |
|---|---|---|
| Single option pricing | < 1 microsecond | Black-Scholes |
| Portfolio (100 options) | < 1 ms | Full Greeks |
| VaR (100K simulations) | < 1 s | 95% confidence |
- Installation Guide - Detailed setup for all platforms
- API Reference - Complete endpoint documentation
- Development Guide - Testing, contributing, CI/CD
- Market Data Guide - YFinance integration details
- Deployment Guide - Docker, production setup
We welcome contributions! Please see DEVELOPMENT.md for:
- Development setup
- Code style guidelines
- Testing requirements
- Pull request process
- GitHub Issues: Report bugs or request features
- Discord: Join our community
This project is licensed under the MIT License. See LICENSE for details.
Made by Quant Enthusiasts | Documentation | GitHub