Skip to content

Commit

Permalink
Merge pull request #943.
Browse files Browse the repository at this point in the history
Adding an experimental analytic pricer for forward-start european options in Heston model
  • Loading branch information
lballabio committed Nov 28, 2020
2 parents 176cce2 + a9bd208 commit 43272b2
Show file tree
Hide file tree
Showing 12 changed files with 656 additions and 101 deletions.
3 changes: 3 additions & 0 deletions QuantLib.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -720,6 +720,8 @@
<ClInclude Include="ql\experimental\finitedifferences\glued1dmesher.hpp" />
<ClInclude Include="ql\experimental\finitedifferences\modtriplebandlinearop.hpp" />
<ClInclude Include="ql\experimental\finitedifferences\vanillavppoption.hpp" />
<ClInclude Include="ql\experimental\forward\all.hpp" />
<ClInclude Include="ql\experimental\forward\analytichestonforwardeuropeanengine.hpp" />
<ClInclude Include="ql\experimental\futures\all.hpp" />
<ClInclude Include="ql\experimental\futures\overnightindexfuture.hpp" />
<ClInclude Include="ql\experimental\futures\overnightindexfutureratehelper.hpp" />
Expand Down Expand Up @@ -2039,6 +2041,7 @@
<ClCompile Include="ql\experimental\finitedifferences\fdsimpleklugeextouvppengine.cpp" />
<ClCompile Include="ql\experimental\finitedifferences\glued1dmesher.cpp" />
<ClCompile Include="ql\experimental\finitedifferences\vanillavppoption.cpp" />
<ClCompile Include="ql\experimental\forward\analytichestonforwardeuropeanengine.cpp" />
<ClCompile Include="ql\experimental\futures\overnightindexfuture.cpp" />
<ClCompile Include="ql\experimental\futures\overnightindexfutureratehelper.cpp" />
<ClCompile Include="ql\experimental\fx\blackdeltacalculator.cpp" />
Expand Down
9 changes: 9 additions & 0 deletions QuantLib.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -3060,6 +3060,12 @@
<ClInclude Include="ql\experimental\futures\overnightindexfutureratehelper.hpp">
<Filter>experimental\futures</Filter>
</ClInclude>
<ClInclude Include="ql\experimental\forward\all.hpp">
<Filter>experimental\futures</Filter>
</ClInclude>
<ClInclude Include="ql\experimental\forward\analytichestonforwardeuropeanengine.hpp">
<Filter>experimental\futures</Filter>
</ClInclude>
<ClInclude Include="ql\experimental\fx\all.hpp">
<Filter>experimental\fx</Filter>
</ClInclude>
Expand Down Expand Up @@ -7027,5 +7033,8 @@
<ClCompile Include="ql\math\integrals\exponentialintegrals.cpp">
<Filter>math\integrals</Filter>
</ClCompile>
<ClCompile Include="ql\experimental\forward\analytichestonforwardeuropeanengine.cpp">
<Filter>experimental\forward</Filter>
</ClCompile>
</ItemGroup>
</Project>
1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,7 @@ AC_CONFIG_FILES([
ql/experimental/credit/Makefile
ql/experimental/exoticoptions/Makefile
ql/experimental/finitedifferences/Makefile
ql/experimental/forward/Makefile
ql/experimental/futures/Makefile
ql/experimental/fx/Makefile
ql/experimental/inflation/Makefile
Expand Down
2 changes: 2 additions & 0 deletions ql/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ set(QuantLib_SRC
experimental/finitedifferences/fdsimpleklugeextouvppengine.cpp
experimental/finitedifferences/glued1dmesher.cpp
experimental/finitedifferences/vanillavppoption.cpp
experimental/forward/analytichestonforwardeuropeanengine.cpp
experimental/futures/overnightindexfuture.cpp
experimental/futures/overnightindexfutureratehelper.cpp
experimental/fx/blackdeltacalculator.cpp
Expand Down Expand Up @@ -1149,6 +1150,7 @@ set(QuantLib_HDR
experimental/finitedifferences/glued1dmesher.hpp
experimental/finitedifferences/modtriplebandlinearop.hpp
experimental/finitedifferences/vanillavppoption.hpp
experimental/forward/analytichestonforwardeuropeanengine.hpp
experimental/futures/all.hpp
experimental/futures/overnightindexfuture.hpp
experimental/futures/overnightindexfutureratehelper.hpp
Expand Down
3 changes: 2 additions & 1 deletion ql/experimental/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

SUBDIRS = amortizingbonds averageois barrieroption basismodels callablebonds \
catbonds commodities convertiblebonds coupons credit \
exoticoptions finitedifferences futures fx inflation lattices \
exoticoptions finitedifferences forward futures fx inflation lattices \
math mcbasket models processes risk shortrate swaptions \
termstructures variancegamma varianceoption volatility

Expand All @@ -26,6 +26,7 @@ libExperimental_la_LIBADD = \
credit/libCredit.la \
exoticoptions/libExoticOptions.la \
finitedifferences/libMultiDimFDM.la \
forward/libForward.la \
futures/libFutures.la \
fx/libFX.la \
inflation/libInflation.la \
Expand Down
1 change: 1 addition & 0 deletions ql/experimental/all.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include <ql/experimental/credit/all.hpp>
#include <ql/experimental/exoticoptions/all.hpp>
#include <ql/experimental/finitedifferences/all.hpp>
#include <ql/experimental/forward/all.hpp>
#include <ql/experimental/futures/all.hpp>
#include <ql/experimental/fx/all.hpp>
#include <ql/experimental/inflation/all.hpp>
Expand Down
45 changes: 45 additions & 0 deletions ql/experimental/forward/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@

AM_CPPFLAGS = -I${top_builddir} -I${top_srcdir}

this_includedir=${includedir}/${subdir}
this_include_HEADERS = \
all.hpp \
analytichestonforwardeuropeanengine.hpp

cpp_files = \
analytichestonforwardeuropeanengine.cpp

if UNITY_BUILD

nodist_libForward_la_SOURCES = unity.cpp

unity.cpp: Makefile.am
echo "/* This file is automatically generated; do not edit. */" > $@
echo "/* Add the files to be included into Makefile.am instead. */" >> $@
echo >> $@
for i in $(cpp_files); do \
echo "#include \"${subdir}/$$i\"" >> $@; \
done

EXTRA_DIST = $(cpp_files)

else

libForward_la_SOURCES = $(cpp_files)

endif

noinst_LTLIBRARIES = libForward.la

all.hpp: Makefile.am
echo "/* This file is automatically generated; do not edit. */" > ${srcdir}/$@
echo "/* Add the files to be included into Makefile.am instead. */" >> ${srcdir}/$@
echo >> ${srcdir}/$@
for i in $(filter-out all.hpp, $(this_include_HEADERS)); do \
echo "#include <${subdir}/$$i>" >> ${srcdir}/$@; \
done
echo >> ${srcdir}/$@
subdirs='$(SUBDIRS)'; for i in $$subdirs; do \
echo "#include <${subdir}/$$i/all.hpp>" >> ${srcdir}/$@; \
done

5 changes: 5 additions & 0 deletions ql/experimental/forward/all.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/* This file is automatically generated; do not edit. */
/* Add the files to be included into Makefile.am instead. */

#include <ql/experimental/forward/analytichestonforwardeuropeanengine.hpp>

Loading

0 comments on commit 43272b2

Please sign in to comment.