diff --git a/CMakeLists.txt b/CMakeLists.txt index 58a9b5e..d56479d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,6 +15,7 @@ set(CMAKE_TOOLCHAIN_FILE "/Users/anthony/.vcpkg-clion/vcpkg/scripts/buildsystems CACHE STRING "Vcpkg toolchain file") find_package(Boost REQUIRED COMPONENTS random) +find_package(Eigen3 REQUIRED) # Check if random has been found before compiling src if (Boost_FOUND) @@ -91,7 +92,7 @@ add_library(solver SHARED ) # Link random library to the solver ONLY -target_link_libraries(solver PUBLIC Boost::random) +target_link_libraries(solver PUBLIC Boost::random Eigen3::Eigen) # Link the option library against marketdata and payoff target_link_libraries(option PUBLIC marketdata payoff) diff --git a/include/option/base_option.h b/include/option/base_option.h index 028b5a7..7fb2e0f 100644 --- a/include/option/base_option.h +++ b/include/option/base_option.h @@ -50,8 +50,8 @@ namespace OptionPricer { [[nodiscard]] const Payoff& getPayoff() const; double getT() const; - double payoff() const; double payoff(const double& S) const; + double payoff(const double& S, const double& extremeS) const; protected: Option(const std::string& ticker, std::unique_ptr payoff, const double& T, diff --git a/include/option/path_dependent/lookback_option.h b/include/option/path_dependent/lookback_option.h index 303e24a..a616f54 100644 --- a/include/option/path_dependent/lookback_option.h +++ b/include/option/path_dependent/lookback_option.h @@ -20,8 +20,7 @@ namespace OptionPricer { [[nodiscard]] double calc_price() const override; private: - using LookbackOption::LookbackOption; - + using LookbackOption::LookbackOption; friend class FloatingStrikeLookbackOptionFactory; }; @@ -32,7 +31,6 @@ namespace OptionPricer { private: using LookbackOption::LookbackOption; - friend class FixedStrikeLookbackOptionFactory; }; diff --git a/include/solver/monte_carlo/mc_base_strategy.h b/include/solver/monte_carlo/mc_base_strategy.h index fe8b4ac..85c93fc 100644 --- a/include/solver/monte_carlo/mc_base_strategy.h +++ b/include/solver/monte_carlo/mc_base_strategy.h @@ -1,14 +1,18 @@ #ifndef MC_BASE_STRATEGY_H #define MC_BASE_STRATEGY_H +#include