pax_global_header 0000666 0000000 0000000 00000000064 15037412061 0014511 g ustar 00root root 0000000 0000000 52 comment=9c4164cefb8272ed6c08babd2693c2c1f1dc5ea0
QuantLib-SWIG-1.39/ 0000775 0000000 0000000 00000000000 15037412061 0013733 5 ustar 00root root 0000000 0000000 QuantLib-SWIG-1.39/.ci/ 0000775 0000000 0000000 00000000000 15037412061 0014404 5 ustar 00root root 0000000 0000000 QuantLib-SWIG-1.39/.ci/csharp.build 0000775 0000000 0000000 00000000164 15037412061 0016711 0 ustar 00root root 0000000 0000000 #!/bin/bash
set -e
./autogen.sh
./configure CC=clang CXX=clang++ CXXFLAGS='-O2'
make -C CSharp SWIGFLAGS='-Werror'
QuantLib-SWIG-1.39/.ci/csharp.check 0000775 0000000 0000000 00000000051 15037412061 0016662 0 ustar 00root root 0000000 0000000 #!/bin/bash
set -e
make -C CSharp check
QuantLib-SWIG-1.39/.ci/csharp.install 0000775 0000000 0000000 00000000023 15037412061 0017252 0 ustar 00root root 0000000 0000000 #!/bin/bash
set -e
QuantLib-SWIG-1.39/.ci/java-new.build 0000775 0000000 0000000 00000000510 15037412061 0017134 0 ustar 00root root 0000000 0000000 #!/bin/bash
set -e
./autogen.sh
./configure --disable-java-finalizer --enable-java-autocloseable \
--with-jdk-include=/usr/lib/jvm/default-java/include \
--with-jdk-system-include=/usr/lib/jvm/default-java/include/linux \
CC=clang CXX=clang++ CXXFLAGS='-O2'
make -C Java SWIGFLAGS='-Werror'
QuantLib-SWIG-1.39/.ci/java-new.check 0000775 0000000 0000000 00000000047 15037412061 0017117 0 ustar 00root root 0000000 0000000 #!/bin/bash
set -e
make -C Java check
QuantLib-SWIG-1.39/.ci/java-new.install 0000775 0000000 0000000 00000000023 15037412061 0017502 0 ustar 00root root 0000000 0000000 #!/bin/bash
set -e
QuantLib-SWIG-1.39/.ci/java-old.build 0000775 0000000 0000000 00000000405 15037412061 0017124 0 ustar 00root root 0000000 0000000 #!/bin/bash
set -e
./autogen.sh
./configure --with-jdk-include=/usr/lib/jvm/default-java/include \
--with-jdk-system-include=/usr/lib/jvm/default-java/include/linux \
CC=clang CXX=clang++ CXXFLAGS='-O2'
make -C Java SWIGFLAGS='-Werror'
QuantLib-SWIG-1.39/.ci/java-old.check 0000775 0000000 0000000 00000000047 15037412061 0017104 0 ustar 00root root 0000000 0000000 #!/bin/bash
set -e
make -C Java check
QuantLib-SWIG-1.39/.ci/java-old.install 0000775 0000000 0000000 00000000023 15037412061 0017467 0 ustar 00root root 0000000 0000000 #!/bin/bash
set -e
QuantLib-SWIG-1.39/.ci/python.build 0000775 0000000 0000000 00000000302 15037412061 0016744 0 ustar 00root root 0000000 0000000 #!/bin/bash
set -e
python3 -m venv .venv
. .venv/bin/activate
pip install setuptools build tox
./autogen.sh
./configure CC=clang CXX=clang++ CXXFLAGS='-O1'
make -C Python SWIGFLAGS='-Werror'
QuantLib-SWIG-1.39/.ci/python.check 0000775 0000000 0000000 00000000220 15037412061 0016721 0 ustar 00root root 0000000 0000000 #!/bin/bash
set -e
. .venv/bin/activate
make -C Python check
for i in Python/examples/*.py
do
echo "$i"
python "$i" || break -1
done
QuantLib-SWIG-1.39/.ci/python.install 0000775 0000000 0000000 00000000304 15037412061 0017315 0 ustar 00root root 0000000 0000000 #!/bin/bash
set -e
. .venv/bin/activate
pip install Python/dist/*.whl
grep -v QuantLib binder/requirements.txt > Python/examples/requirements.txt
pip install -r Python/examples/requirements.txt
QuantLib-SWIG-1.39/.ci/r.build 0000775 0000000 0000000 00000000255 15037412061 0015673 0 ustar 00root root 0000000 0000000 #!/bin/bash
set -e
mkdir -p ~/.R
echo 'CC=clang' > ~/.R/Makevars
echo 'CXX=clang++' >> ~/.R/Makevars
./autogen.sh
./configure CXXFLAGS='-O0'
make -C R SWIGFLAGS='-Werror'
QuantLib-SWIG-1.39/.ci/r.check 0000775 0000000 0000000 00000000203 15037412061 0015642 0 ustar 00root root 0000000 0000000 #!/bin/bash
set -e
echo Execute Scripts in demo folder
for fn in ./R/demo/*.R
do
echo $fn
Rscript "$fn" || break -1
done
QuantLib-SWIG-1.39/.ci/r.install 0000775 0000000 0000000 00000000066 15037412061 0016242 0 ustar 00root root 0000000 0000000 #!/bin/bash
set -e
R CMD INSTALL ./R.Rcheck/QuantLib
QuantLib-SWIG-1.39/.ci/scala.build 0000775 0000000 0000000 00000000342 15037412061 0016512 0 ustar 00root root 0000000 0000000 #!/bin/bash
set -e
./autogen.sh
./configure --with-jdk-include=/usr/lib/jvm/default-java/include \
--with-jdk-system-include=/usr/lib/jvm/default-java/include/linux CXXFLAGS='-O2'
make -C Java SWIGFLAGS='-Werror'
QuantLib-SWIG-1.39/.ci/scala.check 0000775 0000000 0000000 00000000050 15037412061 0016464 0 ustar 00root root 0000000 0000000 #!/bin/bash
set -e
make -C Scala check
QuantLib-SWIG-1.39/.ci/scala.install 0000775 0000000 0000000 00000000023 15037412061 0017055 0 ustar 00root root 0000000 0000000 #!/bin/bash
set -e
QuantLib-SWIG-1.39/.github/ 0000775 0000000 0000000 00000000000 15037412061 0015273 5 ustar 00root root 0000000 0000000 QuantLib-SWIG-1.39/.github/boring-cyborg.yml 0000664 0000000 0000000 00000001145 15037412061 0020562 0 ustar 00root root 0000000 0000000
# Comment to be posted to welcome users when they open their first PR
firstPRWelcomeComment: >
Thanks for opening this pull request! It might take a while before we look at it, so don't worry if there seems to be no feedback. We'll get to it.
# Comment to be posted to congratulate user on their first merged PR
firstPRMergeComment: >
Congratulations on your first merged pull request!
# Comment to be posted to on first time issues
firstIssueWelcomeComment: >
Thanks for posting! It might take a while before we look at your issue, so don't worry if there seems to be no feedback. We'll get to it.
QuantLib-SWIG-1.39/.github/dependabot.yml 0000664 0000000 0000000 00000000261 15037412061 0020122 0 ustar 00root root 0000000 0000000 version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
# Check for updates to GitHub Actions every weekday
interval: "weekly"
QuantLib-SWIG-1.39/.github/workflows/ 0000775 0000000 0000000 00000000000 15037412061 0017330 5 ustar 00root root 0000000 0000000 QuantLib-SWIG-1.39/.github/workflows/copyrights.yml 0000664 0000000 0000000 00000001150 15037412061 0022243 0 ustar 00root root 0000000 0000000 name: Update copyright list
on:
push:
branches:
- '**'
jobs:
copyrights:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check
run: |
./tools/check_copyrights.sh
- uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: update-copyright-list-${{ github.ref_name }}
delete-branch: true
commit-message: 'Update copyright list in license'
title: 'Update copyright list in license'
author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
QuantLib-SWIG-1.39/.github/workflows/devenv-images.yml 0000664 0000000 0000000 00000006024 15037412061 0022607 0 ustar 00root root 0000000 0000000 name: Build quantlib-swig-devenv Docker images
on:
schedule:
- cron: '0 0 * * 6'
workflow_dispatch:
jobs:
docker-images-base:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Checkout latest QuantLib master
uses: actions/checkout@v4
with:
repository: lballabio/QuantLib
path: dockerfiles/QuantLib
- name: Build Docker images
working-directory: dockerfiles
run: |
rm -rf QuantLib/.git
docker build -f ci.base.Dockerfile --build-arg tag=noble -t ghcr.io/lballabio/quantlib-swig-devenv:base .
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GHCR_PAT }}
- name: Push Docker images
run: |
docker push ghcr.io/lballabio/quantlib-swig-devenv:base
docker-images-ql:
runs-on: ubuntu-latest
needs: docker-images-base
strategy:
matrix:
tag: [default, threadsafe]
steps:
- uses: actions/checkout@v4
- name: Build Docker images
working-directory: dockerfiles
run: |
docker build -f ci.${{ matrix.tag }}.Dockerfile -t ghcr.io/lballabio/quantlib-swig-devenv:${{ matrix.tag }} .
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GHCR_PAT }}
- name: Push Docker images
run: |
docker push ghcr.io/lballabio/quantlib-swig-devenv:${{ matrix.tag }}
docker-images-base-languages:
runs-on: ubuntu-latest
needs: docker-images-ql
strategy:
matrix:
lang: [python, csharp, java, r]
steps:
- uses: actions/checkout@v4
- name: Build Docker images
working-directory: dockerfiles
run: |
docker build -f ci.${{ matrix.lang }}.Dockerfile -t ghcr.io/lballabio/quantlib-swig-devenv:${{ matrix.lang }} .
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GHCR_PAT }}
- name: Push Docker images
run: |
docker push ghcr.io/lballabio/quantlib-swig-devenv:${{ matrix.lang }}
docker-images-dependent-languages:
runs-on: ubuntu-latest
needs: docker-images-base-languages
strategy:
matrix:
lang: [scala]
steps:
- uses: actions/checkout@v4
- name: Build Docker images
working-directory: dockerfiles
run: |
docker build -f ci.${{ matrix.lang }}.Dockerfile -t ghcr.io/lballabio/quantlib-swig-devenv:${{ matrix.lang }} .
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GHCR_PAT }}
- name: Push Docker images
run: |
docker push ghcr.io/lballabio/quantlib-swig-devenv:${{ matrix.lang }}
QuantLib-SWIG-1.39/.github/workflows/linux.yml 0000664 0000000 0000000 00000001501 15037412061 0021207 0 ustar 00root root 0000000 0000000 name: Linux build
on:
push:
pull_request:
schedule:
- cron: '0 0 * * 0'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- language: python
- language: java
config: -old
- language: java
config: -new
- language: csharp
- language: r
- language: scala
container: ghcr.io/lballabio/quantlib-swig-devenv:${{ matrix.language }}
steps:
- uses: actions/checkout@v4
- name: Build
run: |
./.ci/${{ matrix.language }}${{ matrix.config }}.build
- name: Install
run: |
./.ci/${{ matrix.language }}${{ matrix.config }}.install
- name: Check
run: |
./.ci/${{ matrix.language }}${{ matrix.config }}.check
QuantLib-SWIG-1.39/.github/workflows/misspell.yml 0000664 0000000 0000000 00000001070 15037412061 0021701 0 ustar 00root root 0000000 0000000 name: Misspell fixer
on:
push:
branches:
- '**'
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: sobolevn/misspell-fixer-action@master
- uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: misspell-fixes-${{ github.ref_name }}
delete-branch: true
commit-message: 'Fixes by misspell-fixer'
title: 'Typos fixed by misspell-fixer'
author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
QuantLib-SWIG-1.39/.github/workflows/namespaces.yml 0000664 0000000 0000000 00000002664 15037412061 0022202 0 ustar 00root root 0000000 0000000 name: Fix uses of boost and/or ext namespace
on:
push:
branches:
- '**'
jobs:
namespaces:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check
run: |
sed -i -e 's/boost::shared_ptr\b/ext::shared_ptr/g' SWIG/*
sed -i -e 's/boost::make_shared\b/ext::make_shared/g' SWIG/*
sed -i -e 's/boost::dynamic_pointer_cast\b/ext::dynamic_pointer_cast/g' SWIG/*
sed -i -e 's/ext::tuple\b/std::tuple/g' SWIG/*
sed -i -e 's/ext::make_tuple\b/std::make_tuple/g' SWIG/*
sed -i -e 's/ext::get\b/std::get/g' SWIG/*
sed -i -e 's/ext::tie\b/std::tie/g' SWIG/*
sed -i -e 's/ext::function\b/std::function/g' SWIG/*
sed -i -e 's/ext::bind\b/std::bind/g' SWIG/*
sed -i -e 's/ext::ref\b/std::ref/g' SWIG/*
sed -i -e 's/ext::cref\b/std::cref/g' SWIG/*
sed -i -e 's/ext::placeholders\b/std::placeholders/g' SWIG/*
sed -i -e 's/boost::optional\b/ext::optional/g' SWIG/*
sed -i -e 's/boost::none\b/ext::nullopt/g' SWIG/*
- uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: fix-boost-namespace-${{ github.ref_name }}
delete-branch: true
commit-message: 'Fix uses of boost and/or ext namespace'
title: 'Fix uses of boost and/or ext namespace'
author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
QuantLib-SWIG-1.39/.github/workflows/stale.yml 0000664 0000000 0000000 00000002223 15037412061 0021162 0 ustar 00root root 0000000 0000000 name: Close stale issues and PR
on:
schedule:
- cron: '30 1 * * *'
jobs:
staleness-check:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v9
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'This issue was automatically marked as stale because it has been open 60 days with no activity. Remove stale label or comment, or this will be closed in two weeks.'
close-issue-message: 'This issue was automatically closed because it has been stalled for two weeks with no further activity.'
stale-pr-message: 'This PR was automatically marked as stale because it has been open 60 days with no activity. Remove stale label or comment, or this will be closed in two weeks.'
close-pr-message: 'This PR was automatically closed because it has been stalled for two weeks with no further activity.'
days-before-stale: 60
days-before-close: 14
stale-issue-label: 'stale'
stale-pr-label: 'stale'
exempt-issue-labels: 'help wanted,in progress'
exempt-pr-labels: 'help wanted,in progress'
exempt-all-milestones: true
QuantLib-SWIG-1.39/.gitignore 0000664 0000000 0000000 00000001011 15037412061 0015714 0 ustar 00root root 0000000 0000000 # Compilation artifacts
configure
aclocal.m4
autom4te.cache
config.log
config.status
config/
# Build outputs
**/x64/Debug
**/x64/Release
**/Debug
**/Release
**/bin/*.xml
**/bin/*.manifest
# IDEs
.idea
.vscode
cmake-build-debug
# Artifacts created in multiple directories
Makefile
Makefile.in
.build-stamp
testCaseCollection.xml
.deps
.libs
*.la
*.lo
*.o
*.so
*.dylib
*.exe
*.dll
*.exp
*.lib
*.pdb
*.ilk
*.class
*~
*.ncb
*.suo
*.vcproj.*.user
*.vcxproj.user
*.VC.db
*.VC.opendb
*.log
*.sdf
*.opensdf
*.pch
*.idb
*.ipch
QuantLib-SWIG-1.39/.misspell-fixer.ignore 0000664 0000000 0000000 00000000022 15037412061 0020153 0 ustar 00root root 0000000 0000000 ^./ChangeLog.txt
QuantLib-SWIG-1.39/CSharp/ 0000775 0000000 0000000 00000000000 15037412061 0015113 5 ustar 00root root 0000000 0000000 QuantLib-SWIG-1.39/CSharp/.gitignore 0000664 0000000 0000000 00000000174 15037412061 0017105 0 ustar 00root root 0000000 0000000 cpp/quantlib_wrap.cpp
cpp/quantlib_wrap.h
csharp/*.cs
NQuantLib.dll
cpp/build
csharp/obj
examples/*/bin
examples/*/obj
.vs/
QuantLib-SWIG-1.39/CSharp/Makefile.am 0000664 0000000 0000000 00000006017 15037412061 0017153 0 ustar 00root root 0000000 0000000
CLEANFILES = cpp/quantlib_wrap.* cpp/*.so cpp/*.dylib csharp/*.cs *.dll
BUILT_SOURCES = cpp/quantlib_wrap.cpp cpp/quantlib_wrap.h
if HAVE_DOTNET
if BUILD_DOTNET
all-local: cpp/libNQuantLibc.@SHARED_LIB_EXTENSION@ csharp/bin/Release/net6.0/NQuantLib.dll
cpp/libNQuantLibc.@SHARED_LIB_EXTENSION@: cpp/quantlib_wrap.o
$(CXX) -shared cpp/quantlib_wrap.o -o cpp/libNQuantLibc.@SHARED_LIB_EXTENSION@ `quantlib-config --libs`
cpp/quantlib_wrap.o: $(BUILT_SOURCES)
$(CXX) -c -fpic $(CXXFLAGS) cpp/quantlib_wrap.cpp -o cpp/quantlib_wrap.o `quantlib-config --cflags`
csharp/bin/Release/net6.0/NQuantLib.dll: $(BUILT_SOURCES)
$(DOTNET) build --nologo -c Release -p:Version=$(PACKAGE_VERSION) csharp/NQuantLib.csproj
nupkg: cpp/libNQuantLibc.@SHARED_LIB_EXTENSION@ csharp/bin/Release/net6.0/NQuantLib.dll
$(DOTNET) pack --no-build -c Release -p:PackageVersion=$(PACKAGE_VERSION) --include-symbols --include-source csharp/NQuantLib.csproj
check-local: cpp/libNQuantLibc.@SHARED_LIB_EXTENSION@ csharp/bin/Release/net6.0/NQuantLib.dll
ln -f cpp/libNQuantLibc.@SHARED_LIB_EXTENSION@ examples/
cd examples && LD_LIBRARY_PATH=. $(DOTNET) run -c Release --project BermudanSwaption/BermudanSwaption.csproj
cd examples && LD_LIBRARY_PATH=. $(DOTNET) run -c Release --project EquityOption/EquityOption.csproj
cd examples && LD_LIBRARY_PATH=. $(DOTNET) run -c Release --project FiniteDifferenceMethods/FiniteDifferenceMethods.csproj
cd examples && LD_LIBRARY_PATH=. $(DOTNET) run -c Release --project Times/Times.csproj
rm -f examples/libNQuantLibc.@SHARED_LIB_EXTENSION@
clean-local:
rm -rf csharp/bin csharp/obj examples/*/bin examples/*/obj
endif
endif
$(BUILT_SOURCES): ../SWIG/*.i
rm -f csharp/*.cs
$(SWIG) $(SWIGFLAGS) -csharp -c++ -outdir csharp \
-namespace QuantLib -o cpp/quantlib_wrap.cpp ../SWIG/quantlib.i
dist-hook: $(BUILT_SOURCES)
mkdir -p $(distdir)/cpp
cp ./cpp/*.vcxproj $(distdir)/cpp
cp ./cpp/quantlib_wrap.cpp $(distdir)/cpp
cp ./cpp/quantlib_wrap.h $(distdir)/cpp
mkdir -p $(distdir)/csharp
cp ./csharp/*.csproj $(distdir)/csharp
cp ./csharp/*.cs $(distdir)/csharp
mkdir -p $(distdir)/examples
mkdir -p $(distdir)/examples/BermudanSwaption
cp ./examples/BermudanSwaption/BermudanSwaption.csproj $(distdir)/examples/BermudanSwaption
cp ./examples/BermudanSwaption/BermudanSwaption.cs $(distdir)/examples/BermudanSwaption
mkdir -p $(distdir)/examples/EquityOption
cp ./examples/EquityOption/EquityOption.csproj $(distdir)/examples/EquityOption
cp ./examples/EquityOption/EquityOption.cs $(distdir)/examples/EquityOption
mkdir -p $(distdir)/examples/FiniteDifferenceMethods
cp ./examples/FiniteDifferenceMethods/FiniteDifferenceMethods.csproj $(distdir)/examples/FiniteDifferenceMethods
cp ./examples/FiniteDifferenceMethods/FiniteDifferenceMethods.cs $(distdir)/examples/FiniteDifferenceMethods
mkdir -p $(distdir)/examples/Times
cp ./examples/Times/Times.csproj $(distdir)/examples/Times
cp ./examples/Times/Times.cs $(distdir)/examples/Times
EXTRA_DIST = \
QuantLib.sln \
QuantLib.props \
swig.cmd \
README.txt
QuantLib-SWIG-1.39/CSharp/QuantLib.props 0000664 0000000 0000000 00000001653 15037412061 0017724 0 ustar 00root root 0000000 0000000
v100
v110
v120
v130
v140
v141
v142
v143
QuantLib-SWIG-1.39/CSharp/QuantLib.sln 0000664 0000000 0000000 00000013746 15037412061 0017363 0 ustar 00root root 0000000 0000000 Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.31515.178
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BermudanSwaption", "examples\BermudanSwaption\BermudanSwaption.csproj", "{1BEC49E8-122D-4CC9-9DAC-DD59F551E5E9}"
ProjectSection(ProjectDependencies) = postProject
{21183104-9963-4D4F-B7E8-C8A6169FD053} = {21183104-9963-4D4F-B7E8-C8A6169FD053}
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EquityOption", "examples\EquityOption\EquityOption.csproj", "{1FD947F1-D99E-46FB-8890-04E11E8340C2}"
ProjectSection(ProjectDependencies) = postProject
{21183104-9963-4D4F-B7E8-C8A6169FD053} = {21183104-9963-4D4F-B7E8-C8A6169FD053}
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FiniteDifferenceMethods", "examples\FiniteDifferenceMethods\FiniteDifferenceMethods.csproj", "{EF2AFADF-B632-4E95-BEB5-7B7109A9E4FD}"
ProjectSection(ProjectDependencies) = postProject
{21183104-9963-4D4F-B7E8-C8A6169FD053} = {21183104-9963-4D4F-B7E8-C8A6169FD053}
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NQuantLib", "csharp\NQuantLib.csproj", "{928F98EE-7D50-457F-9304-A6818DCF1079}"
ProjectSection(ProjectDependencies) = postProject
{21183104-9963-4D4F-B7E8-C8A6169FD053} = {21183104-9963-4D4F-B7E8-C8A6169FD053}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NQuantLibc", "cpp\QuantLibWrapper.vcxproj", "{21183104-9963-4D4F-B7E8-C8A6169FD053}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Times", "examples\Times\Times.csproj", "{C93F5204-5BC9-4AB3-AC06-C2CCE166CEBD}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{1BEC49E8-122D-4CC9-9DAC-DD59F551E5E9}.Debug|Win32.ActiveCfg = Debug|Any CPU
{1BEC49E8-122D-4CC9-9DAC-DD59F551E5E9}.Debug|Win32.Build.0 = Debug|Any CPU
{1BEC49E8-122D-4CC9-9DAC-DD59F551E5E9}.Debug|x64.ActiveCfg = Debug|Any CPU
{1BEC49E8-122D-4CC9-9DAC-DD59F551E5E9}.Debug|x64.Build.0 = Debug|Any CPU
{1BEC49E8-122D-4CC9-9DAC-DD59F551E5E9}.Release|Win32.ActiveCfg = Release|Any CPU
{1BEC49E8-122D-4CC9-9DAC-DD59F551E5E9}.Release|Win32.Build.0 = Release|Any CPU
{1BEC49E8-122D-4CC9-9DAC-DD59F551E5E9}.Release|x64.ActiveCfg = Release|Any CPU
{1BEC49E8-122D-4CC9-9DAC-DD59F551E5E9}.Release|x64.Build.0 = Release|Any CPU
{1FD947F1-D99E-46FB-8890-04E11E8340C2}.Debug|Win32.ActiveCfg = Debug|Any CPU
{1FD947F1-D99E-46FB-8890-04E11E8340C2}.Debug|Win32.Build.0 = Debug|Any CPU
{1FD947F1-D99E-46FB-8890-04E11E8340C2}.Debug|x64.ActiveCfg = Debug|Any CPU
{1FD947F1-D99E-46FB-8890-04E11E8340C2}.Debug|x64.Build.0 = Debug|Any CPU
{1FD947F1-D99E-46FB-8890-04E11E8340C2}.Release|Win32.ActiveCfg = Release|Any CPU
{1FD947F1-D99E-46FB-8890-04E11E8340C2}.Release|Win32.Build.0 = Release|Any CPU
{1FD947F1-D99E-46FB-8890-04E11E8340C2}.Release|x64.ActiveCfg = Release|Any CPU
{1FD947F1-D99E-46FB-8890-04E11E8340C2}.Release|x64.Build.0 = Release|Any CPU
{EF2AFADF-B632-4E95-BEB5-7B7109A9E4FD}.Debug|Win32.ActiveCfg = Debug|Any CPU
{EF2AFADF-B632-4E95-BEB5-7B7109A9E4FD}.Debug|Win32.Build.0 = Debug|Any CPU
{EF2AFADF-B632-4E95-BEB5-7B7109A9E4FD}.Debug|x64.ActiveCfg = Debug|Any CPU
{EF2AFADF-B632-4E95-BEB5-7B7109A9E4FD}.Debug|x64.Build.0 = Debug|Any CPU
{EF2AFADF-B632-4E95-BEB5-7B7109A9E4FD}.Release|Win32.ActiveCfg = Release|Any CPU
{EF2AFADF-B632-4E95-BEB5-7B7109A9E4FD}.Release|Win32.Build.0 = Release|Any CPU
{EF2AFADF-B632-4E95-BEB5-7B7109A9E4FD}.Release|x64.ActiveCfg = Release|Any CPU
{EF2AFADF-B632-4E95-BEB5-7B7109A9E4FD}.Release|x64.Build.0 = Release|Any CPU
{928F98EE-7D50-457F-9304-A6818DCF1079}.Debug|Win32.ActiveCfg = Debug|Any CPU
{928F98EE-7D50-457F-9304-A6818DCF1079}.Debug|Win32.Build.0 = Debug|Any CPU
{928F98EE-7D50-457F-9304-A6818DCF1079}.Debug|x64.ActiveCfg = Debug|Any CPU
{928F98EE-7D50-457F-9304-A6818DCF1079}.Debug|x64.Build.0 = Debug|Any CPU
{928F98EE-7D50-457F-9304-A6818DCF1079}.Release|Win32.ActiveCfg = Release|Any CPU
{928F98EE-7D50-457F-9304-A6818DCF1079}.Release|Win32.Build.0 = Release|Any CPU
{928F98EE-7D50-457F-9304-A6818DCF1079}.Release|x64.ActiveCfg = Release|Any CPU
{928F98EE-7D50-457F-9304-A6818DCF1079}.Release|x64.Build.0 = Release|Any CPU
{21183104-9963-4D4F-B7E8-C8A6169FD053}.Debug|Win32.ActiveCfg = Debug|Win32
{21183104-9963-4D4F-B7E8-C8A6169FD053}.Debug|Win32.Build.0 = Debug|Win32
{21183104-9963-4D4F-B7E8-C8A6169FD053}.Debug|x64.ActiveCfg = Debug|x64
{21183104-9963-4D4F-B7E8-C8A6169FD053}.Debug|x64.Build.0 = Debug|x64
{21183104-9963-4D4F-B7E8-C8A6169FD053}.Release|Win32.ActiveCfg = Release|Win32
{21183104-9963-4D4F-B7E8-C8A6169FD053}.Release|Win32.Build.0 = Release|Win32
{21183104-9963-4D4F-B7E8-C8A6169FD053}.Release|x64.ActiveCfg = Release|x64
{21183104-9963-4D4F-B7E8-C8A6169FD053}.Release|x64.Build.0 = Release|x64
{C93F5204-5BC9-4AB3-AC06-C2CCE166CEBD}.Debug|Win32.ActiveCfg = Debug|Any CPU
{C93F5204-5BC9-4AB3-AC06-C2CCE166CEBD}.Debug|Win32.Build.0 = Debug|Any CPU
{C93F5204-5BC9-4AB3-AC06-C2CCE166CEBD}.Debug|x64.ActiveCfg = Debug|Any CPU
{C93F5204-5BC9-4AB3-AC06-C2CCE166CEBD}.Debug|x64.Build.0 = Debug|Any CPU
{C93F5204-5BC9-4AB3-AC06-C2CCE166CEBD}.Release|Win32.ActiveCfg = Release|Any CPU
{C93F5204-5BC9-4AB3-AC06-C2CCE166CEBD}.Release|Win32.Build.0 = Release|Any CPU
{C93F5204-5BC9-4AB3-AC06-C2CCE166CEBD}.Release|x64.ActiveCfg = Release|Any CPU
{C93F5204-5BC9-4AB3-AC06-C2CCE166CEBD}.Release|x64.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {D5A8DD18-AC31-4E40-A70A-11339ED8FAE8}
EndGlobalSection
EndGlobal
QuantLib-SWIG-1.39/CSharp/README.txt 0000664 0000000 0000000 00000000606 15037412061 0016613 0 ustar 00root root 0000000 0000000
Visual Studio .NET projects are provided; note that before launching
the IDE, you'll have to define an environment variable QL_DIR whose
value must equal the path to your QuantLib installation, e.g.,
"C:\Lib\QuantLib".
The interfaces also work with .Net on Linux and macOS; run 'make' in
this directory after running './autogen.sh' and './configure' in the
main QuantLib-SWIG directory.
QuantLib-SWIG-1.39/CSharp/cpp/ 0000775 0000000 0000000 00000000000 15037412061 0015675 5 ustar 00root root 0000000 0000000 QuantLib-SWIG-1.39/CSharp/cpp/QuantLibWrapper.vcxproj 0000664 0000000 0000000 00000026604 15037412061 0022402 0 ustar 00root root 0000000 0000000
Debug
Win32
Debug
x64
Release
Win32
Release
x64
NQuantLibc
{21183104-9963-4D4F-B7E8-C8A6169FD053}
NQuantLibc
Win32Proj
DynamicLibrary
MultiByte
DynamicLibrary
MultiByte
DynamicLibrary
MultiByte
DynamicLibrary
MultiByte
<_ProjectFileVersion>10.0.30319.1
bin\$(Platform)\Debug\
build\$(Platform)\Debug\
true
bin\$(Platform)\Release\
build\$(Platform)\Release\
false
AllRules.ruleset
AllRules.ruleset
Disabled
stdcpp17
$(QL_DIR);%(AdditionalIncludeDirectories)
WIN32;_DEBUG;_WINDOWS;_USRDLL;QUANTLIBWRAPPER_EXPORTS;_cplusplus;NOMINMAX;%(PreprocessorDefinitions)
true
EnableFastChecks
MultiThreadedDebugDLL
true
Level3
EditAndContinue
/bigobj %(AdditionalOptions)
$(OutDir)NQuantLibc.dll
$(QL_DIR)\lib;%(AdditionalLibraryDirectories)
true
$(OutDir)QuantlibWrapper.pdb
Windows
false
$(OutDir)NQuantLibc.lib
MachineX86
copy "$(OutDir)NQuantLibc.dll" "$(ProjectDir)"
Disabled
stdcpp17
$(QL_DIR);%(AdditionalIncludeDirectories)
WIN32;_DEBUG;_WINDOWS;_USRDLL;QUANTLIBWRAPPER_EXPORTS;_cplusplus;NOMINMAX;%(PreprocessorDefinitions)
EnableFastChecks
MultiThreadedDebugDLL
true
Level3
ProgramDatabase
/bigobj %(AdditionalOptions)
$(OutDir)NQuantLibc.dll
$(QL_DIR)\lib;%(AdditionalLibraryDirectories)
true
$(OutDir)QuantlibWrapper.pdb
Windows
false
$(OutDir)NQuantLibc.lib
copy "$(OutDir)NQuantLibc.dll" "$(ProjectDir)"
stdcpp17
$(QL_DIR);%(AdditionalIncludeDirectories)
WIN32;NDEBUG;_WINDOWS;_USRDLL;QUANTLIBWRAPPER_EXPORTS;%(PreprocessorDefinitions)
MultiThreadedDLL
true
true
Level3
ProgramDatabase
4244;%(DisableSpecificWarnings)
/bigobj %(AdditionalOptions)
$(OutDir)NQuantLibc.dll
$(QL_DIR)\lib;%(AdditionalLibraryDirectories)
true
Windows
true
true
false
$(OutDir)NQuantLibc.lib
MachineX86
copy "$(OutDir)NQuantLibc.dll" "$(ProjectDir)"
stdcpp17
$(QL_DIR);%(AdditionalIncludeDirectories)
WIN32;NDEBUG;_WINDOWS;_USRDLL;QUANTLIBWRAPPER_EXPORTS;%(PreprocessorDefinitions)
MultiThreadedDLL
true
true
Level3
ProgramDatabase
4244;%(DisableSpecificWarnings)
/bigobj %(AdditionalOptions)
$(OutDir)NQuantLibc.dll
$(QL_DIR)\lib;%(AdditionalLibraryDirectories)
true
Windows
true
true
false
$(OutDir)NQuantLibc.lib
copy "$(OutDir)NQuantLibc.dll" "$(ProjectDir)"
QuantLib-SWIG-1.39/CSharp/cpp/QuantLibWrapper.vcxproj.filters 0000664 0000000 0000000 00000002041 15037412061 0024036 0 ustar 00root root 0000000 0000000
{4FC737F1-C7A5-4376-A066-2A32D752A2FF}
cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx
{93995380-89BD-4b04-88EB-625FBE52EBFB}
h;hpp;hxx;hm;inl;inc;xsd
{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx
Source Files
Header Files
QuantLib-SWIG-1.39/CSharp/csharp/ 0000775 0000000 0000000 00000000000 15037412061 0016373 5 ustar 00root root 0000000 0000000 QuantLib-SWIG-1.39/CSharp/csharp/NQuantLib.csproj 0000664 0000000 0000000 00000002110 15037412061 0021444 0 ustar 00root root 0000000 0000000
net6.0
QuantLib
runtimes/win-x64/native
runtimes/linux-x64/native
runtimes/osx-x64/native
QuantLib-SWIG-1.39/CSharp/examples/ 0000775 0000000 0000000 00000000000 15037412061 0016731 5 ustar 00root root 0000000 0000000 QuantLib-SWIG-1.39/CSharp/examples/BermudanSwaption/ 0000775 0000000 0000000 00000000000 15037412061 0022213 5 ustar 00root root 0000000 0000000 QuantLib-SWIG-1.39/CSharp/examples/BermudanSwaption/BermudanSwaption.cs 0000664 0000000 0000000 00000027520 15037412061 0026032 0 ustar 00root root 0000000 0000000 /*
Copyright (C) 2005 Dominic Thuillier
This file is part of QuantLib, a free-software/open-source library
for financial quantitative analysts and developers - http://quantlib.org/
QuantLib is free software: you can redistribute it and/or modify it
under the terms of the QuantLib license. You should have received a
copy of the license along with this program; if not, please email
. The license is also available online at
.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the license for more details.
*/
using System;
using QuantLib;
namespace BermudanSwaption
{
class Run
{
private const int numRows = 5;
private const int numCols = 5;
private static int[] swapLengths = { 1, 2, 3, 4, 5 };
private static double[] swaptionVols = {
0.1490, 0.1340, 0.1228, 0.1189, 0.1148,
0.1290, 0.1201, 0.1146, 0.1108, 0.1040,
0.1149, 0.1112, 0.1070, 0.1010, 0.0957,
0.1047, 0.1021, 0.0980, 0.0951, 0.1270,
0.1000, 0.0950, 0.0900, 0.1230, 0.1160 };
private static void calibrateModel(
ShortRateModel model,
CalibrationHelperVector helpers,
double lambda )
{
Simplex om = new Simplex( lambda );
model.calibrate(helpers, om,
new EndCriteria(1000, 250, 1e-7, 1e-7, 1e-7));
// Output the implied Black volatilities
for (int i=0; i
/// The main entry point for the application.
///
[STAThread]
static void Main(string[] args)
{
DateTime startTime = DateTime.Now;
Date todaysDate = new Date(15, Month.February, 2002);
Calendar calendar = new TARGET();
Date settlementDate = new Date(19, Month.February, 2002);
Settings.instance().setEvaluationDate( todaysDate );
// flat yield term structure impling 1x5 swap at 5%
Quote flatRate = new SimpleQuote(0.04875825);
FlatForward myTermStructure = new FlatForward(
settlementDate,
new QuoteHandle( flatRate ),
new Actual365Fixed() );
RelinkableYieldTermStructureHandle rhTermStructure =
new RelinkableYieldTermStructureHandle();
rhTermStructure.linkTo( myTermStructure );
// Define the ATM/OTM/ITM swaps
Period fixedLegTenor = new Period(1,TimeUnit.Years);
BusinessDayConvention fixedLegConvention =
BusinessDayConvention.Unadjusted;
BusinessDayConvention floatingLegConvention =
BusinessDayConvention.ModifiedFollowing;
DayCounter fixedLegDayCounter =
new Thirty360( Thirty360.Convention.European );
Period floatingLegTenor = new Period(6,TimeUnit.Months);
double dummyFixedRate = 0.03;
IborIndex indexSixMonths = new Euribor6M( rhTermStructure );
Date startDate = calendar.advance(settlementDate,1,TimeUnit.Years,
floatingLegConvention);
Date maturity = calendar.advance(startDate,5,TimeUnit.Years,
floatingLegConvention);
Schedule fixedSchedule = new Schedule(startDate,maturity,
fixedLegTenor,calendar,fixedLegConvention,fixedLegConvention,
DateGeneration.Rule.Forward,false);
Schedule floatSchedule = new Schedule(startDate,maturity,
floatingLegTenor,calendar,floatingLegConvention,
floatingLegConvention,DateGeneration.Rule.Forward,false);
VanillaSwap swap = new VanillaSwap(
Swap.Type.Payer, 1000.0,
fixedSchedule, dummyFixedRate, fixedLegDayCounter,
floatSchedule, indexSixMonths, 0.0,
indexSixMonths.dayCounter());
DiscountingSwapEngine swapEngine =
new DiscountingSwapEngine(rhTermStructure);
swap.setPricingEngine(swapEngine);
double fixedATMRate = swap.fairRate();
double fixedOTMRate = fixedATMRate * 1.2;
double fixedITMRate = fixedATMRate * 0.8;
VanillaSwap atmSwap = new VanillaSwap(
Swap.Type.Payer, 1000.0,
fixedSchedule, fixedATMRate, fixedLegDayCounter,
floatSchedule, indexSixMonths, 0.0,
indexSixMonths.dayCounter() );
VanillaSwap otmSwap = new VanillaSwap(
Swap.Type.Payer, 1000.0,
fixedSchedule, fixedOTMRate, fixedLegDayCounter,
floatSchedule, indexSixMonths, 0.0,
indexSixMonths.dayCounter());
VanillaSwap itmSwap = new VanillaSwap(
Swap.Type.Payer, 1000.0,
fixedSchedule, fixedITMRate, fixedLegDayCounter,
floatSchedule, indexSixMonths, 0.0,
indexSixMonths.dayCounter());
atmSwap.setPricingEngine(swapEngine);
otmSwap.setPricingEngine(swapEngine);
itmSwap.setPricingEngine(swapEngine);
// defining the swaptions to be used in model calibration
PeriodVector swaptionMaturities = new PeriodVector();
swaptionMaturities.Add( new Period(1, TimeUnit.Years) );
swaptionMaturities.Add( new Period(2, TimeUnit.Years) );
swaptionMaturities.Add( new Period(3, TimeUnit.Years) );
swaptionMaturities.Add( new Period(4, TimeUnit.Years) );
swaptionMaturities.Add( new Period(5, TimeUnit.Years) );
CalibrationHelperVector swaptions = new CalibrationHelperVector();
// List of times that have to be included in the timegrid
DoubleVector times = new DoubleVector();
for ( int i=0; iparams()[0] << ", "
// << "sigma = " << modelHW2->params()[1]
// << std::endl << std::endl;
Console.WriteLine( "Black-Karasinski (numerical) calibration" );
for (int i=0; iparams()[0] << ", "
// << "sigma = " << modelBK->params()[1]
// << std::endl << std::endl;
// ATM Bermudan swaption pricing
Console.WriteLine( "Payer bermudan swaption struck at {0} (ATM)",
fixedATMRate );
DateVector bermudanDates = new DateVector();
Schedule schedule = new Schedule(startDate,maturity,
new Period(3,TimeUnit.Months),calendar,
BusinessDayConvention.Following,
BusinessDayConvention.Following,
DateGeneration.Rule.Forward,false);
for (uint i=0; i