FinanceProject is a financial modeling application that includes implementations of the Black-Scholes model, Heston model, and option Greeks calculations. The project is designed to provide tools for pricing European options and calculating the sensitivities of these options to various factors.
- Black-Scholes Model: Analytical pricing for European options.
- Heston Model: Stochastic volatility model with numerical integration and Monte Carlo simulation.
- Option Greeks: Sensitivities of option prices to various parameters.
- Implemented in
blackScholesModelandblackScholesModel.cpp. - Provides methods to calculate option prices and related parameters.
- Implemented in
optionGreeksandoptionGreeks.cpp. - Provides methods to calculate Delta, Gamma, Vega, Theta, and Rho.
- Implemented using Google Test framework.
- Tests for
blackScholesModelare intest_blackScholesModel.cpp. - Tests for
optionGreeksare intest_optionGreeks.cpp.
- Centralized error logging to
error.logfor all exceptions. - Comprehensive exception handling to ensure robustness.
- Unit tests implemented using Google Test framework.
- Covers basic functionality and edge cases for:
- Black-Scholes model
- Option Greeks
- Heston model (including zero volatility, extreme correlation, and invalid inputs)
- The project uses CMake to manage the build process.
- The main CMake configuration is in
CMakeLists.txt. - The test configuration is in
Testing/CMakeLists.txt.
-
Navigate to the project directory:
cd FinanceProject -
Create a build directory and navigate into it:
mkdir build cd build -
Run CMake to generate the build system:
cmake ..
-
Use
maketo compile the project:make
-
Navigate to the
Testingdirectory:cd FinanceProject/Testing -
Build and run the tests:
mkdir build && cd build cmake .. make ./ModelTests
-
Check
error.logfor any runtime errors during testing.