This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required(VERSION 3.20) | |
project(Chp2_Equity_CLionTest) | |
set(CMAKE_CXX_STANDARD 14) | |
set(BOOST_ROOT "C:/local/boost_1_65_0") | |
set(Boost_INCLUDE_DIR "C:/local/boost_1_65_0" ) | |
set(Boost_LIBRARY_DIR "C:/local/boost_1_65_0/lib32-msvc-14.1" ) | |
find_package(Boost 1.65.0 REQUIRED) | |
find_package(QuantLib CONFIG REQUIRED) | |
add_executable(Chp2_Equity_CLionTest main.cpp) | |
target_include_directories(Chp2_Equity_CLionTest PRIVATE ${Boost_INCLUDE_DIRS}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# response to question asked on the Quantlib-users mailing list: https://sourceforge.net/p/quantlib/mailman/message/37391738/ | |
# based off of http://gouthamanbalaraman.com/blog/american-option-pricing-quantlib-python.html | |
import QuantLib as ql | |
import scipy.optimize | |
maturity_date = ql.Date(15, 1, 2016) | |
spot_price = 127.62 | |
strike_price = 130 | |
volatility = 0.20 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": 2, | |
"configurePresets": [ | |
{ | |
"name": "linux-clang-debug", | |
"binaryDir": "${sourceDir}/build", | |
"generator": "Unix Makefiles", | |
"cacheVariables": { | |
"CMAKE_BUILD_TYPE": "Debug", | |
"CMAKE_CXX_COMPILER": "clang++" |