Distributed pricing and delta-hedging engine for multi-asset, multi-cashflow derivatives under Black-Scholes. The system prices and hedges basket and max options with up to 8 underlying assets and multiple cashflow dates using Monte Carlo simulation.
The project follows a client-server architecture communicating over gRPC:
- Pricing Server (C++): Monte Carlo pricer computing option prices and deltas (finite differences) under multi-dimensional Black-Scholes with correlated Brownian motions (Cholesky decomposition).
- Hedging Client (C#/.NET): Manages the self-financing hedging portfolio, handles rebalancing at each cashflow date, and tracks P&L over the life of the derivative.
| Product | Description |
|---|---|
| Basket Option | Weighted average of underlying assets vs. strike |
| Max Option | Maximum of underlying assets vs. strike |
Both products support multiple cashflow dates and arbitrary numbers of underlyings (tested up to 8).
- Architecture design and validation of the mathematical hedging framework
- gRPC client-server communication (skeleton)
- Vanilla call hedging implementation
- Full multi-asset, multi-cashflow hedging for basket and max options
./pricing_server <path_to_math_param.json>dotnet run <param.json> <mkt_data.csv> <output.json>Basket option — 5 underlyings, 3 cashflows:
./pricing_server ../../TestCases/Basket_5_3_1/basket_5_3_1_math_param.json
dotnet run ../TestCases/Basket_5_3_1/basket_5_3_1_param.json ../TestCases/Basket_5_3_1/basket_5_3_1_mkt_data.csv ../tests/res_basket_5_3_1.jsonBasket option — 8 underlyings, 4 cashflows:
./pricing_server ../../TestCases/Basket_8_4_3/basket_8_4_3_math_param.json
dotnet run ../TestCases/Basket_8_4_3/basket_8_4_3_param.json ../TestCases/Basket_8_4_3/basket_8_4_3_mkt_data.csv ../tests/res_basket_8_4_3.jsonMax option — 5 underlyings, 3 cashflows:
./pricing_server ../../TestCases/Max_5_3_1/max_5_3_1_math_param.json
dotnet run ../TestCases/Max_5_3_1/max_5_3_1_param.json ../TestCases/Max_5_3_1/max_5_3_1_mkt_data.csv ../tests/res_max_5_3_1.jsonMax option — 8 underlyings, 4 cashflows:
./pricing_server ../../TestCases/Max_8_4_3/max_8_4_3_math_param.json
dotnet run ../TestCases/Max_8_4_3/max_8_4_3_param.json ../TestCases/Max_8_4_3/max_8_4_3_mkt_data.csv ../tests/res_max_8_4_3.json- C++ — Monte Carlo pricing engine
- C# / .NET — Hedging client
- gRPC — Client-server communication
- CMake — C++ build system
- NUnit — Unit testing
Project completed at ENSIMAG, Grenoble INP as part of the Quantitative Finance specialization (MEQA), 2024–2025.