pax_global_header 0000666 0000000 0000000 00000000064 14646440153 0014521 g ustar 00root root 0000000 0000000 52 comment=6b72204fbd3524c410e8aa7f415cdfc740bbafd8
QuantLib-SWIG-1.35/ 0000775 0000000 0000000 00000000000 14646440153 0013737 5 ustar 00root root 0000000 0000000 QuantLib-SWIG-1.35/.ci/ 0000775 0000000 0000000 00000000000 14646440153 0014410 5 ustar 00root root 0000000 0000000 QuantLib-SWIG-1.35/.ci/csharp.build 0000775 0000000 0000000 00000000140 14646440153 0016707 0 ustar 00root root 0000000 0000000 #!/bin/bash
set -e
./autogen.sh
./configure CC=clang CXX=clang++ CXXFLAGS='-O2'
make -C CSharp
QuantLib-SWIG-1.35/.ci/csharp.check 0000775 0000000 0000000 00000000051 14646440153 0016666 0 ustar 00root root 0000000 0000000 #!/bin/bash
set -e
make -C CSharp check
QuantLib-SWIG-1.35/.ci/csharp.install 0000775 0000000 0000000 00000000023 14646440153 0017256 0 ustar 00root root 0000000 0000000 #!/bin/bash
set -e
QuantLib-SWIG-1.35/.ci/java-new.build 0000775 0000000 0000000 00000000464 14646440153 0017150 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
QuantLib-SWIG-1.35/.ci/java-new.check 0000775 0000000 0000000 00000000047 14646440153 0017123 0 ustar 00root root 0000000 0000000 #!/bin/bash
set -e
make -C Java check
QuantLib-SWIG-1.35/.ci/java-new.install 0000775 0000000 0000000 00000000023 14646440153 0017506 0 ustar 00root root 0000000 0000000 #!/bin/bash
set -e
QuantLib-SWIG-1.35/.ci/java-old.build 0000775 0000000 0000000 00000000361 14646440153 0017131 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
QuantLib-SWIG-1.35/.ci/java-old.check 0000775 0000000 0000000 00000000047 14646440153 0017110 0 ustar 00root root 0000000 0000000 #!/bin/bash
set -e
make -C Java check
QuantLib-SWIG-1.35/.ci/java-old.install 0000775 0000000 0000000 00000000023 14646440153 0017473 0 ustar 00root root 0000000 0000000 #!/bin/bash
set -e
QuantLib-SWIG-1.35/.ci/python.build 0000775 0000000 0000000 00000000215 14646440153 0016753 0 ustar 00root root 0000000 0000000 #!/bin/bash
set -e
./autogen.sh
./configure PYTHON=/usr/bin/python3 CC=clang CXX=clang++ CXXFLAGS='-O1'
make -C Python
make -C Python wheel
QuantLib-SWIG-1.35/.ci/python.check 0000775 0000000 0000000 00000000217 14646440153 0016733 0 ustar 00root root 0000000 0000000 #!/bin/bash
set -e
make -C Python check
. .venv/bin/activate
for i in Python/examples/*.py
do
echo "$i"
python "$i" || break -1
done
QuantLib-SWIG-1.35/.ci/python.install 0000775 0000000 0000000 00000000342 14646440153 0017323 0 ustar 00root root 0000000 0000000 #!/bin/bash
set -e
python3 -m venv .venv
. .venv/bin/activate
pip install Python/dist/QuantLib-*.whl
grep -v QuantLib binder/requirements.txt > Python/examples/requirements.txt
pip install -r Python/examples/requirements.txt
QuantLib-SWIG-1.35/.ci/r.build 0000775 0000000 0000000 00000000231 14646440153 0015671 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
QuantLib-SWIG-1.35/.ci/r.check 0000775 0000000 0000000 00000000203 14646440153 0015646 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.35/.ci/r.install 0000775 0000000 0000000 00000000066 14646440153 0016246 0 ustar 00root root 0000000 0000000 #!/bin/bash
set -e
R CMD INSTALL ./R.Rcheck/QuantLib
QuantLib-SWIG-1.35/.ci/scala.build 0000775 0000000 0000000 00000000316 14646440153 0016517 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
QuantLib-SWIG-1.35/.ci/scala.check 0000775 0000000 0000000 00000000050 14646440153 0016470 0 ustar 00root root 0000000 0000000 #!/bin/bash
set -e
make -C Scala check
QuantLib-SWIG-1.35/.ci/scala.install 0000775 0000000 0000000 00000000023 14646440153 0017061 0 ustar 00root root 0000000 0000000 #!/bin/bash
set -e
QuantLib-SWIG-1.35/.github/ 0000775 0000000 0000000 00000000000 14646440153 0015277 5 ustar 00root root 0000000 0000000 QuantLib-SWIG-1.35/.github/boring-cyborg.yml 0000664 0000000 0000000 00000001145 14646440153 0020566 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.35/.github/dependabot.yml 0000664 0000000 0000000 00000000261 14646440153 0020126 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.35/.github/workflows/ 0000775 0000000 0000000 00000000000 14646440153 0017334 5 ustar 00root root 0000000 0000000 QuantLib-SWIG-1.35/.github/workflows/copyrights.yml 0000664 0000000 0000000 00000001150 14646440153 0022247 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@v6
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.35/.github/workflows/devenv-images.yml 0000664 0000000 0000000 00000006022 14646440153 0022611 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-20.04
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=rolling -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-20.04
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-20.04
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-20.04
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.35/.github/workflows/linux.yml 0000664 0000000 0000000 00000001501 14646440153 0021213 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.35/.github/workflows/misspell.yml 0000664 0000000 0000000 00000001070 14646440153 0021705 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@v6
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.35/.github/workflows/namespaces.yml 0000664 0000000 0000000 00000002063 14646440153 0022177 0 ustar 00root root 0000000 0000000 name: Fix uses of boost 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/ext::shared_ptr/g' SWIG/*
sed -i -e 's/boost::make_shared/ext::make_shared/g' SWIG/*
sed -i -e 's/boost::dynamic_pointer_cast/ext::dynamic_pointer_cast/g' SWIG/*
sed -i -e 's/boost::tuple/ext::tuple/g' SWIG/*
sed -i -e 's/boost::get/ext::get/g' SWIG/*
sed -i -e 's/boost::function/ext::function/g' SWIG/*
sed -i -e 's/boost::optional/ext::optional/g' SWIG/*
sed -i -e 's/boost::none/ext::nullopt/g' SWIG/*
- uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: fix-boost-namespace-${{ github.ref_name }}
delete-branch: true
commit-message: 'Fix uses of boost namespace'
title: 'Fix uses of boost namespace'
author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
QuantLib-SWIG-1.35/.github/workflows/stale.yml 0000664 0000000 0000000 00000002223 14646440153 0021166 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.35/.gitignore 0000664 0000000 0000000 00000002456 14646440153 0015736 0 ustar 00root root 0000000 0000000 # Compilation artifacts
configure
aclocal.m4
autom4te.cache
config.log
config.status
config/
CSharp/cpp/quantlib_wrap.cpp
CSharp/cpp/quantlib_wrap.h
CSharp/cpp/build
CSharp/csharp/obj
CSharp/examples/*/bin
CSharp/examples/*/obj
CSharp/.vs/
Java/bin/
Java/quantlib_wrap.cpp
Java/quantlib_wrap.h
Perl/Makefile.quantlib
Perl/QuantLib.bs
Perl/blib/
Perl/pm_to_blib
Perl/quantlib_wrap.cpp
Perl/MYMETA.yml
Perl/MYMETA.json
Python/QuantLib/quantlib_wrap.cpp
Python/.cache/
Python/QuantLib.egg-info
Python/QuantLib_Python.egg-info
Python/dist
Python/examples/*.ipynb
Python/examples/.ipynb_checkpoints
R/src/QuantLib.cpp
R/makeRData.Rout
R/src/symbols.rds
R.Rcheck
Ruby/extension.mak
Ruby/quantlib_wrap.cpp
# Build outputs
**/x64/Debug
**/x64/Release
**/Debug
**/Release
**/bin/*.xml
**/bin/*.manifest
# CLion
.idea
cmake-build-debug
# Artifacts created in multiple directories
Makefile
Makefile.in
testCaseCollection.xml
.deps
.libs
*.la
*.lo
*.o
*.so
*.dylib
.build-stamp
*.pyc
*.exe
*.dll
*.exp
*.lib
*.pdb
*.ilk
*.class
*~
*.ncb
*.suo
*.vcproj.*.user
*.vcxproj.user
*.VC.db
*.VC.opendb
*.log
*.sdf
*.opensdf
*.pch
*.idb
*.ipch
# Outputs
CSharp/csharp/*.cs
CSharp/NQuantLib.dll
Java/QuantLib.jar
Java/*.jnilib
Java/org/
Perl/QuantLib.pm
Python/QuantLib/QuantLib.py
Python/build
R/R/QuantLib.R
R/QuantLib.RData
.vscode
**/venv
QuantLib-SWIG-1.35/.misspell-fixer.ignore 0000664 0000000 0000000 00000000022 14646440153 0020157 0 ustar 00root root 0000000 0000000 ^./ChangeLog.txt
QuantLib-SWIG-1.35/CSharp/ 0000775 0000000 0000000 00000000000 14646440153 0015117 5 ustar 00root root 0000000 0000000 QuantLib-SWIG-1.35/CSharp/Makefile.am 0000664 0000000 0000000 00000005757 14646440153 0017171 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
$(SWIG) -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.35/CSharp/QuantLib.props 0000664 0000000 0000000 00000001653 14646440153 0017730 0 ustar 00root root 0000000 0000000
v100
v110
v120
v130
v140
v141
v142
v143
QuantLib-SWIG-1.35/CSharp/QuantLib.sln 0000664 0000000 0000000 00000013746 14646440153 0017367 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.35/CSharp/README.txt 0000664 0000000 0000000 00000000460 14646440153 0016615 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 should also work with Mono on Linux; run 'make' in this
directory.
QuantLib-SWIG-1.35/CSharp/cpp/ 0000775 0000000 0000000 00000000000 14646440153 0015701 5 ustar 00root root 0000000 0000000 QuantLib-SWIG-1.35/CSharp/cpp/QuantLibWrapper.vcxproj 0000664 0000000 0000000 00000026260 14646440153 0022404 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
$(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
$(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)"
$(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)"
$(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.35/CSharp/cpp/QuantLibWrapper.vcxproj.filters 0000664 0000000 0000000 00000002041 14646440153 0024042 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.35/CSharp/csharp/ 0000775 0000000 0000000 00000000000 14646440153 0016377 5 ustar 00root root 0000000 0000000 QuantLib-SWIG-1.35/CSharp/csharp/NQuantLib.csproj 0000664 0000000 0000000 00000002110 14646440153 0021450 0 ustar 00root root 0000000 0000000
net6.0
QuantLib
runtimes/win-x64/native
runtimes/linux-x64/native
runtimes/osx-x64/native
QuantLib-SWIG-1.35/CSharp/examples/ 0000775 0000000 0000000 00000000000 14646440153 0016735 5 ustar 00root root 0000000 0000000 QuantLib-SWIG-1.35/CSharp/examples/BermudanSwaption/ 0000775 0000000 0000000 00000000000 14646440153 0022217 5 ustar 00root root 0000000 0000000 QuantLib-SWIG-1.35/CSharp/examples/BermudanSwaption/BermudanSwaption.cs 0000664 0000000 0000000 00000027520 14646440153 0026036 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