Skip to content

Commit

Permalink
Replaced and renamed Swap example.
Browse files Browse the repository at this point in the history
  • Loading branch information
lballabio committed Nov 30, 2018
1 parent bd8af0b commit 4302551
Show file tree
Hide file tree
Showing 36 changed files with 611 additions and 1,969 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@ Examples/GlobalOptimizer/GlobalOptimizer
Examples/LatentModel/LatentModel
Examples/MarketModels/MarketModels
Examples/MultidimIntegral/MultidimIntegral
Examples/MulticurveBootstrapping/MulticurveBootstrapping
Examples/Replication/Replication
Examples/Repo/Repo
Examples/Swap/SwapValuation
test-suite/quantlib-test-suite
test-suite/quantlib-benchmark
test-suite/bin/*.exp
Expand Down
2 changes: 1 addition & 1 deletion Docs/pages/examples.docs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
done by supplying the FixedCouponBondForward constructor with a
flat repo YieldTermStructure.

\example swapvaluation.cpp
\example MulticurveBootstrapping.cpp
This example prices an interest rate swap over a term structure
and calculates its fair fixed rate and floating spread.

Expand Down
2 changes: 1 addition & 1 deletion Examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ add_subdirectory(GlobalOptimizer)
add_subdirectory(LatentModel)
add_subdirectory(MarketModels)
add_subdirectory(MultidimIntegral)
add_subdirectory(MulticurveBootstrapping)
add_subdirectory(Replication)
add_subdirectory(Repo)
add_subdirectory(Swap)
4 changes: 2 additions & 2 deletions Examples/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ SUBDIRS = \
LatentModel \
MarketModels \
MultidimIntegral \
MulticurveBootstrapping \
Replication \
Repo \
Swap
Repo

SUBDIR_CHECKS = $(SUBDIRS:%=%.check)

Expand Down
2 changes: 2 additions & 0 deletions Examples/MulticurveBootstrapping/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
add_executable(MulticurveBootstrapping MulticurveBootstrapping.cpp)
target_link_libraries(MulticurveBootstrapping ${QL_LINK_LIBRARY})
29 changes: 29 additions & 0 deletions Examples/MulticurveBootstrapping/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@

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

if AUTO_EXAMPLES
bin_PROGRAMS = MulticurveBootstrapping
TESTS = MulticurveBootstrapping$(EXEEXT)
else
noinst_PROGRAMS = MulticurveBootstrapping
endif
MulticurveBootstrapping_SOURCES = MulticurveBootstrapping.cpp
MulticurveBootstrapping_LDADD = ../../ql/libQuantLib.la ${BOOST_THREAD_LIB}

EXTRA_DIST = \
CMakeLists.txt \
MulticurveBootstrapping.vcxproj \
MulticurveBootstrapping.vcxproj.filters \
README.txt

.PHONY: examples check-examples

examples: MulticurveBootstrapping$(EXEEXT)

check-examples: examples
./MulticurveBootstrapping$(EXEEXT)

dist-hook:
mkdir -p $(distdir)/bin
mkdir -p $(distdir)/build

6 changes: 2 additions & 4 deletions Examples/MulticurveBootstrapping/MulticurveBootstrapping.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,8 @@

/* This example shows how to set up a Term Structure with ois Discounting
and then price a simple 5 year swap.
Boilerplate code was taken from swapvaluation.cpp
Example based on market data in paper by F. M. Ametrano and M. Blanchetti,
Example based on market data in paper by F. M. Ametrano and M. Bianchetti,
Everything You Always WAnted to Know About Multiple Interest RAte Curve Boostrapping
but Were Afraid to Ask (April 2, 2013).
http://ssrn.com/abstract=2219548
Expand Down Expand Up @@ -319,7 +317,7 @@ int main(int, char* []) {
double tolerance = 1.0e-15;

// Eonia curve
std::vector<ext::shared_ptr<RateHelper>> eoniaInstruments;
std::vector<ext::shared_ptr<RateHelper> > eoniaInstruments;
eoniaInstruments.push_back(dON);
eoniaInstruments.push_back(dTN);
eoniaInstruments.push_back(dSN);
Expand Down
1,106 changes: 537 additions & 569 deletions Examples/MulticurveBootstrapping/MulticurveBootstrapping.vcxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="swapvaluation.cpp">
<ClCompile Include="MulticurveBootstrapping.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>
</Project>
File renamed without changes.
2 changes: 0 additions & 2 deletions Examples/Swap/CMakeLists.txt

This file was deleted.

29 changes: 0 additions & 29 deletions Examples/Swap/Makefile.am

This file was deleted.

537 changes: 0 additions & 537 deletions Examples/Swap/Swap.vcxproj

This file was deleted.

Loading

0 comments on commit 4302551

Please sign in to comment.