pax_global_header00006660000000000000000000000064151311505560014514gustar00rootroot0000000000000052 comment=367ce80ae4f285835ceb3bba97746bea239984ad QuantLib-1.41/000077500000000000000000000000001513115055600131605ustar00rootroot00000000000000QuantLib-1.41/.appveyor.yml000066400000000000000000000003221513115055600156230ustar00rootroot00000000000000image: Visual Studio 2017 platform: x64 configuration: Release version: ci.{build} before_build: - COPY .ci\VS2017.props .\Build.props build: parallel: false project: QuantLib.sln verbosity: normal QuantLib-1.41/.ci/000077500000000000000000000000001513115055600136315ustar00rootroot00000000000000QuantLib-1.41/.ci/Unity.props000066400000000000000000000002551513115055600160300ustar00rootroot00000000000000 true QuantLib-1.41/.ci/VS2017.props000066400000000000000000000014711513115055600155630ustar00rootroot00000000000000 false C:\Libraries\boost_1_69_0;%(AdditionalIncludeDirectories) /bigobj %(AdditionalOptions) Disabled C:\Libraries\boost_1_69_0\lib64-msvc-14.1;%(AdditionalLibraryDirectories) QuantLib-1.41/.ci/VS2019.alt.props000066400000000000000000000013561513115055600163460ustar00rootroot00000000000000 C:\local\boost;%(AdditionalIncludeDirectories) /bigobj %(AdditionalOptions) true stdcpp17 _SILENCE_ALL_CXX17_DEPRECATION_WARNINGS;%(PreprocessorDefinitions) QuantLib-1.41/.ci/VS2019.props000066400000000000000000000010741513115055600155640ustar00rootroot00000000000000 C:\local\boost;%(AdditionalIncludeDirectories) /bigobj %(AdditionalOptions) true QuantLib-1.41/.ci/VS2022.alt.props000066400000000000000000000013561513115055600163400ustar00rootroot00000000000000 C:\local\boost;%(AdditionalIncludeDirectories) /bigobj %(AdditionalOptions) true stdcpp17 _SILENCE_ALL_CXX17_DEPRECATION_WARNINGS;%(PreprocessorDefinitions) QuantLib-1.41/.ci/VS2022.props000066400000000000000000000010741513115055600155560ustar00rootroot00000000000000 C:\local\boost;%(AdditionalIncludeDirectories) /bigobj %(AdditionalOptions) true QuantLib-1.41/.ci/userconfig2019.alt.hpp000066400000000000000000000102701513115055600176010ustar00rootroot00000000000000/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Copyright (C) 2004, 2011 Ferdinando Ametrano Copyright (C) 2004, 2005 StatPro Italia srl 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. */ #ifndef quantlib_config_hpp #define quantlib_config_hpp /*************************************************************** User configuration section: modify the following definitions to suit your preferences. Do not modify this file if you are using a Linux/Unix system: it will not be read by the compiler. The definitions below will be provided by running ./configure instead. ****************************************************************/ /* Define this if error messages should include current function information. */ #ifndef QL_ERROR_FUNCTIONS # define QL_ERROR_FUNCTIONS #endif /* Define this if error messages should include file and line information. */ #ifndef QL_ERROR_LINES # define QL_ERROR_LINES #endif /* Define this if tracing messages should be allowed (whether they are actually emitted will depend on run-time settings.) */ #ifndef QL_ENABLE_TRACING # define QL_ENABLE_TRACING #endif /* Define this if extra safety checks should be performed. This can degrade performance. */ #ifndef QL_EXTRA_SAFETY_CHECKS # define QL_EXTRA_SAFETY_CHECKS #endif /* Define this to use indexed coupons instead of par coupons in floating legs as the default in 'bool IborCoupon::Settings::usingAtParCoupons();'. */ #ifndef QL_USE_INDEXED_COUPON # define QL_USE_INDEXED_COUPON #endif /* Define this to have singletons return different instances for different threads; in particular, this means that the evaluation date, the stored index fixings and any other settings will be per-thread. */ #ifndef QL_ENABLE_SESSIONS # define QL_ENABLE_SESSIONS #endif /* Define this to enable the thread-safe observer pattern. You should enable it if you want to use QuantLib via the SWIG layer within the JVM or .NET eco system or any environment with an async garbage collector */ #ifndef QL_ENABLE_THREAD_SAFE_OBSERVER_PATTERN # define QL_ENABLE_THREAD_SAFE_OBSERVER_PATTERN #endif /* Define this to enable a date resolution down to microseconds and allow for accurate intraday pricing. */ #ifndef QL_HIGH_RESOLUTION_DATE # define QL_HIGH_RESOLUTION_DATE #endif /* Define this if you want to throw an exception when a notification loop is detected. Enabling this option is recommended but might cause existing code to throw. */ #ifndef QL_THROW_IN_CYCLES # define QL_THROW_IN_CYCLES #endif /* Undefine this if you want lazy objects to forward all notifications instead of just the first. Disabling this option is safer in some cases but can be a lot slower. */ #ifndef QL_FASTER_LAZY_OBJECTS //# define QL_FASTER_LAZY_OBJECTS #endif /* Define this to use std::any instead of boost::any. */ #ifndef QL_USE_STD_ANY //# define QL_USE_STD_ANY #endif /* Define this to use std::optional instead of boost::optional. */ #ifndef QL_USE_STD_OPTIONAL //# define QL_USE_STD_OPTIONAL #endif /* Define this to use standard smart pointers instead of Boost ones. Note that std::shared_ptr does not check access and can cause segmentation faults. */ #ifndef QL_USE_STD_SHARED_PTR # define QL_USE_STD_SHARED_PTR #endif /* Define this to enable the implementation of Null as template functions. */ #ifndef QL_NULL_AS_FUNCTIONS # define QL_NULL_AS_FUNCTIONS #endif /* Define this to enable the parallel unit test runner */ #ifndef QL_ENABLE_PARALLEL_UNIT_TEST_RUNNER //# define QL_ENABLE_PARALLEL_UNIT_TEST_RUNNER #endif #endif QuantLib-1.41/.ci/userconfig2022.alt.hpp000066400000000000000000000102701513115055600175730ustar00rootroot00000000000000/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Copyright (C) 2004, 2011 Ferdinando Ametrano Copyright (C) 2004, 2005 StatPro Italia srl 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. */ #ifndef quantlib_config_hpp #define quantlib_config_hpp /*************************************************************** User configuration section: modify the following definitions to suit your preferences. Do not modify this file if you are using a Linux/Unix system: it will not be read by the compiler. The definitions below will be provided by running ./configure instead. ****************************************************************/ /* Define this if error messages should include current function information. */ #ifndef QL_ERROR_FUNCTIONS # define QL_ERROR_FUNCTIONS #endif /* Define this if error messages should include file and line information. */ #ifndef QL_ERROR_LINES # define QL_ERROR_LINES #endif /* Define this if tracing messages should be allowed (whether they are actually emitted will depend on run-time settings.) */ #ifndef QL_ENABLE_TRACING # define QL_ENABLE_TRACING #endif /* Define this if extra safety checks should be performed. This can degrade performance. */ #ifndef QL_EXTRA_SAFETY_CHECKS # define QL_EXTRA_SAFETY_CHECKS #endif /* Define this to use indexed coupons instead of par coupons in floating legs as the default in 'bool IborCoupon::Settings::usingAtParCoupons();'. */ #ifndef QL_USE_INDEXED_COUPON # define QL_USE_INDEXED_COUPON #endif /* Define this to have singletons return different instances for different threads; in particular, this means that the evaluation date, the stored index fixings and any other settings will be per-thread. */ #ifndef QL_ENABLE_SESSIONS # define QL_ENABLE_SESSIONS #endif /* Define this to enable the thread-safe observer pattern. You should enable it if you want to use QuantLib via the SWIG layer within the JVM or .NET eco system or any environment with an async garbage collector */ #ifndef QL_ENABLE_THREAD_SAFE_OBSERVER_PATTERN # define QL_ENABLE_THREAD_SAFE_OBSERVER_PATTERN #endif /* Define this to enable a date resolution down to microseconds and allow for accurate intraday pricing. */ #ifndef QL_HIGH_RESOLUTION_DATE # define QL_HIGH_RESOLUTION_DATE #endif /* Define this if you want to throw an exception when a notification loop is detected. Enabling this option is recommended but might cause existing code to throw. */ #ifndef QL_THROW_IN_CYCLES # define QL_THROW_IN_CYCLES #endif /* Undefine this if you want lazy objects to forward all notifications instead of just the first. Disabling this option is safer in some cases but can be a lot slower. */ #ifndef QL_FASTER_LAZY_OBJECTS //# define QL_FASTER_LAZY_OBJECTS #endif /* Define this to use std::any instead of boost::any. */ #ifndef QL_USE_STD_ANY //# define QL_USE_STD_ANY #endif /* Define this to use std::optional instead of boost::optional. */ #ifndef QL_USE_STD_OPTIONAL //# define QL_USE_STD_OPTIONAL #endif /* Define this to use standard smart pointers instead of Boost ones. Note that std::shared_ptr does not check access and can cause segmentation faults. */ #ifndef QL_USE_STD_SHARED_PTR # define QL_USE_STD_SHARED_PTR #endif /* Define this to enable the implementation of Null as template functions. */ #ifndef QL_NULL_AS_FUNCTIONS # define QL_NULL_AS_FUNCTIONS #endif /* Define this to enable the parallel unit test runner */ #ifndef QL_ENABLE_PARALLEL_UNIT_TEST_RUNNER //# define QL_ENABLE_PARALLEL_UNIT_TEST_RUNNER #endif #endif QuantLib-1.41/.clang-format000066400000000000000000000021431513115055600155330ustar00rootroot00000000000000--- Language: Cpp Standard: c++17 # The following is close to the style we've been using all these years # without formalizing it. Formatting won't be enforced, but this file # can help if you want to use the general feel of the library. # General appearance: BasedOnStyle: LLVM IndentWidth: 4 ColumnLimit: 100 NamespaceIndentation: All MaxEmptyLinesToKeep: 2 FixNamespaceComments: false # Function declarations: BinPackParameters: false AllowShortFunctionsOnASingleLine: Inline AlwaysBreakTemplateDeclarations: true # T& x, not T &x: DerivePointerAlignment: false PointerAlignment: Left # QuantLib headers first, then Boost, then std SortIncludes: true IncludeBlocks: Merge IncludeCategories: - Regex: '^"' Priority: 1 - Regex: '^ -*, bugprone-*, -bugprone-assignment-in-if-condition, -bugprone-branch-clone, -bugprone-crtp-constructor-accessibility, -bugprone-easily-swappable-parameters, -bugprone-empty-catch, -bugprone-implicit-widening-of-multiplication-result, -bugprone-macro-parentheses, -bugprone-narrowing-conversions, -bugprone-non-zero-enum-to-bool-conversion, -bugprone-suspicious-include, clang-analyzer-*, -clang-analyzer-core.UndefinedBinaryOperatorResult, -clang-analyzer-core.uninitialized.Assign, -clang-analyzer-optin.cplusplus.UninitializedObject, -clang-analyzer-optin.performance.Padding, -clang-analyzer-security.FloatLoopCounter, cppcoreguidelines-*, -cppcoreguidelines-avoid-c-arrays, -cppcoreguidelines-avoid-const-or-ref-data-members, -cppcoreguidelines-avoid-do-while, -cppcoreguidelines-avoid-goto, -cppcoreguidelines-avoid-magic-numbers, -cppcoreguidelines-avoid-non-const-global-variables, -cppcoreguidelines-init-variables, -cppcoreguidelines-macro-to-enum, -cppcoreguidelines-macro-usage, -cppcoreguidelines-narrowing-conversions, -cppcoreguidelines-non-private-member-variables-in-classes, -cppcoreguidelines-owning-memory, -cppcoreguidelines-prefer-member-initializer, -cppcoreguidelines-pro-bounds-array-to-pointer-decay, -cppcoreguidelines-pro-bounds-constant-array-index, -cppcoreguidelines-pro-bounds-pointer-arithmetic, -cppcoreguidelines-pro-type-const-cast, -cppcoreguidelines-pro-type-member-init, -cppcoreguidelines-pro-type-vararg, -cppcoreguidelines-use-default-member-init, misc-*, -misc-confusable-identifiers, -misc-const-correctness, -misc-include-cleaner, -misc-no-recursion, -misc-non-private-member-variables-in-classes, -misc-use-anonymous-namespace, -misc-use-internal-linkage, -misc-unused-parameters, modernize-*, -modernize-avoid-c-arrays, -modernize-macro-to-enum, -modernize-return-braced-init-list, -modernize-use-trailing-return-type, -modernize-use-using, -modernize-use-nodiscard, performance-*, -performance-avoid-endl, -performance-enum-size, readability-*, -readability-avoid-nested-conditional-operator, -readability-braces-around-statements, -readability-const-return-type, -readability-convert-member-functions-to-static, -readability-else-after-return, -readability-enum-initial-value, -readability-function-cognitive-complexity, -readability-identifier-length, -readability-inconsistent-declaration-parameter-name, -readability-isolate-declaration, -readability-magic-numbers, -readability-make-member-function-const, -readability-math-missing-parentheses, -readability-named-parameter, -readability-redundant-casting, -readability-redundant-declaration, -readability-simplify-boolean-expr, -readability-suspicious-call-argument, -readability-use-anyofallof, -readability-use-std-min-max, HeaderFilterRegex: '.*' FormatStyle: none CheckOptions: - key: cppcoreguidelines-special-member-functions.AllowSoleDefaultDtor value: 1 - key: modernize-make-shared.MakeSmartPtrFunction value: ext::make_shared - key: modernize-make-shared.MakeSmartPtrFunctionHeader value: - key: modernize-use-default-member-init.UseAssignment value: 1 ... QuantLib-1.41/.codecov.yml000066400000000000000000000015411513115055600154040ustar00rootroot00000000000000coverage: precision: 1 # We put red at 50 to have a chance at some non-red build. # I would be happy with 80 right now, so that's where the target is. range: 50...80 ignore: - "test-suite" - "Examples" # The process to get a correct report is a bit fiddly. # This worked in the past, and is added here for reference: # # - clone the repo and mount it in a recent quantlib-devenv image; # - run the following: # # apt update && apt install -y lcov curl git # mkdir build # cd build # CXXFLAGS='-O1 -fprofile-arcs -ftest-coverage' LDFLAGS='-lgcov' cmake .. # CXXFLAGS='-O1 -fprofile-arcs -ftest-coverage' LDFLAGS='-lgcov' make -j 4 # ./test-suite/quantlib-test-suite --log_level=message # bash <(curl -s https://codecov.io/bash) -t @cc_token # # where the file `cc_token` contains the Codecov upload token. QuantLib-1.41/.github/000077500000000000000000000000001513115055600145205ustar00rootroot00000000000000QuantLib-1.41/.github/boring-cyborg.yml000066400000000000000000000011451513115055600200070ustar00rootroot00000000000000 # 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-1.41/.github/dependabot.yml000066400000000000000000000002611513115055600173470ustar00rootroot00000000000000version: 2 updates: - package-ecosystem: "github-actions" directory: "/" schedule: # Check for updates to GitHub Actions every weekday interval: "weekly" QuantLib-1.41/.github/workflows/000077500000000000000000000000001513115055600165555ustar00rootroot00000000000000QuantLib-1.41/.github/workflows/cmake-latest-runners.yml000066400000000000000000000104461513115055600233510ustar00rootroot00000000000000name: CMake build for the latest runners and C++ standards on: schedule: # At 02:35 on Monday - cron: '35 2 * * 1' workflow_dispatch: jobs: cmake-build-and-test: strategy: fail-fast: false matrix: settings: [ { os: macos-latest, cc: clang, cxx: clang++ }, { os: ubuntu-latest, cc: clang, cxx: clang++ }, { os: ubuntu-latest, cc: gcc, cxx: g++ }, { os: windows-latest, cc: cl, cxx: cl } ##### This is the full set of currently available runners and compilers. ##### # { os: macos-14, cc: clang, cxx: clang++ }, # { os: macos-15, cc: clang, cxx: clang++ }, # # { os: ubuntu-22.04, cc: clang-13, cxx: clang++-13 }, # { os: ubuntu-22.04, cc: clang-14, cxx: clang++-14 }, # { os: ubuntu-22.04, cc: clang-15, cxx: clang++-15 }, # # { os: ubuntu-22.04, cc: gcc-10, cxx: g++-10 }, # { os: ubuntu-22.04, cc: gcc-11, cxx: g++-11 }, # { os: ubuntu-22.04, cc: gcc-12, cxx: g++-12 }, # # { os: ubuntu-24.04, cc: clang-16, cxx: clang++-16 }, # { os: ubuntu-24.04, cc: clang-17, cxx: clang++-17 }, # { os: ubuntu-24.04, cc: clang-18, cxx: clang++-18 }, # # { os: ubuntu-24.04, cc: gcc-12, cxx: g++-12 }, # { os: ubuntu-24.04, cc: gcc-13, cxx: g++-13 }, # { os: ubuntu-24.04, cc: gcc-14, cxx: g++-14 }, # # { os: windows-2022, cc: cl, cxx: cl }, # { os: windows-2025, cc: cl, cxx: cl } ] cxx-standard: [ 17, 20, 23 ] cmake-build-type: [ release ] runs-on: ${{ matrix.settings.os }} steps: - uses: actions/checkout@v6 - name: Determine ccache variant shell: bash run: | echo "CMAKE_CXX_COMPILER_LAUNCHER=${{ ( (runner.os == 'Windows') && 'sccache' ) || 'ccache' }}" >> $GITHUB_ENV - name: Setup CCache uses: hendrikmuhs/ccache-action@v1.2 with: key: cmake-latest-${{ inputs.os }}-${{ inputs.cxx }}-${{ inputs.cxx-standard }} restore-keys: | cmake-latest-${{ inputs.os }}-${{ inputs.cxx }}-${{ inputs.cxx-standard }} cmake-latest-${{ inputs.os }}-${{ inputs.cxx }} cmake-latest-${{ inputs.os }} variant: ${{ env.CMAKE_CXX_COMPILER_LAUNCHER }} - name: Setup Linux if: runner.os == 'Linux' shell: bash run: | sudo apt-get update sudo apt-get install -y ccache ninja-build eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" brew update brew install boost echo "/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin" >> $GITHUB_PATH - name: Setup macOS if: runner.os == 'macOS' shell: bash run: | HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 brew install ninja boost echo "CXXFLAGS=-stdlib=libc++" >> $GITHUB_ENV - name: Setup Windows if: runner.os == 'Windows' shell: pwsh run: | $BoostUri = "https://archives.boost.io/release/1.90.0/binaries/boost_1_90_0-msvc-14.3-64.exe" Start-BitsTransfer -Source $BoostUri -Destination $env:RUNNER_TEMP\boost.exe Start-Process -Wait -FilePath "$env:RUNNER_TEMP\boost.exe" "/SILENT","/SP-","/SUPPRESSMSGBOXES","/DIR=$env:RUNNER_TEMP\boost" choco install -y ninja Write "Boost_DIR=$env:RUNNER_TEMP\boost\lib64-msvc-14.3\cmake\Boost-1.90.0" >> $env:GITHUB_ENV - name: Set up Visual Studio shell on Windows if: runner.os == 'Windows' uses: ilammy/msvc-dev-cmd@v1 with: arch: x64 - name: Configure CMake and build env: CC: ${{ matrix.settings.cc }} CXX: ${{ matrix.settings.cxx }} run: | cmake --version cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=${{ matrix.cmake-build-type }} -DCMAKE_CXX_STANDARD=${{ matrix.cxx-standard }} -DQL_COMPILE_WARNING_AS_ERROR=ON -L cmake --build build --verbose - name: Run the test-suite run: | ./build/test-suite/quantlib-test-suite -l message QuantLib-1.41/.github/workflows/cmake.yml000066400000000000000000000173011513115055600203620ustar00rootroot00000000000000name: CMake build on: push: branches: - '**' pull_request: jobs: cmake-linux: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - name: Setup run: | sudo rm /etc/apt/sources.list.d/microsoft-prod.list sudo apt update sudo apt install -y libboost-dev ccache ninja-build - name: Cache uses: hendrikmuhs/ccache-action@v1.2 with: key: cmake-linux-ci-build-${{ github.ref }} restore-keys: | cmake-linux-ci-build-${{ github.ref }} cmake-linux-ci-build-refs/heads/master cmake-linux-ci-build- - name: Compile run: | mkdir build cd build cmake .. -GNinja -DBOOST_ROOT=/usr -DCMAKE_BUILD_TYPE=Release -DQL_COMPILE_WARNING_AS_ERROR=ON -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -L cat ql/config.hpp cmake --build . --verbose sudo cmake --install . sudo ldconfig - name: Test run: | quantlib-test-suite --log_level=message - name: Run benchmark run: | quantlib-benchmark --size=1 cmake-linux-with-options: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - name: Setup run: | sudo rm /etc/apt/sources.list.d/microsoft-prod.list sudo apt update sudo apt install -y libboost-all-dev ccache ninja-build - name: Cache uses: hendrikmuhs/ccache-action@v1.2 with: key: cmake-linux-ci-opts-${{ github.ref }} restore-keys: | cmake-linux-ci-opts-${{ github.ref }} cmake-linux-ci-opts-refs/heads/master cmake-linux-ci-opts- - name: Compile run: | cmake --preset linux-ci-build-with-nonstandard-options -L cd build/linux-ci-build-with-nonstandard-options cat ql/config.hpp cmake --build . --verbose sudo cmake --build . --target install - name: Test run: | quantlib-test-suite --log_level=message cmake-win: runs-on: windows-2022 steps: - uses: actions/checkout@v6 - name: Cache uses: hendrikmuhs/ccache-action@v1.2 with: key: cmake-windows-ci-build-${{ github.ref }} restore-keys: | cmake-windows-ci-build-${{ github.ref }} cmake-windows-ci-build-refs/heads/master cmake-windows-ci-build- variant: sccache - name: Setup run: | $Url = "https://archives.boost.io/release/1.90.0/source/boost_1_90_0.zip" (New-Object System.Net.WebClient).DownloadFile($Url, "$RUNNER_TEMP\boost.zip") Expand-Archive -Path "$RUNNER_TEMP\boost.zip" -DestinationPath C:\local Rename-Item -Path "C:\local\boost_1_90_0" -NewName "boost" $Url = "https://github.com/ninja-build/ninja/releases/download/v1.11.1/ninja-win.zip" (New-Object System.Net.WebClient).DownloadFile($Url, "$RUNNER_TEMP\ninja-win.zip") Expand-Archive -Path "$RUNNER_TEMP\ninja-win.zip" -DestinationPath C:\local\ninja Add-Content $env:GITHUB_PATH "C:\local\ninja" - name: Setup MSVC++ environment uses: ilammy/msvc-dev-cmd@v1 with: arch: x64 - name: Compile env: BOOST_ROOT: C:\local\boost shell: cmd run: | mkdir build cd build cmake .. -GNinja -DCMAKE_BUILD_TYPE=Release -DQL_COMPILE_WARNING_AS_ERROR=ON -DCMAKE_CXX_COMPILER_LAUNCHER=sccache -L type ql\config.hpp cmake --build . --verbose cmake --install . dir ql\*.lib - name: Test run: | & "C:\Program Files (x86)\QuantLib\bin\quantlib-test-suite" --log_level=message cmake-win-dynamic-runtime: runs-on: windows-2022 steps: - uses: actions/checkout@v6 - name: Cache uses: hendrikmuhs/ccache-action@v1.2 with: key: cmake-windows-ci-dyn-build-${{ github.ref }} restore-keys: | cmake-windows-ci-dyn-build-${{ github.ref }} cmake-windows-ci-dyn-build-refs/heads/master cmake-windows-ci-dyn-build- variant: sccache - name: Setup run: | $Url = "https://archives.boost.io/release/1.90.0/source/boost_1_90_0.zip" (New-Object System.Net.WebClient).DownloadFile($Url, "$RUNNER_TEMP\boost.zip") Expand-Archive -Path "$RUNNER_TEMP\boost.zip" -DestinationPath C:\local Rename-Item -Path "C:\local\boost_1_90_0" -NewName "boost" $Url = "https://github.com/ninja-build/ninja/releases/download/v1.11.1/ninja-win.zip" (New-Object System.Net.WebClient).DownloadFile($Url, "$RUNNER_TEMP\ninja-win.zip") Expand-Archive -Path "$RUNNER_TEMP\ninja-win.zip" -DestinationPath C:\local\ninja Add-Content $env:GITHUB_PATH "C:\local\ninja" - name: Setup MSVC++ environment uses: ilammy/msvc-dev-cmd@v1 with: arch: x64 - name: Compile env: BOOST_ROOT: C:\local\boost shell: cmd run: | mkdir build cd build cmake .. -GNinja -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDLL -DCMAKE_BUILD_TYPE=Release -DQL_COMPILE_WARNING_AS_ERROR=ON -DCMAKE_CXX_COMPILER_LAUNCHER=sccache -L type ql\config.hpp cmake --build . --verbose cmake --install . dir ql\*.lib - name: Test run: | & "C:\Program Files (x86)\QuantLib\bin\quantlib-test-suite" --log_level=message cmake-win-with-options: runs-on: windows-2022 steps: - uses: actions/checkout@v6 - name: Cache uses: hendrikmuhs/ccache-action@v1.2 with: key: cmake-windows-ci-opts-${{ github.ref }} restore-keys: | cmake-windows-ci-opts-${{ github.ref }} cmake-windows-ci-opts-refs/heads/master cmake-windows-ci-opts- variant: sccache - name: Setup run: | $Url = "https://archives.boost.io/release/1.90.0/source/boost_1_90_0.zip" (New-Object System.Net.WebClient).DownloadFile($Url, "$RUNNER_TEMP\boost.zip") Expand-Archive -Path "$RUNNER_TEMP\boost.zip" -DestinationPath C:\local Rename-Item -Path "C:\local\boost_1_90_0" -NewName "boost" $Url = "https://github.com/ninja-build/ninja/releases/download/v1.11.1/ninja-win.zip" (New-Object System.Net.WebClient).DownloadFile($Url, "$RUNNER_TEMP\ninja-win.zip") Expand-Archive -Path "$RUNNER_TEMP\ninja-win.zip" -DestinationPath C:\local\ninja Add-Content $env:GITHUB_PATH "C:\local\ninja" - name: Setup MSVC++ environment uses: ilammy/msvc-dev-cmd@v1 with: arch: x64 - name: Compile env: BOOST_ROOT: C:\local\boost shell: cmd run: | cmake --preset windows-ci-build-with-nonstandard-options -L cd build/windows-ci-build-with-nonstandard-options type ql\config.hpp cmake --build . --verbose cmake --build . --target install - name: Test run: | & "C:\Program Files (x86)\QuantLib\bin\quantlib-test-suite" --log_level=message cmake-macos: runs-on: macos-latest steps: - uses: actions/checkout@v6 - name: Setup env: HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1 run: | brew install boost ccache ninja - name: Cache uses: hendrikmuhs/ccache-action@v1.2 with: key: cmake-macos-ci-${{ github.ref }} restore-keys: | cmake-macos-ci-${{ github.ref }} cmake-macos-ci-refs/heads/master cmake-macos-ci- - name: Compile run: | mkdir build cd build cmake .. -DCMAKE_BUILD_TYPE=Release -DQL_COMPILE_WARNING_AS_ERROR=ON -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -GNinja -L cat ql/config.hpp cmake --build . --verbose sudo cmake --install . - name: Test run: | DYLD_LIBRARY_PATH=/usr/local/lib quantlib-test-suite --log_level=message QuantLib-1.41/.github/workflows/codeql-analysis.yml000066400000000000000000000027161513115055600223760ustar00rootroot00000000000000# For most projects, this workflow file will not need changing; you simply need # to commit it to your repository. # # You may wish to alter this file to override the set of languages analyzed, # or to provide custom queries or build logic. name: "CodeQL" on: schedule: - cron: '0 0 * * 0' workflow_dispatch: jobs: analyze: name: CodeQL analysis runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v6 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL uses: github/codeql-action/init@v4 with: languages: cpp # Set up build environment - name: Setup run: | sudo rm /etc/apt/sources.list.d/microsoft-prod.list sudo apt update sudo apt install -y libboost-dev # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild uses: github/codeql-action/autobuild@v4 # ℹ️ Command-line programs to run using the OS shell. # 📚 https://git.io/JvXDl # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines # and modify them (or add more) to build your code if your project # uses a compiled language #- run: | # make bootstrap # make release - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v4 QuantLib-1.41/.github/workflows/copyrights.yml000066400000000000000000000011661513115055600214770ustar00rootroot00000000000000name: Update copyright list on: push: branches-ignore: - 'dependabot/**' jobs: check-copyrights: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - name: Check run: | ./tools/check_copyrights.sh - uses: peter-evans/create-pull-request@v8 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: lballabio[bot] <224797326+lballabio-bot@users.noreply.github.com> QuantLib-1.41/.github/workflows/coveralls.yml000066400000000000000000000026001513115055600212700ustar00rootroot00000000000000name: Coverage report on: push: branches: - master pull_request: workflow_dispatch: jobs: coverage: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v6 - name: Setup run: | sudo rm /etc/apt/sources.list.d/microsoft-prod.list sudo apt update sudo apt install -y lcov libboost-dev - name: Compile run: | ./autogen.sh ./configure --disable-shared CXXFLAGS='-O1 -fprofile-arcs -ftest-coverage' LDFLAGS='-lgcov' make -j 4 - name: Capture baseline run: | mkdir -p coverage tmp lcov --no-external --capture --initial --directory . --output-file ./tmp/lcov_base.info - name: Run tests run: | ./test-suite/quantlib-test-suite --log_level=message - name: Run examples run: | make -C Examples check-examples - name: Capture coverage run: | lcov --no-external --capture --directory . --output-file ./tmp/lcov_run.info lcov --add-tracefile ./tmp/lcov_base.info --add-tracefile ./tmp/lcov_run.info --output-file ./tmp/lcov_total.info lcov --remove ./tmp/lcov_total.info "$PWD/Examples/*" "$PWD/test-suite/*" --output-file ./coverage/lcov.info - name: Upload coverage to Coveralls uses: coverallsapp/github-action@v2 with: github-token: ${{ secrets.GITHUB_TOKEN }} file: ./coverage/lcov.info QuantLib-1.41/.github/workflows/devenv-images.yml000066400000000000000000000032761513115055600220420ustar00rootroot00000000000000name: Build quantlib-devenv Docker images on: workflow_dispatch: inputs: boostVersion: description: 'Boost version' required: true env: ROLLING: questing jobs: docker-images: runs-on: ubuntu-latest strategy: matrix: tag: [plucky, questing, resolute] steps: - uses: actions/checkout@v6 - name: Build CI images working-directory: dockerfiles run: | docker build -f ci.Dockerfile \ --build-arg tag=${{ matrix.tag }} \ --build-arg boost_version=${{ github.event.inputs.boostVersion }} \ --build-arg boost_dir=boost_$(echo "${{ github.event.inputs.boostVersion }}" | sed "s/\./_/g") \ -t ghcr.io/lballabio/quantlib-devenv:${{ matrix.tag }} . docker tag ghcr.io/lballabio/quantlib-devenv:${{ matrix.tag }} ghcr.io/lballabio/quantlib-devenv:${{ matrix.tag }}-${{ github.event.inputs.boostVersion }} if test "${{ matrix.tag }}" = "$ROLLING" ; then docker tag ghcr.io/lballabio/quantlib-devenv:${{ matrix.tag }} ghcr.io/lballabio/quantlib-devenv:rolling fi - 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-devenv:${{ matrix.tag }}-${{ github.event.inputs.boostVersion }} docker push ghcr.io/lballabio/quantlib-devenv:${{ matrix.tag }} if test "${{ matrix.tag }}" = "$ROLLING" ; then docker push ghcr.io/lballabio/quantlib-devenv:rolling fi QuantLib-1.41/.github/workflows/doxygen.yml000066400000000000000000000012601513115055600207540ustar00rootroot00000000000000name: Check doc generation on: push: branches: - '**' pull_request: jobs: docs: runs-on: macos-latest steps: - uses: actions/checkout@v6 - name: Setup env: HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1 run: | brew install automake autoconf libtool boost doxygen graphviz ./autogen.sh ./configure --with-boost-include=$(brew --prefix)/include - name: Doxygen version run: | doxygen --version - name: Check run: | make docs header-docs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - name: Check run: | ./tools/check_all_header_docs.sh QuantLib-1.41/.github/workflows/filelists.yml000066400000000000000000000007501513115055600213000ustar00rootroot00000000000000name: Check CMake file list and VC++ projects on: push: branches: - '**' pull_request: jobs: filelists: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - name: Setup run: | sudo rm /etc/apt/sources.list.d/microsoft-prod.list sudo apt update sudo apt install -y libboost-dev - name: Configure run: | ./autogen.sh ./configure - name: Check run: | ./tools/check_filelists.sh QuantLib-1.41/.github/workflows/generated-headers.yml000066400000000000000000000017231513115055600226520ustar00rootroot00000000000000name: Update generated headers on: push: branches-ignore: - 'dependabot/**' jobs: generate-headers: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - name: Setup run: | sudo rm /etc/apt/sources.list.d/microsoft-prod.list sudo apt update sudo apt install -y libboost-dev - name: Configure run: | ./autogen.sh ./configure - name: Update headers run: | find ql -name *.am | xargs touch make dist rm QuantLib-*.tar.gz - uses: peter-evans/create-pull-request@v8 with: token: ${{ secrets.MACHINE_ACCOUNT_PAT }} push-to-fork: ${{ vars.MACHINE_ACCOUNT }}/QuantLib branch: update-generated-headers-${{ github.ref_name }} delete-branch: true commit-message: 'Update generated headers' title: 'Update generated headers' author: lballabio[bot] <224797326+lballabio-bot@users.noreply.github.com> QuantLib-1.41/.github/workflows/headers.yml000066400000000000000000000012641513115055600207160ustar00rootroot00000000000000name: Compile single headers on: push: branches: - '**' pull_request: jobs: headers: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - name: Setup run: | sudo rm /etc/apt/sources.list.d/microsoft-prod.list sudo apt update sudo apt install -y libboost-dev ccache - name: Cache uses: hendrikmuhs/ccache-action@v1.2 with: key: single-headers-${{ github.ref }} restore-keys: | single-headers-${{ github.ref }} single-headers-refs/heads/master single-headers- - name: Check env: CXX: ccache g++ run: | ./tools/check_all_headers.sh QuantLib-1.41/.github/workflows/includes.yml000066400000000000000000000014541513115055600211120ustar00rootroot00000000000000name: Fix inclusions of ql headers in double quotes on: push: branches-ignore: - 'dependabot/**' jobs: check-includes: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - name: Check run: | shopt -s globstar sed -i -E -e 's|#include *"(ql/.*\.hpp)"|#include <\1>|g' **/*.[hc]pp - uses: peter-evans/create-pull-request@v8 with: token: ${{ secrets.MACHINE_ACCOUNT_PAT }} push-to-fork: ${{ vars.MACHINE_ACCOUNT }}/QuantLib branch: fix-include-in-quotes-${{ github.ref_name }} delete-branch: true commit-message: 'Fix inclusions of ql headers in double quotes' title: 'Fix inclusions of ql headers in double quotes' author: lballabio[bot] <224797326+lballabio-bot@users.noreply.github.com> QuantLib-1.41/.github/workflows/increase-version-number.yml000066400000000000000000000036201513115055600240430ustar00rootroot00000000000000name: Increase version number on: workflow_dispatch: jobs: increase-version: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 with: fetch-depth: 0 fetch-tags: true - name: Setup git run: | git config user.name 'lballabio[bot]' git config user.email '224797326+lballabio-bot@users.noreply.github.com' - name: Calculate versions env: GH_TOKEN: ${{ github.token }} run: | export LATEST_RELEASE=`gh release list --json name,isLatest --jq '.[] | select(.isLatest)|.name'` echo ${LATEST_RELEASE} | awk -F '.' '{ print "LATEST_MINOR=" $2 }' | tee -a $GITHUB_ENV echo ${LATEST_RELEASE} | awk -F '.' '{ print "NEXT_MINOR=" $2 + 1 }' | tee -a $GITHUB_ENV - name: Update version numbers run: | sed -i -e "s/^AC_INIT(\[QuantLib\].*$/AC_INIT([QuantLib], [1.${NEXT_MINOR}-dev],/g" configure.ac sed -i -e "s/^#define QL_VERSION.*$/#define QL_VERSION \"1.${NEXT_MINOR}-dev\"/g" ql/version.hpp sed -i -e "s/^#define QL_HEX_VERSION.*$/#define QL_HEX_VERSION 0x01${NEXT_MINOR}0000/g" ql/version.hpp sed -i -e "s/^set(QUANTLIB_VERSION_MINOR .*$/set(QUANTLIB_VERSION_MINOR ${NEXT_MINOR})/g" CMakeLists.txt sed -i -e "s/^set(PACKAGE_VERSION .*$/set(PACKAGE_VERSION \"1.${NEXT_MINOR}-dev\"\)/g" CMakeLists.txt sed -i -e "s/^set(PACKAGE_VERSION_HEX.*$/set(PACKAGE_VERSION_HEX \"0x01${NEXT_MINOR}0000\"\)/g" CMakeLists.txt git commit -a -m "Set version to 1.${NEXT_MINOR}-dev" - uses: peter-evans/create-pull-request@v8 with: token: ${{ secrets.MACHINE_ACCOUNT_PAT }} push-to-fork: ${{ vars.MACHINE_ACCOUNT }}/QuantLib branch: set-to-rc-${{ github.ref_name }} delete-branch: true title: 'Set version to 1.${{ env.NEXT_MINOR }}-dev' author: lballabio[bot] <224797326+lballabio-bot@users.noreply.github.com> QuantLib-1.41/.github/workflows/license-url.yml000066400000000000000000000013641513115055600215260ustar00rootroot00000000000000name: Update old license links on: push: branches-ignore: - 'dependabot/**' jobs: license-urls: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - name: Check run: | shopt -s globstar sed -i -e 's|http://quantlib\.org/license\.shtml|https://www.quantlib.org/license.shtml|g' **/*.[hc]pp **/*.ac **/*.docs **/*.cfg **/*.sh **/*.el - uses: peter-evans/create-pull-request@v8 with: token: ${{ secrets.GITHUB_TOKEN }} branch: update-license-links-${{ github.ref_name }} delete-branch: true commit-message: 'Update old license links' title: 'Update old license links' author: lballabio[bot] <224797326+lballabio-bot@users.noreply.github.com> QuantLib-1.41/.github/workflows/linux-full-tests.yml000066400000000000000000000156141513115055600225460ustar00rootroot00000000000000name: Linux build with full test matrix on: schedule: - cron: '0 0 * * 0' workflow_dispatch: jobs: build: runs-on: ubuntu-latest strategy: fail-fast: false matrix: include: - name: "gcc 8.3 (Boost 1.72)" shortname: gcc8 tag: cosmic cc: gcc cxx: g++ - name: "gcc 9.3 (Boost 1.78)" shortname: gcc9 tag: focal cc: gcc cxx: g++ - name: "gcc 10.3 (Boost 1.79)" shortname: gcc10 tag: hirsute cc: gcc cxx: g++ - name: "gcc 11.4 (Boost 1.82)" shortname: gcc11 tag: jammy cc: gcc cxx: g++ - name: "gcc 12.3 (Boost 1.86)" shortname: gcc12 tag: lunar cc: gcc cxx: g++ - name: "gcc 13.3 (Boost 1.89)" shortname: gcc13 tag: noble cc: gcc cxx: g++ - name: "gcc 14.x" shortname: gcc14 tag: plucky cc: gcc cxx: g++ - name: "gcc 15.x" shortname: gcc15 tag: questing cc: gcc cxx: g++ - name: "Clang 7 (Boost 1.72)" shortname: clang7 tag: cosmic cc: clang cxx: clang++ - name: "Clang 8 (Boost 1.72)" shortname: clang8 tag: disco cc: clang cxx: clang++ - name: "Clang 9 (Boost 1.74)" shortname: clang9 tag: eoan cc: clang cxx: clang++ - name: "Clang 10 (Boost 1.78)" shortname: clang10 tag: focal cc: clang cxx: clang++ - name: "Clang 11 (Boost 1.78)" shortname: clang11 tag: groovy cc: clang cxx: clang++ - name: "Clang 12 (Boost 1.79)" shortname: clang12 tag: hirsute cc: clang cxx: clang++ - name: "Clang 13 (Boost 1.79)" shortname: clang13 tag: impish cc: clang cxx: clang++ - name: "Clang 14 (Boost 1.82)" shortname: clang14 tag: jammy cc: clang cxx: clang++ - name: "Clang 15 (Boost 1.86)" shortname: clang15 tag: lunar cc: clang cxx: clang++ - name: "Clang 16 (Boost 1.86)" shortname: clang16 tag: mantic cc: clang cxx: clang++ - name: "Clang 17 (Boost 1.84)" shortname: clang17 tag: clang-17 cc: clang cxx: clang++ - name: "Clang 18 (Boost 1.89)" shortname: clang18 tag: noble cc: clang cxx: clang++ - name: "Clang 19 (Boost 1.89)" shortname: clang19 tag: oracular cc: clang cxx: clang++ - name: "Clang 20" shortname: clang20 tag: questing cc: clang cxx: clang++ - name: "Clang 21" shortname: clang21 tag: resolute cc: clang cxx: clang++ - name: "C++17 mode" shortname: c++17 tag: rolling cc: gcc cxx: g++ cxxflags: "-std=c++17" - name: "C++20 mode" shortname: c++20 tag: rolling cc: gcc cxx: g++ cxxflags: "-std=c++20" - name: "C++23 mode" shortname: c++23 tag: rolling cc: gcc cxx: g++ cxxflags: "-std=c++23" - name: "C++26 mode" shortname: c++26 tag: rolling cc: gcc cxx: g++ cxxflags: "-std=c++26" - name: "Unity build enabled" shortname: unity tag: rolling cc: gcc cxx: g++ configureflags: --enable-unity-build - name: "Intraday calculations enabled" shortname: intraday tag: rolling cc: gcc cxx: g++ configureflags: --enable-intraday - name: "Throwing in cycles enabled" shortname: cycles tag: rolling cc: gcc cxx: g++ configureflags: --enable-throwing-in-cycles --disable-faster-lazy-objects - name: "Indexed coupons enabled" shortname: indexed tag: rolling cc: gcc cxx: g++ configureflags: --enable-indexed-coupons - name: "Standard Library classes enabled" shortname: stdclasses tag: rolling cc: gcc cxx: g++ configureflags: --enable-std-classes - name: "Thread-safe observer enabled" shortname: threadsafe tag: rolling cc: gcc cxx: g++ configureflags: --enable-thread-safe-observer-pattern - name: "Sessions enabled" shortname: sessions tag: rolling cc: gcc cxx: g++ configureflags: --enable-sessions - name: "OpenMP enabled" shortname: openmp tag: rolling cc: gcc cxx: g++ configureflags: --enable-openmp - name: "Parallel unit-test runner" shortname: paralleltests tag: rolling cc: gcc cxx: g++ configureflags: --enable-parallel-unit-test-runner - name: "Null as function template" shortname: nullfunctions tag: rolling cc: gcc cxx: g++ configureflags: --enable-null-as-functions container: ghcr.io/lballabio/quantlib-devenv:${{ matrix.tag }} steps: - uses: actions/checkout@v6 - name: Compiler version run: | ${{ matrix.cc }} --version - name: Build run: | ./autogen.sh ./configure --disable-static ${{ matrix.configureflags }} CC="${{ matrix.cc }}" CXX="${{ matrix.cxx }}" CXXFLAGS="-O2 -g0 -Wall -Wno-unknown-pragmas -Werror ${{ matrix.cxxflags }}" cat ql/config.hpp make -j 4 - name: Run tests run: | ./test-suite/quantlib-test-suite --log_level=message - name: Run examples run: | make check-examples - name: Check global header run: | echo "#include " > test1.cpp && echo "int main() { return 0; }" >> test1.cpp echo "#include " > test2.cpp make install ${{ matrix.cxx }} -O2 -g0 -Wall -Wno-unknown-pragmas -Werror ${{ matrix.cxxflags }} `quantlib-config --cflags` test1.cpp test2.cpp `quantlib-config --libs` QuantLib-1.41/.github/workflows/linux-nondefault.yml000066400000000000000000000133111513115055600225730ustar00rootroot00000000000000name: Linux build with non-default configuration on: schedule: - cron: '0 0 * * 0' workflow_dispatch: jobs: build: runs-on: ubuntu-latest strategy: fail-fast: false matrix: include: - name: "gcc 8.3 (Boost 1.72)" shortname: gcc8 tag: cosmic cc: gcc cxx: g++ - name: "gcc 9.3 (Boost 1.78)" shortname: gcc9 tag: focal cc: gcc cxx: g++ - name: "gcc 10.3 (Boost 1.79)" shortname: gcc10 tag: hirsute cc: gcc cxx: g++ - name: "gcc 11.4 (Boost 1.82)" shortname: gcc11 tag: jammy cc: gcc cxx: g++ - name: "gcc 12.3 (Boost 1.86)" shortname: gcc12 tag: lunar cc: gcc cxx: g++ - name: "gcc 13.3 (Boost 1.89)" shortname: gcc13 tag: noble cc: gcc cxx: g++ - name: "gcc 14.x" shortname: gcc14 tag: plucky cc: gcc cxx: g++ - name: "gcc 15.x" shortname: gcc15 tag: questing cc: gcc cxx: g++ - name: "Clang 7 (Boost 1.72)" shortname: clang7 tag: cosmic cc: clang cxx: clang++ - name: "Clang 8 (Boost 1.72)" shortname: clang8 tag: disco cc: clang cxx: clang++ - name: "Clang 9 (Boost 1.74)" shortname: clang9 tag: eoan cc: clang cxx: clang++ - name: "Clang 10 (Boost 1.78)" shortname: clang10 tag: focal cc: clang cxx: clang++ - name: "Clang 11 (Boost 1.78)" shortname: clang11 tag: groovy cc: clang cxx: clang++ - name: "Clang 12 (Boost 1.79)" shortname: clang12 tag: hirsute cc: clang cxx: clang++ - name: "Clang 13 (Boost 1.79)" shortname: clang13 tag: impish cc: clang cxx: clang++ - name: "Clang 14 (Boost 1.82)" shortname: clang14 tag: jammy cc: clang cxx: clang++ - name: "Clang 15 (Boost 1.86)" shortname: clang15 tag: lunar cc: clang cxx: clang++ - name: "Clang 16 (Boost 1.86)" shortname: clang16 tag: mantic cc: clang cxx: clang++ - name: "Clang 18 (Boost 1.89)" shortname: clang18 tag: noble cc: clang cxx: clang++ - name: "Clang 19 (Boost 1.89)" shortname: clang19 tag: oracular cc: clang cxx: clang++ - name: "Clang 20" shortname: clang20 tag: questing cc: clang cxx: clang++ - name: "Clang 21" shortname: clang21 tag: resolute cc: clang cxx: clang++ - name: "C++17 mode" shortname: c++17 tag: rolling cc: gcc cxx: g++ cxxflags: "-std=c++17" - name: "C++20 mode" shortname: c++20 tag: rolling cc: gcc cxx: g++ cxxflags: "-std=c++20" - name: "C++23 mode" shortname: c++23 tag: rolling cc: gcc cxx: g++ cxxflags: "-std=c++23" - name: "C++26 mode" shortname: c++26 tag: rolling cc: gcc cxx: g++ cxxflags: "-std=c++26" - name: "Unity build enabled" shortname: unity tag: rolling cc: gcc cxx: g++ configureflags: --enable-unity-build - name: "Standard Library classes enabled" shortname: stdclasses tag: rolling cc: gcc cxx: g++ configureflags: --enable-std-pointers --disable-std-any --disable-std-optional - name: "OpenMP enabled" shortname: openmp tag: rolling cc: gcc cxx: g++ configureflags: --enable-openmp container: ghcr.io/lballabio/quantlib-devenv:${{ matrix.tag }} steps: - uses: actions/checkout@v6 - name: Compiler version run: | ${{ matrix.cc }} --version - name: Build run: | ./autogen.sh ./configure --disable-static --enable-error-lines --enable-error-functions --enable-tracing --enable-indexed-coupons --enable-extra-safety-checks --enable-sessions --enable-thread-safe-observer-pattern --enable-intraday --disable-faster-lazy-objects --enable-throwing-in-cycles --enable-null-as-functions ${{ matrix.configureflags }} CC="${{ matrix.cc }}" CXX="${{ matrix.cxx }}" CPPFLAGS="-Wall -Wno-unknown-pragmas -Wno-array-bounds -Werror" CXXFLAGS="-O2 -g0 ${{ matrix.cxxflags }}" cat ql/config.hpp make -j 4 - name: Run tests run: | ./test-suite/quantlib-test-suite --log_level=message - name: Run examples run: | make check-examples - name: Check global header run: | echo "#include " > test1.cpp && echo "int main() { return 0; }" >> test1.cpp echo "#include " > test2.cpp make install ${{ matrix.cxx }} -O2 -g0 -Wall -Wno-unknown-pragmas -Werror ${{ matrix.cxxflags }} `quantlib-config --cflags` test1.cpp test2.cpp `quantlib-config --libs` QuantLib-1.41/.github/workflows/linux.yml000066400000000000000000000130761513115055600204460ustar00rootroot00000000000000name: Linux build on: push: branches: - '**' pull_request: jobs: build: runs-on: ubuntu-latest strategy: fail-fast: false matrix: include: - name: "gcc 9.3 (Boost 1.78)" shortname: gcc9 tag: focal cc: gcc cxx: g++ - name: "gcc 11.4 (Boost 1.82)" shortname: gcc11 tag: jammy cc: gcc cxx: g++ - name: "gcc 13.3 (Boost 1.89)" shortname: gcc13 tag: noble cc: gcc cxx: g++ tests: true - name: "gcc 15.x" shortname: gcc15 tag: questing cc: gcc cxx: g++ tests: true - name: "Clang 10 (Boost 1.78)" shortname: clang10 tag: focal cc: clang cxx: clang++ - name: "Clang 14 (Boost 1.82)" shortname: clang14 tag: jammy cc: clang cxx: clang++ - name: "Clang 18 (Boost 1.89)" shortname: clang18 tag: noble cc: clang cxx: clang++ tests: true - name: "Clang 21" shortname: clang21 tag: resolute cc: clang cxx: clang++ tests: true - name: "C++17 mode" shortname: c++17 tag: rolling cc: gcc cxx: g++ cxxflags: "-std=c++17" - name: "C++20 mode" shortname: c++20 tag: rolling cc: gcc cxx: g++ cxxflags: "-std=c++20" - name: "C++23 mode" shortname: c++23 tag: rolling cc: gcc cxx: g++ cxxflags: "-std=c++23" - name: "C++26 mode" shortname: c++26 tag: rolling cc: gcc cxx: g++ cxxflags: "-std=c++26" - name: "Unity build enabled" shortname: unity tag: rolling cc: gcc cxx: g++ configureflags: --enable-unity-build - name: "Intraday calculations enabled" shortname: intraday tag: rolling cc: gcc cxx: g++ configureflags: --enable-intraday tests: true - name: "Throwing in cycles enabled" shortname: cycles tag: rolling cc: gcc cxx: g++ configureflags: --enable-throwing-in-cycles --disable-faster-lazy-objects tests: true - name: "Indexed coupons enabled" shortname: indexed tag: rolling cc: gcc cxx: g++ configureflags: --enable-indexed-coupons tests: true - name: "Standard Library classes enabled" shortname: stdclasses tag: rolling cc: gcc cxx: g++ configureflags: --enable-std-classes tests: true - name: "Thread-safe observer enabled" shortname: threadsafe tag: rolling cc: gcc cxx: g++ configureflags: --enable-thread-safe-observer-pattern tests: true - name: "Sessions enabled" shortname: sessions tag: rolling cc: gcc cxx: g++ configureflags: --enable-sessions tests: true - name: "OpenMP enabled" shortname: openmp tag: rolling cc: gcc cxx: g++ configureflags: --enable-openmp tests: true - name: "Parallel unit-test runner" shortname: paralleltests tag: rolling cc: gcc cxx: g++ configureflags: --enable-parallel-unit-test-runner tests: true - name: "Null as function template" shortname: nullfunctions tag: rolling cc: gcc cxx: g++ configureflags: --enable-null-as-functions tests: true container: ghcr.io/lballabio/quantlib-devenv:${{ matrix.tag }} steps: - uses: actions/checkout@v6 - name: Cache uses: hendrikmuhs/ccache-action@v1.2 with: key: linux-ci-build-${{ matrix.shortname }}-${{ github.ref }} restore-keys: | linux-ci-build-${{ matrix.shortname }}-${{ github.ref }} linux-ci-build-${{ matrix.shortname }}-refs/heads/master linux-ci-build-${{ matrix.shortname }}- - name: Compiler version run: | ${{ matrix.cc }} --version - name: Build run: | ./autogen.sh ./configure --disable-static ${{ matrix.configureflags }} CC="ccache ${{ matrix.cc }}" CXX="ccache ${{ matrix.cxx }}" CXXFLAGS="-O2 -g0 -Wall -Wno-unknown-pragmas -Werror ${{ matrix.cxxflags }}" cat ql/config.hpp make -j 4 - name: Run tests if: ${{ matrix.tests }} run: | ./test-suite/quantlib-test-suite --log_level=message - name: Run examples if: ${{ matrix.tests }} run: | make check-examples - name: Check global header if: ${{ matrix.tests }} run: | echo "#include " > test1.cpp && echo "int main() { return 0; }" >> test1.cpp echo "#include " > test2.cpp make install ${{ matrix.cxx }} -O2 -g0 -Wall -Wno-unknown-pragmas -Werror ${{ matrix.cxxflags }} `quantlib-config --cflags` test1.cpp test2.cpp `quantlib-config --libs` QuantLib-1.41/.github/workflows/macos-nondefault.yml000066400000000000000000000025341513115055600225430ustar00rootroot00000000000000name: Mac OS build with non-default configuration on: schedule: - cron: '0 0 * * 0' workflow_dispatch: jobs: build: runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: os: [macos-14, macos-15] classes: [boost, std] include: - classes: std configureflags: --enable-std-pointers --disable-std-any --disable-std-optional steps: - uses: actions/checkout@v6 - name: Setup env: HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1 run: | brew install automake autoconf libtool boost - name: Compiler version run: | clang --version - name: Build run: | ./autogen.sh ./configure --disable-shared --with-boost-include=`brew --prefix`/include --enable-error-lines --enable-error-functions --enable-tracing --enable-indexed-coupons --enable-extra-safety-checks --enable-sessions --enable-thread-safe-observer-pattern --enable-intraday --disable-faster-lazy-objects --enable-throwing-in-cycles --enable-null-as-functions ${{ matrix.configureflags }} CC="clang" CXX="clang++" CXXFLAGS="-O2 -g0 -Wall -Werror" cat ql/config.hpp make -j 3 - name: Run tests run: | ./test-suite/quantlib-test-suite --log_level=message - name: Run examples run: | make -C Examples check-examples QuantLib-1.41/.github/workflows/macos.yml000066400000000000000000000023251513115055600204040ustar00rootroot00000000000000name: Mac OS build on: push: branches: - '**' pull_request: jobs: build: runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: os: [macos-14, macos-15] steps: - uses: actions/checkout@v6 - name: Setup env: HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1 run: | brew install automake autoconf libtool boost ccache - name: Cache uses: hendrikmuhs/ccache-action@v1.2 with: key: macos-ci-build-${{ matrix.os }}-${{ github.ref }} restore-keys: | macos-ci-build-${{ matrix.os }}-${{ github.ref }} macos-ci-build-${{ matrix.os }}-refs/heads/master macos-ci-build-${{ matrix.os }}- - name: Compiler version run: | clang --version - name: Build run: | ./autogen.sh ./configure --disable-shared --with-boost-include=`brew --prefix`/include ${{ matrix.configureflags }} CC="ccache clang" CXX="ccache clang++" CXXFLAGS="-O2 -g0 -Wall -Werror ${{ matrix.cxxflags }}" make -j 3 - name: Run tests run: | ./test-suite/quantlib-test-suite --log_level=message - name: Run examples run: | make -C Examples check-examples QuantLib-1.41/.github/workflows/misspell.yml000066400000000000000000000012021513115055600211230ustar00rootroot00000000000000name: Misspell fixer on: push: branches-ignore: - 'dependabot/**' jobs: check: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - uses: sobolevn/misspell-fixer-action@master - uses: peter-evans/create-pull-request@v8 with: token: ${{ secrets.MACHINE_ACCOUNT_PAT }} push-to-fork: ${{ vars.MACHINE_ACCOUNT }}/QuantLib branch: misspell-fixes-${{ github.ref_name }} delete-branch: true commit-message: 'Fixes by misspell-fixer' title: 'Typos fixed by misspell-fixer' author: lballabio[bot] <224797326+lballabio-bot@users.noreply.github.com> QuantLib-1.41/.github/workflows/msvc-all-configs.yml000066400000000000000000000040301513115055600224410ustar00rootroot00000000000000name: Windows build with all configurations on: schedule: - cron: '0 0 * * 0' workflow_dispatch: jobs: msbuild: runs-on: windows-2022 strategy: fail-fast: false matrix: toolset: [v142, v143] platform: [x64, Win32] configuration: ['Release', 'Debug', 'Release (static runtime)', 'Debug (static runtime)'] unity: [unity, singles] include: - toolset: v142 boost_version: 77 vsversion: 2019 - toolset: v143 boost_version: 90 vsversion: 2022 steps: - uses: actions/checkout@v6 - name: Setup MSVC++ environment uses: ilammy/msvc-dev-cmd@v1 with: arch: x64 - name: Setup Boost run: | $Url = "https://archives.boost.io/release/1.${{ matrix.boost_version }}.0/source/boost_1_${{ matrix.boost_version }}_0.zip" (New-Object System.Net.WebClient).DownloadFile($Url, "$RUNNER_TEMP\boost.zip") Expand-Archive -Path "$RUNNER_TEMP\boost.zip" -DestinationPath C:\local Rename-Item -Path "C:\local\boost_1_${{ matrix.boost_version }}_0" -NewName "boost" - name: Setup local properties shell: cmd run: | COPY .ci\VS${{ matrix.vsversion }}.props .\Build.props - name: Setup unity build if: ${{ matrix.unity == 'unity' }} shell: cmd run: | COPY .ci\Unity.props .\Directory.Build.props - name: Build run: | msbuild ./QuantLib.sln /verbosity:normal /property:Configuration="${{ matrix.configuration }}" /property:Platform=${{ matrix.platform }} /property:PlatformToolset=${{ matrix.toolset }} - name: Test if: ${{ contains(matrix.configuration, 'Release') }} run: | .\test-suite\bin\QuantLib-test-suite*.exe --log_level=message - name: Run examples if: ${{ contains(matrix.configuration, 'Release') }} run: | foreach ($file in Get-ChildItem -Path .\Examples\*.exe -Recurse) { & $file.FullName if (!$?) { Exit $LASTEXITCODE } } QuantLib-1.41/.github/workflows/msvc-analysis.yml000066400000000000000000000030521513115055600220710ustar00rootroot00000000000000name: Microsoft C++ Code Analysis on: schedule: - cron: '0 0 * * 0' workflow_dispatch: env: # Path to the CMake build directory. build: '${{ github.workspace }}/build' jobs: analyze: name: Analyze runs-on: windows-2022 steps: - name: Checkout repository uses: actions/checkout@v6 - name: Setup run: | $Url = "https://archives.boost.io/release/1.90.0/source/boost_1_90_0.zip" (New-Object System.Net.WebClient).DownloadFile($Url, "$RUNNER_TEMP\boost.zip") Expand-Archive -Path "$RUNNER_TEMP\boost.zip" -DestinationPath C:\local Rename-Item -Path "C:\local\boost_1_90_0" -NewName "boost" - name: Configure CMake env: BOOST_ROOT: C:\local\boost run: cmake -B ${{ env.build }} -DQL_USE_STD_CLASSES=ON - name: Run MSVC Code Analysis uses: microsoft/msvc-code-analysis-action@v0.1.1 # Provide a unique ID to access the sarif output path id: run-analysis env: CAExcludePath: C:\local\boost with: cmakeBuildDirectory: ${{ env.build }} buildConfiguration: Release ruleset: '${{ github.workspace }}/.msvc-analysis.ruleset' - name: Upload SARIF to GitHub uses: github/codeql-action/upload-sarif@v4 with: sarif_file: ${{ steps.run-analysis.outputs.sarif }} - name: Upload SARIF as an Artifact uses: actions/upload-artifact@v6 with: name: sarif-file path: ${{ steps.run-analysis.outputs.sarif }} QuantLib-1.41/.github/workflows/msvc-nondefault.yml000066400000000000000000000036041513115055600224100ustar00rootroot00000000000000name: Windows build with non-default configuration on: schedule: - cron: '0 0 * * 0' workflow_dispatch: jobs: msbuild: runs-on: windows-2022 strategy: fail-fast: false matrix: toolset: [v142, v143] platform: [x64, Win32] unity: [unity, singles] include: - toolset: v142 boost_version: 77 vsversion: 2019 - toolset: v143 boost_version: 90 vsversion: 2022 steps: - uses: actions/checkout@v6 - name: Setup MSVC++ environment uses: ilammy/msvc-dev-cmd@v1 with: arch: x64 - name: Setup Boost run: | $Url = "https://archives.boost.io/release/1.${{ matrix.boost_version }}.0/source/boost_1_${{ matrix.boost_version }}_0.zip" (New-Object System.Net.WebClient).DownloadFile($Url, "$RUNNER_TEMP\boost.zip") Expand-Archive -Path "$RUNNER_TEMP\boost.zip" -DestinationPath C:\local Rename-Item -Path "C:\local\boost_1_${{ matrix.boost_version }}_0" -NewName "boost" - name: Setup local properties shell: cmd run: | COPY .ci\VS${{ matrix.vsversion }}.alt.props .\Build.props COPY .ci\userconfig${{ matrix.vsversion }}.alt.hpp .\ql\userconfig.hpp - name: Setup unity build if: ${{ matrix.unity == 'unity' }} shell: cmd run: | COPY .ci\Unity.props .\Directory.Build.props - name: Build run: | msbuild ./QuantLib.sln /verbosity:normal /property:Configuration=Release /property:Platform=${{ matrix.platform }} /property:PlatformToolset=${{ matrix.toolset }} - name: Test run: | .\test-suite\bin\QuantLib-test-suite*.exe --log_level=message - name: Run examples run: | foreach ($file in Get-ChildItem -Path .\Examples\*.exe -Recurse) { & $file.FullName if (!$?) { Exit $LASTEXITCODE } } QuantLib-1.41/.github/workflows/msvc.yml000066400000000000000000000033321513115055600202510ustar00rootroot00000000000000name: Windows build on: push: branches: - '**' pull_request: jobs: msbuild: runs-on: windows-2022 strategy: fail-fast: false matrix: toolset: [v142, v143] unity: [unity, singles] include: - toolset: v142 boost_version: 77 vsversion: 2019 - toolset: v143 boost_version: 90 vsversion: 2022 steps: - uses: actions/checkout@v6 - name: Setup MSVC++ environment uses: ilammy/msvc-dev-cmd@v1 with: arch: x64 - name: Setup Boost run: | $Url = "https://archives.boost.io/release/1.${{ matrix.boost_version }}.0/source/boost_1_${{ matrix.boost_version }}_0.zip" (New-Object System.Net.WebClient).DownloadFile($Url, "$RUNNER_TEMP\boost.zip") Expand-Archive -Path "$RUNNER_TEMP\boost.zip" -DestinationPath C:\local Rename-Item -Path "C:\local\boost_1_${{ matrix.boost_version }}_0" -NewName "boost" - name: Setup local properties shell: cmd run: | COPY .ci\VS${{ matrix.vsversion }}.props .\Build.props - name: Setup unity build if: ${{ matrix.unity == 'unity' }} shell: cmd run: | COPY .ci\Unity.props .\Directory.Build.props - name: Build run: | msbuild ./QuantLib.sln /verbosity:normal /property:Configuration=Release /property:Platform=x64 /property:PlatformToolset=${{ matrix.toolset }} - name: Test run: | .\test-suite\bin\QuantLib-test-suite*.exe --log_level=message - name: Run examples run: | foreach ($file in Get-ChildItem -Path .\Examples\*.exe -Recurse) { & $file.FullName if (!$?) { Exit $LASTEXITCODE } } QuantLib-1.41/.github/workflows/namespaces.yml000066400000000000000000000023531513115055600214220ustar00rootroot00000000000000name: Fix deprecated uses of ext namespace on: push: branches-ignore: - 'dependabot/**' jobs: check-namespaces: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - name: Check run: | shopt -s globstar sed -i -e 's/ext::function\b/std::function/g' **/*.[hc]pp sed -i -e 's/ext::bind\b/std::bind/g' **/*.[hc]pp sed -i -e 's/ext::ref\b/std::ref/g' **/*.[hc]pp sed -i -e 's/ext::cref\b/std::cref/g' **/*.[hc]pp sed -i -e 's/ext::placeholders\b/std::placeholders/g' **/*.[hc]pp sed -i -e 's/ext::tuple\b/std::tuple/g' **/*.[hc]pp sed -i -e 's/ext::make_tuple\b/std::make_tuple/g' **/*.[hc]pp sed -i -e 's/ext::get\b/std::get/g' **/*.[hc]pp sed -i -e 's/ext::tie\b/std::tie/g' **/*.[hc]pp - uses: peter-evans/create-pull-request@v8 with: token: ${{ secrets.MACHINE_ACCOUNT_PAT }} push-to-fork: ${{ vars.MACHINE_ACCOUNT }}/QuantLib branch: fix-ext-namespace-${{ github.ref_name }} delete-branch: true commit-message: 'Fix deprecated uses of ext namespace' title: 'Fix deprecated uses of ext namespace' author: lballabio[bot] <224797326+lballabio-bot@users.noreply.github.com> QuantLib-1.41/.github/workflows/prepare-release-candidate.yml000066400000000000000000000040221513115055600242640ustar00rootroot00000000000000name: Prepare release candidate on: workflow_dispatch: jobs: update-for-rc: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 with: fetch-depth: 0 fetch-tags: true - name: Setup git run: | git config user.name 'lballabio[bot]' git config user.email '224797326+lballabio-bot@users.noreply.github.com' - name: Calculate versions env: GH_TOKEN: ${{ github.token }} run: | export LATEST_RELEASE=`gh release list --json name,isLatest --jq '.[] | select(.isLatest)|.name'` echo ${LATEST_RELEASE} | awk -F '.' '{ print "LATEST_MINOR=" $2 }' | tee -a $GITHUB_ENV echo ${LATEST_RELEASE} | awk -F '.' '{ print "NEXT_MINOR=" $2 + 1 }' | tee -a $GITHUB_ENV - name: Update version numbers run: | sed -i -e "s/^AC_INIT(\[QuantLib\].*$/AC_INIT([QuantLib], [1.${NEXT_MINOR}-rc],/g" configure.ac sed -i -e "s/^#define QL_VERSION.*$/#define QL_VERSION \"1.${NEXT_MINOR}-rc\"/g" ql/version.hpp sed -i -e "s/^#define QL_HEX_VERSION.*$/#define QL_HEX_VERSION 0x01${NEXT_MINOR}00c0/g" ql/version.hpp sed -i -e "s/^set(PACKAGE_VERSION .*$/set(PACKAGE_VERSION \"1.${NEXT_MINOR}-rc\"\)/g" CMakeLists.txt sed -i -e "s/^set(PACKAGE_VERSION_HEX.*$/set(PACKAGE_VERSION_HEX \"0x01${NEXT_MINOR}00c0\"\)/g" CMakeLists.txt git commit -a -m "Set version to 1.${NEXT_MINOR}-rc" - name: Update ChangeLog run: | git log --pretty=medium --date=rfc --stat --grep='Merge [^p]' --grep='[Mm]erged' --grep='[Pp]ull from' --invert-grep v1.${LATEST_MINOR}... > ChangeLog.txt git commit -a -m "Update changelog" - uses: peter-evans/create-pull-request@v8 with: token: ${{ secrets.MACHINE_ACCOUNT_PAT }} push-to-fork: ${{ vars.MACHINE_ACCOUNT }}/QuantLib branch: set-to-rc-${{ github.ref_name }} delete-branch: true title: 'Set version to 1.${{ env.NEXT_MINOR }}-rc' author: lballabio[bot] <224797326+lballabio-bot@users.noreply.github.com> QuantLib-1.41/.github/workflows/prepare-release.yml000066400000000000000000000040251513115055600223550ustar00rootroot00000000000000name: Prepare release on: workflow_dispatch: jobs: update-for-release: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 with: fetch-depth: 0 fetch-tags: true - name: Setup git run: | git config user.name 'lballabio[bot]' git config user.email '224797326+lballabio-bot@users.noreply.github.com' - name: Calculate versions env: GH_TOKEN: ${{ github.token }} run: | export LATEST_RELEASE=`gh release list --json name,isLatest --jq '.[] | select(.isLatest)|.name'` echo ${LATEST_RELEASE} | awk -F '.' '{ print "LATEST_MINOR=" $2 }' | tee -a $GITHUB_ENV echo ${LATEST_RELEASE} | awk -F '.' '{ print "NEXT_MINOR=" $2 + 1 }' | tee -a $GITHUB_ENV - name: Update version numbers run: | sed -i -e "s/^AC_INIT(\[QuantLib\].*$/AC_INIT([QuantLib], [1.${NEXT_MINOR}],/g" configure.ac sed -i -e "s/^#define QL_VERSION.*$/#define QL_VERSION \"1.${NEXT_MINOR}\"/g" ql/version.hpp sed -i -e "s/^#define QL_HEX_VERSION.*$/#define QL_HEX_VERSION 0x01${NEXT_MINOR}00f0/g" ql/version.hpp sed -i -e "s/^set(PACKAGE_VERSION .*$/set(PACKAGE_VERSION \"1.${NEXT_MINOR}\"\)/g" CMakeLists.txt sed -i -e "s/^set(PACKAGE_VERSION_HEX.*$/set(PACKAGE_VERSION_HEX \"0x01${NEXT_MINOR}00f0\"\)/g" CMakeLists.txt git commit -a -m "Set version to 1.${NEXT_MINOR}" - name: Update ChangeLog run: | git log --pretty=medium --date=rfc --stat --grep='Merge [^p]' --grep='[Mm]erged' --grep='[Pp]ull from' --invert-grep v1.${LATEST_MINOR}... > ChangeLog.txt git commit -a -m "Update changelog" - uses: peter-evans/create-pull-request@v8 with: token: ${{ secrets.MACHINE_ACCOUNT_PAT }} push-to-fork: ${{ vars.MACHINE_ACCOUNT }}/QuantLib branch: update-version-for-release-${{ github.ref_name }} delete-branch: true title: 'Set version to 1.${{ env.NEXT_MINOR }} final' author: lballabio[bot] <224797326+lballabio-bot@users.noreply.github.com> QuantLib-1.41/.github/workflows/publish-release-candidate.yml000066400000000000000000000021711513115055600242770ustar00rootroot00000000000000name: Publish release candidate on: push: tags: - 'v1.*-rc' permissions: contents: write packages: write jobs: publish-rc: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 with: fetch-depth: 0 fetch-tags: true - name: Setup run: | sudo apt update sudo apt install -y libboost-dev tofrodos ./autogen.sh ./configure - name: Make tarballs run: | mkdir tarballs make dist mv QuantLib-*.tar.gz tarballs cd tarballs && ../tools/tgz2zip *.tar.gz && ls -lh - name: Extract version run: | echo ${{ github.ref_name }} | awk -F '[v-]' '{ print "VERSION_NUMBER=" $2 }' | tee -a $GITHUB_ENV - name: Create prerelease env: GH_TOKEN: ${{ github.token }} run: | gh release create ${{ github.ref_name }} \ --title "${VERSION_NUMBER} release candidate" \ --prerelease \ --notes "This is a release candidate. Please try it out and report any issues here on GitHub." --generate-notes \ tarballs/*.tar.gz tarballs/*.zip QuantLib-1.41/.github/workflows/publish-release.yml000066400000000000000000000061531513115055600223710ustar00rootroot00000000000000name: Draft new release on: push: tags: - 'v1.[0-9]+' permissions: contents: write packages: write jobs: draft-release: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 with: fetch-depth: 0 fetch-tags: true - name: Setup run: | sudo apt update sudo apt install -y libboost-dev tofrodos ./autogen.sh ./configure - name: Make tarballs run: | mkdir tarballs make dist mv QuantLib-*.tar.gz tarballs cd tarballs && ../tools/tgz2zip *.tar.gz && ls -lh - name: Extract version run: | echo ${{ github.ref_name }} | awk -F '[v-]' '{ print "VERSION_NUMBER=" $2 }' | tee -a $GITHUB_ENV - name: Prepare release notes run: | echo "Downloads:" >> tarballs/notes.txt echo "==========" >> tarballs/notes.txt echo "" >> tarballs/notes.txt echo "- [QuantLib-${VERSION_NUMBER}.tar.gz](https://github.com/lballabio/QuantLib/releases/download/v${VERSION_NUMBER}/QuantLib-${VERSION_NUMBER}.tar.gz)" >> tarballs/notes.txt echo "- [QuantLib-${VERSION_NUMBER}.zip](https://github.com/lballabio/QuantLib/releases/download/v${VERSION_NUMBER}/QuantLib-${VERSION_NUMBER}.zip)" >> tarballs/notes.txt echo "" >> tarballs/notes.txt awk '/Full list of pull requests/{ exit } { print }' News.md >> tarballs/notes.txt - name: Create draft release env: GH_TOKEN: ${{ github.token }} run: | gh release create ${{ github.ref_name }} \ --title "${VERSION_NUMBER}" \ --draft \ --notes-file tarballs/notes.txt \ --generate-notes \ tarballs/*.tar.gz tarballs/*.zip reference-manual: runs-on: macos-latest steps: - uses: actions/checkout@v6 - name: Setup env: HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1 run: | brew install automake autoconf libtool boost doxygen graphviz - name: Doxygen version run: | doxygen --version - name: Generate docs run: | ./autogen.sh ./configure --with-boost-include=$(brew --prefix)/include make docs - uses: actions/checkout@v6 with: repository: quantlib/quantlib.github.io path: site - name: Update docs working-directory: site run: | rm -rf reference mv ../Docs/html reference git add reference cp ../LICENSE.TXT _includes/LICENSE.TXT - uses: peter-evans/create-pull-request@v8 with: path: site token: ${{ secrets.MACHINE_ACCOUNT_PAT }} push-to-fork: ${{ vars.MACHINE_ACCOUNT }}/quantlib.github.io branch: reference-docs-${{ github.ref_name }} delete-branch: true commit-message: 'Update reference docs for ${{ github.ref_name }}' title: 'Update reference docs for ${{ github.ref_name }}' author: lballabio[bot] <224797326+lballabio-bot@users.noreply.github.com> body: | This is an automated PR generated by the [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action. QuantLib-1.41/.github/workflows/sanitizer.yml000066400000000000000000000026461513115055600213200ustar00rootroot00000000000000name: Linux build with address sanitizer enabled on: schedule: - cron: '0 0 * * 0' workflow_dispatch: jobs: sanitize-address-undefined: runs-on: ubuntu-latest container: ghcr.io/lballabio/quantlib-devenv:rolling steps: - uses: actions/checkout@v6 - name: Compiler version run: | gcc --version - name: Build run: | ./autogen.sh ./configure --disable-static CC="gcc" CXX="g++" CXXFLAGS="-O2 -g0 -fsanitize=address,undefined -fno-sanitize-recover=all -fno-omit-frame-pointer -Wall -Wno-unknown-pragmas -Werror" make -j 4 - name: Run tests run: | LSAN_OPTIONS=suppressions=.lsan.txt ./test-suite/quantlib-test-suite --log_level=message - name: Run examples run: | make check-examples sanitize-thread: runs-on: ubuntu-latest container: ghcr.io/lballabio/quantlib-devenv:rolling steps: - uses: actions/checkout@v6 - name: Compiler version run: | gcc --version - name: Build run: | ./autogen.sh ./configure --disable-static --enable-sessions --enable-thread-safe-observer-pattern CC="gcc" CXX="g++" CXXFLAGS="-O2 -g0 -fsanitize=thread -fno-sanitize-recover=all -Wall -Wno-unknown-pragmas -Werror" make -j 4 - name: Run tests run: | ./test-suite/quantlib-test-suite --log_level=message - name: Run examples run: | make check-examples QuantLib-1.41/.github/workflows/stale.yml000066400000000000000000000022241513115055600204100ustar00rootroot00000000000000name: Close stale issues and PR on: schedule: - cron: '30 1 * * *' jobs: staleness-check: runs-on: ubuntu-latest steps: - uses: actions/stale@v10 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-1.41/.github/workflows/sync-qldefines.yml000066400000000000000000000017351513115055600222320ustar00rootroot00000000000000name: Keep qldefines.hpp.cfg in sync with original header on: push: branches-ignore: - 'dependabot/**' jobs: sync-files: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - name: Check run: | cp ql/qldefines.hpp ql/qldefines.hpp.cfg sed -i -e 's|^#if defined(HAVE_CONFIG_H).*$|#if defined(QL_HAVE_CONFIG_H) // Dynamically created by cmake|g' ql/qldefines.hpp.cfg sed -i -e 's|^/\* install-hook \*/.*$|#cmakedefine QL_HAVE_CONFIG_H|g' ql/qldefines.hpp.cfg - uses: peter-evans/create-pull-request@v8 with: token: ${{ secrets.MACHINE_ACCOUNT_PAT }} push-to-fork: ${{ vars.MACHINE_ACCOUNT }}/QuantLib branch: sync-qldefine-${{ github.ref_name }} delete-branch: true commit-message: 'Sync qldefines.hpp.cfg with original header' title: 'Sync qldefines.hpp.cfg with original header' author: lballabio[bot] <224797326+lballabio-bot@users.noreply.github.com> QuantLib-1.41/.github/workflows/test-times.yml000066400000000000000000000026011513115055600213750ustar00rootroot00000000000000name: Check test times on: push: branches: - '**' pull_request: jobs: check-test-times: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - name: Cache uses: hendrikmuhs/ccache-action@v1.2 with: key: linux-ci-test-times-${{ github.ref }} restore-keys: | linux-ci-test-times-${{ github.ref }} linux-ci-test-times-refs/heads/master linux-ci-test-times- - name: Setup run: | sudo rm /etc/apt/sources.list.d/microsoft-prod.list sudo apt update sudo apt install -y libboost-dev autoconf automake libtool ccache - name: Build run: | ./autogen.sh ./configure --disable-static CC="ccache gcc" CXX="ccache g++" CXXFLAGS="-O2 -g0" make -j 4 - name: Run faster tests run: | ./test-suite/quantlib-test-suite --logger=JUNIT,warning,faster.xml:HRF,message -- --faster - name: Run fast tests run: | ./test-suite/quantlib-test-suite --logger=JUNIT,warning,fast.xml:HRF,message -- --fast - name: Run all tests run: | ./test-suite/quantlib-test-suite --logger=JUNIT,warning,all.xml:HRF,message - name: Save test times uses: actions/upload-artifact@v6 with: name: test-reports path: ./*.xml - name: Check test times run: | python ./tools/check_test_times.py QuantLib-1.41/.github/workflows/tidy.yml000066400000000000000000000021461513115055600202540ustar00rootroot00000000000000name: Apply clang-tidy fixes on: schedule: - cron: '0 0 * * 0' workflow_dispatch: jobs: check: runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v6 - name: Setup run: | sudo apt-get update sudo apt-get install -y clang-tidy-19 libboost-dev - name: Check run: | cmake --preset linux-ci-build-with-clang-tidy cd build/linux-ci-build-with-clang-tidy cmake --build . -j1 - uses: peter-evans/create-pull-request@v8 if: ${{ always() }} with: token: ${{ secrets.MACHINE_ACCOUNT_PAT }} push-to-fork: ${{ vars.MACHINE_ACCOUNT }}/QuantLib branch: clang-tidy-fixes-${{ github.ref_name }} delete-branch: true commit-message: 'Automated fixes by clang-tidy' title: 'Automated fixes by clang-tidy' author: lballabio[bot] <224797326+lballabio-bot@users.noreply.github.com> body: | This is an automated PR generated by the [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action. Please review the changes before merging. QuantLib-1.41/.gitignore000066400000000000000000000036611513115055600151560ustar00rootroot00000000000000# Compilation artifacts configure quantlib-config libtool aclocal.m4 autom4te.cache config.log config.status config/* !config/Makefile.am m4/*.m4 ql/config.hpp ql/config.hpp.in ql/stamp-h1 elc-stamp quantlib.elc quantlib.pc QuantLib.spec CMakeCache.txt CMakeUserPresets.json Docs/.time-stamp Docs/.time-stamp-html Docs/.time-stamp-online Docs/.time-stamp-man Docs/LICENSE.TXT Docs/reference-*/ Docs/html/ Docs/man/ Examples/*/bin/ Examples/*/build/ Examples/*/*.trs build/ install/ lib/ test-suite/bin/QuantLib-test-suite-*.manifest test-suite/build/ test-suite/*.trs # Build outputs **/x64/Debug **/x64/Release **/Debug **/Release **/bin/*.xml **/bin/*.manifest # Artifacts created in multiple directories Makefile Makefile.in unity.cpp unity_*.cpp testCaseCollection.xml .deps .libs *.la *.lo *.o *.so .build-stamp *.exe *.dll *.exp *.lib *.pdb *.ilk *~ *.ncb *.suo *.vcproj.*.user *.vcxproj.user *.VC.db *.VC.opendb *.log *.sdf *.opensdf *.pch *.idb *.ipch CMakeFiles *.cmake !cmake/*.cmake TAGS .dirstamp # Outputs Examples/BasketLosses/BasketLosses Examples/BermudanSwaption/BermudanSwaption Examples/Bonds/Bonds Examples/CallableBonds/CallableBonds Examples/CDS/CDS Examples/ConvertibleBonds/ConvertibleBonds Examples/CVAIRS/CVAIRS Examples/DiscreteHedging/DiscreteHedging Examples/EquityOption/EquityOption Examples/FittedBondCurve/FittedBondCurve Examples/FRA/FRA Examples/Gaussian1dModels/Gaussian1dModels Examples/GlobalOptimizer/GlobalOptimizer Examples/LatentModel/LatentModel Examples/MarketModels/MarketModels Examples/MultidimIntegral/MultidimIntegral Examples/MulticurveBootstrapping/MulticurveBootstrapping Examples/Replication/Replication Examples/Repo/Repo test-suite/quantlib-test-suite test-suite/quantlib-benchmark test-suite/bin/*.exp test-suite/bin/*.lib test-suite/bin/*.pdb test-suite/.unit_test_profile.txt # IDEs .vs .vscode .idea cmake-build-* nbproject .cproject # User customizations .dir-locals.el Build.props Directory.Build.props QuantLib-1.41/.lgtm.yml000066400000000000000000000002461513115055600147260ustar00rootroot00000000000000 path_classifiers: docs: - Docs - Examples test: - test-suite library: - tools queries: - exclude: cpp/fixme-comment QuantLib-1.41/.lsan.txt000066400000000000000000000000011513115055600147230ustar00rootroot00000000000000 QuantLib-1.41/.misspell-fixer.ignore000066400000000000000000000000221513115055600174000ustar00rootroot00000000000000^./ChangeLog.txt QuantLib-1.41/.msvc-analysis.ruleset000066400000000000000000000010041513115055600174270ustar00rootroot00000000000000 QuantLib-1.41/CITATION.cff000066400000000000000000000005551513115055600150570ustar00rootroot00000000000000cff-version: 1.2.0 message: If you use this software, please cite it using these metadata. title: "QuantLib: a free/open-source library for quantitative finance" authors: - name: "The QuantLib contributors" url: "https://www.quantlib.org/" type: software doi: 10.5281/zenodo.1440997 license: BSD-3-Clause repository-code: "https://github.com/lballabio/QuantLib" QuantLib-1.41/CMakeLists.txt000066400000000000000000000252621513115055600157270ustar00rootroot00000000000000cmake_minimum_required(VERSION 3.15.0) # For MSVC RUNTIME LIBRARY, need CMP0091=NEW and cmake 3.15+ cmake_policy(SET CMP0091 NEW) # Version info set(QUANTLIB_VERSION_MAJOR 1) set(QUANTLIB_VERSION_MINOR 41) set(QUANTLIB_VERSION_PATCH 0) set(QUANTLIB_VERSION ${QUANTLIB_VERSION_MAJOR}.${QUANTLIB_VERSION_MINOR}.${QUANTLIB_VERSION_PATCH}) # Project Info set(PACKAGE_NAME "QuantLib") set(PACKAGE_VERSION "1.41") set(PACKAGE_VERSION_HEX "0x014100f0") set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}") set(PACKAGE_TARNAME "${PACKAGE_NAME}-${PACKAGE_VERSION}") set(PACKAGE_BUGREPORT "https://github.com/lballabio/QuantLib/issues/") # Default build type for single-config generators (set this before project() command) # For multi-config generators, such as Visual Studio, use: cmake --build . --config= if (NOT CMAKE_BUILD_TYPE OR CMAKE_BUILD_TYPE STREQUAL "") set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Build type for single-config generators" FORCE) endif() project(${PACKAGE_NAME} LANGUAGES CXX DESCRIPTION "The QuantLib C++ Library") # Path for package-local cmake modules set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH}) # Installation directories set(QL_INSTALL_BINDIR "bin" CACHE STRING "Installation directory for executables") set(QL_INSTALL_LIBDIR "lib" CACHE STRING "Installation directory for libraries") set(QL_INSTALL_INCLUDEDIR "include" CACHE STRING "Installation directory for headers") set(QL_INSTALL_EXAMPLESDIR "lib/QuantLib/examples" CACHE STRING "Installation directory for examples") set(QL_INSTALL_CMAKEDIR "lib/cmake/${PACKAGE_NAME}" CACHE STRING "Installation directory for CMake scripts") # Options option(QL_BUILD_EXAMPLES "Build examples" ON) option(QL_BUILD_TEST_SUITE "Build test suite" ON) option(QL_BUILD_FUZZ_TEST_SUITE "Build fuzz test suite" OFF) option(QL_ENABLE_OPENMP "Detect and use OpenMP" OFF) option(QL_ENABLE_PARALLEL_UNIT_TEST_RUNNER "Enable the parallel unit test runner" OFF) option(QL_ENABLE_SESSIONS "Singletons return different instances for different sessions" OFF) option(QL_ENABLE_THREAD_SAFE_OBSERVER_PATTERN "Enable the thread-safe observer pattern" OFF) option(QL_ENABLE_TRACING "Tracing messages should be allowed" OFF) option(QL_ENABLE_DEFAULT_WARNING_LEVEL "Enable the default warning level to pass the ci pipeline" ON) option(QL_COMPILE_WARNING_AS_ERROR "Specify whether to treat warnings on compile as errors." OFF) option(QL_ERROR_FUNCTIONS "Error messages should include current function information" OFF) option(QL_ERROR_LINES "Error messages should include file and line information" OFF) option(QL_EXTRA_SAFETY_CHECKS "Extra safety checks should be performed" OFF) option(QL_HIGH_RESOLUTION_DATE "Enable date resolution down to microseconds" OFF) option(QL_THROW_IN_CYCLES "Throw an exception when a notification loop is detected" OFF) option(QL_FASTER_LAZY_OBJECTS "Cause lazy objects to forward just the first notification instead of every one" ON) option(QL_NULL_AS_FUNCTIONS "Enable the implementation of Null as template functions" OFF) option(QL_INSTALL_BENCHMARK "Install benchmark" ON) option(QL_INSTALL_EXAMPLES "Install examples" ON) option(QL_INSTALL_TEST_SUITE "Install test suite" ON) option(QL_TAGGED_LAYOUT "Library names use layout tags" ${MSVC}) option(QL_USE_CLANG_TIDY "Use clang-tidy when building" OFF) option(QL_USE_INDEXED_COUPON "Use indexed coupons instead of par coupons" OFF) option(QL_USE_STD_ANY "Use std::any instead of boost::any" ON) option(QL_USE_STD_CLASSES "Enable all QL_USE_STD_ options" OFF) option(QL_USE_STD_OPTIONAL "Use std::optional instead of boost::optional" ON) option(QL_USE_STD_SHARED_PTR "Use standard smart pointers instead of Boost ones" OFF) set(QL_EXTERNAL_SUBDIRECTORIES "" CACHE STRING "Optional list of external source directories to be added to the build (semicolon-separated)") # set -lpapi here set(QL_EXTRA_LINK_LIBRARIES "" CACHE STRING "Optional extra link libraries to add to QuantLib") # Require C++17 or higher if (NOT DEFINED CMAKE_CXX_STANDARD) set(CMAKE_CXX_STANDARD 17) elseif(CMAKE_CXX_STANDARD LESS 17) message(FATAL_ERROR "Please specify CMAKE_CXX_STANDARD of 17 or higher") endif() if (NOT DEFINED CMAKE_CXX_STANDARD_REQUIRED) set(CMAKE_CXX_STANDARD_REQUIRED ON) endif() # Avoid use of compiler language extensions, i.e. -std=c++17 not -std=gnu++17 if (NOT DEFINED CMAKE_CXX_EXTENSIONS) set(CMAKE_CXX_EXTENSIONS FALSE) endif() # Convenience option to activate all STD options if (QL_USE_STD_CLASSES) set(QL_USE_STD_ANY ON) set(QL_USE_STD_OPTIONAL ON) set(QL_USE_STD_SHARED_PTR ON) endif() # Set the default warning level we use to pass the GitHub workflows if (QL_ENABLE_DEFAULT_WARNING_LEVEL) if (MSVC) # warning level 3 # There are also specific warnings disabled for MSCV in cmake/Platform.cmake. add_compile_options(-W3) elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") # lots of warnings add_compile_options(-Wall -Wno-unknown-pragmas -Wno-array-bounds) endif() endif() # Treat warnings on compile as errors if (QL_COMPILE_WARNING_AS_ERROR) # all compiler warnings as errors if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.24.0") # since v3.24 cmake can set all compiler warnings as errors itself set(CMAKE_COMPILE_WARNING_AS_ERROR ON) else() # or set them manually if (MSVC) add_compile_options(-WX) elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") add_compile_options(-Werror) endif() endif() endif() if (QL_USE_CLANG_TIDY) if (NOT DEFINED QL_CLANG_TIDY) set(QL_CLANG_TIDY clang-tidy) endif() if (NOT DEFINED QL_CLANG_TIDY_OPTIONS) set(QL_CLANG_TIDY_OPTIONS) endif() if (QL_CLANG_TIDY_OPTIONS) set(CMAKE_CXX_CLANG_TIDY "${QL_CLANG_TIDY};${QL_CLANG_TIDY_OPTIONS}") else() set(CMAKE_CXX_CLANG_TIDY "${QL_CLANG_TIDY}") endif() endif() # Project shared libs ON for UNIX if (NOT DEFINED BUILD_SHARED_LIBS) set(BUILD_SHARED_LIBS ${UNIX}) endif() # Boost static libs ON for MSVC if (NOT DEFINED Boost_USE_STATIC_LIBS) set(Boost_USE_STATIC_LIBS ${MSVC}) endif() # Boost static runtime ON for MSVC if (NOT DEFINED Boost_USE_STATIC_RUNTIME) set(Boost_USE_STATIC_RUNTIME ${MSVC}) endif() if (NOT DEFINED QL_BOOST_VERSION) # Boost 1.75.0 or greater required for compiling with C++20 if (CMAKE_CXX_STANDARD GREATER_EQUAL 20) set(QL_BOOST_VERSION 1.75.0) else() set(QL_BOOST_VERSION 1.58.0) endif() endif() if (CMAKE_CXX_COMPILER STREQUAL "icpx") find_package(IntelDPCPP REQUIRED) endif() find_package(Boost ${QL_BOOST_VERSION} REQUIRED) # Do not warn about Boost versions higher than 1.58.0 set(Boost_NO_WARN_NEW_VERSIONS ON) # Avoid using Boost auto-linking add_compile_definitions(BOOST_ALL_NO_LIB) if (QL_ENABLE_OPENMP) find_package(OpenMP REQUIRED) endif() # Prefer pthread flag as per https://cmake.org/cmake/help/latest/module/FindThreads.html if (NOT DEFINED THREADS_PREFER_PTHREAD_FLAG) set(THREADS_PREFER_PTHREAD_FLAG ON) endif() # Add Threads dependency when any of the threading features are enabled if (QL_ENABLE_PARALLEL_UNIT_TEST_RUNNER OR QL_ENABLE_SESSIONS OR QL_ENABLE_THREAD_SAFE_OBSERVER_PATTERN) find_package(Threads REQUIRED) # Parallel test runner needs library rt on *nix for shm_open, etc. if (QL_ENABLE_PARALLEL_UNIT_TEST_RUNNER AND UNIX AND NOT APPLE) find_library(RT_LIBRARY rt REQUIRED) set(QL_THREAD_LIBRARIES Threads::Threads ${RT_LIBRARY}) else() set(QL_THREAD_LIBRARIES Threads::Threads) endif() endif() # If available, use PIC for shared libs and PIE for executables if (NOT DEFINED CMAKE_POSITION_INDEPENDENT_CODE) set(CMAKE_POSITION_INDEPENDENT_CODE ON) endif() if (CMAKE_POSITION_INDEPENDENT_CODE) # cmake policy CMP0083: add PIE support if possible (need cmake 3.14) include(CheckPIESupported) check_pie_supported() endif() # Configure files set(QL_HAVE_CONFIG_H ON) set(QL_VERSION ${PACKAGE_VERSION}) set(QL_HEX_VERSION ${PACKAGE_VERSION_HEX}) configure_file(ql/config.hpp.cfg ql/config.hpp @ONLY) configure_file(ql/qldefines.hpp.cfg ql/qldefines.hpp @ONLY) # Generate quantlib-config # Define the variables to be substituted in the input file set(prefix ${CMAKE_INSTALL_PREFIX}) set(exec_prefix "\${prefix}") set(includedir "\${prefix}/include") set(libdir "\${exec_prefix}/lib") if (QL_ENABLE_OPENMP) set(OPENMP_CXXFLAGS ${OpenMP_CXX_FLAGS}) endif() configure_file(quantlib-config.in quantlib-config @ONLY) configure_file(quantlib.pc.in quantlib.pc @ONLY) install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/quantlib-config TYPE BIN) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/quantlib.pc DESTINATION lib/pkgconfig) include(Platform) # Check for library name layout tagging if (QL_TAGGED_LAYOUT) if (${CMAKE_SIZEOF_VOID_P} EQUAL 8) set(DEBUG_POSTFIX "-x64") set(RELEASE_POSTFIX "-x64") endif() set(DEBUG_POSTFIX ${DEBUG_POSTFIX}-mt) set(RELEASE_POSTFIX ${RELEASE_POSTFIX}-mt) if (CMAKE_MSVC_RUNTIME_LIBRARY MATCHES ".*DLL$") set(DEBUG_POSTFIX ${DEBUG_POSTFIX}-gd) else() set(DEBUG_POSTFIX ${DEBUG_POSTFIX}-sgd) set(RELEASE_POSTFIX ${RELEASE_POSTFIX}-s) endif() set(CMAKE_DEBUG_POSTFIX ${DEBUG_POSTFIX}) set(CMAKE_RELEASE_POSTFIX ${RELEASE_POSTFIX}) set(CMAKE_RELWITHDEBINFO_POSTFIX ${RELEASE_POSTFIX}) set(CMAKE_MINSIZEREL_POSTFIX ${RELEASE_POSTFIX}) endif() include(CTest) # extension subdirectories if they exist (hook for external projects) foreach(extdir ${QL_EXTERNAL_SUBDIRECTORIES}) get_filename_component(name_without_dir "${extdir}" NAME) add_subdirectory(${extdir} ${name_without_dir}) endforeach() # Add subdirectories add_subdirectory(ql) if (QL_BUILD_EXAMPLES) add_subdirectory(Examples) endif() if (QL_BUILD_TEST_SUITE) add_subdirectory(test-suite) endif() if ('${CMAKE_CXX_COMPILER_ID}' MATCHES 'Clang' AND QL_BUILD_FUZZ_TEST_SUITE) add_subdirectory(fuzz-test-suite) endif() # CPack support (make package, make package_source) set(CPACK_PACKAGE_VERSION_MAJOR ${QUANTLIB_VERSION_MAJOR}) set(CPACK_PACKAGE_VERSION_MINOR ${QUANTLIB_VERSION_MINOR}) set(CPACK_PACKAGE_VERSION_PATCH ${QUANTLIB_VERSION_PATCH}) set(CPACK_PACKAGE_FILE_NAME ${PACKAGE_NAME}-${PACKAGE_VERSION}) set(CPACK_GENERATOR "TGZ" "ZIP" "7Z") set(CPACK_SOURCE_PACKAGE_FILE_NAME ${PACKAGE_NAME}-${PACKAGE_VERSION}) set(CPACK_SOURCE_GENERATOR "TGZ" "ZIP" "7Z") set(CPACK_SOURCE_IGNORE_FILES "~$" "\\\\.swp$" "/[Bb]uild" "/\\\\.app" "/\\\\.cla" "/\\\\.cod" "/\\\\.git" "/\\\\.lgt" "/\\\\.mis") include(CPack) QuantLib-1.41/CMakePresets.json000066400000000000000000000176001513115055600164050ustar00rootroot00000000000000{ "version": 3, "configurePresets": [ { "name": "windows-base", "hidden": true, "binaryDir": "${sourceDir}/build/${presetName}", "architecture": { "value": "x64", "strategy": "external" }, "condition": { "type": "equals", "lhs": "${hostSystemName}", "rhs": "Windows" } }, { "name": "windows-msvc-base", "hidden": true, "inherits": "windows-base", "cacheVariables": { "CMAKE_CXX_COMPILER": "cl.exe" }, "vendor": { "microsoft.com/VisualStudioSettings/CMake/1.0": { "intelliSenseMode": "windows-msvc-x64" } } }, { "name": "windows-clang-base", "hidden": true, "inherits": "windows-base", "cacheVariables": { "CMAKE_CXX_COMPILER": "clang-cl.exe" }, "vendor": { "microsoft.com/VisualStudioSettings/CMake/1.0": { "intelliSenseMode": "windows-clang-x64" } } }, { "name": "linux-base", "hidden": true, "binaryDir": "${sourceDir}/build/${presetName}", "condition": { "type": "equals", "lhs": "${hostSystemName}", "rhs": "Linux" }, "vendor": { "microsoft.com/VisualStudioRemoteSettings/CMake/1.0": { "sourceDir": "$env{HOME}/.vs/$ms{projectDirName}" }, "microsoft.com/VisualStudioSettings/CMake/1.0": { "intelliSenseMode": "linux-gcc-x64", "hostOS": [ "Linux" ] } } }, { "name": "linux-gcc-base", "hidden": true, "inherits": "linux-base", "cacheVariables": { "CMAKE_CXX_COMPILER": "g++" } }, { "name": "linux-clang-base", "hidden": true, "inherits": "linux-base", "cacheVariables": { "CMAKE_CXX_COMPILER": "clang++" } }, { "name": "apple-arm64-base", "hidden": true, "binaryDir": "${sourceDir}/build/${presetName}", "architecture": { "value": "arm64", "strategy": "external" }, "condition": { "type": "equals", "lhs": "${hostSystemName}", "rhs": "Darwin" } }, { "name": "ninja", "hidden": true, "generator": "Ninja" }, { "name": "make", "hidden": true, "generator": "Unix Makefiles" }, { "name": "_release", "hidden": true, "cacheVariables": { "CMAKE_BUILD_TYPE": "Release" } }, { "name": "_debug", "hidden": true, "cacheVariables": { "CMAKE_BUILD_TYPE": "Debug" } }, { "name": "_relwithdebinfo", "hidden": true, "cacheVariables": { "CMAKE_BUILD_TYPE": "RelWithDebInfo" } }, { "name": "linux-clang-debug", "inherits": [ "linux-clang-base", "make", "_debug" ] }, { "name": "linux-clang-release", "inherits": [ "linux-clang-base", "make", "_release" ] }, { "name": "linux-clang-relwithdebinfo", "inherits": [ "linux-clang-base", "make", "_relwithdebinfo" ] }, { "name": "linux-gcc-debug", "inherits": [ "linux-gcc-base", "make", "_debug" ] }, { "name": "linux-gcc-release", "inherits": [ "linux-gcc-base", "make", "_release" ] }, { "name": "linux-gcc-relwithdebinfo", "inherits": [ "linux-gcc-base", "make", "_relwithdebinfo" ] }, { "name": "linux-clang-ninja-debug", "inherits": [ "ninja", "linux-clang-debug" ] }, { "name": "linux-clang-ninja-release", "inherits": [ "ninja", "linux-clang-release" ] }, { "name": "linux-clang-ninja-relwithdebinfo", "inherits": [ "ninja", "linux-clang-relwithdebinfo" ] }, { "name": "linux-gcc-ninja-debug", "inherits": [ "ninja", "linux-gcc-debug" ] }, { "name": "linux-gcc-ninja-release", "inherits": [ "ninja", "linux-gcc-release" ] }, { "name": "linux-gcc-ninja-relwithdebinfo", "inherits": [ "ninja", "linux-gcc-relwithdebinfo" ] }, { "name": "linux-gcc-debug-with-clang-tidy", "inherits": [ "linux-gcc-debug" ], "cacheVariables": { "QL_CLANG_TIDY_OPTIONS": "-warnings-as-errors=*", "QL_USE_CLANG_TIDY": "ON" } }, { "name": "windows-clang-release", "inherits": [ "windows-clang-base", "ninja", "_release" ] }, { "name": "windows-clang-debug", "inherits": [ "windows-clang-base", "ninja", "_debug" ] }, { "name": "windows-clang-relwithdebinfo", "inherits": [ "windows-clang-base", "ninja", "_relwithdebinfo" ] }, { "name": "windows-msvc-release", "inherits": [ "windows-msvc-base", "ninja", "_release" ] }, { "name": "windows-msvc-debug", "inherits": [ "windows-msvc-base", "ninja", "_debug" ] }, { "name": "windows-msvc-relwithdebinfo", "inherits": [ "windows-msvc-base", "ninja", "_relwithdebinfo" ] }, { "name": "linux-ci-build-with-clang-tidy", "inherits": [ "linux-gcc-debug" ], "cacheVariables": { "BOOST_ROOT": "/usr", "CMAKE_UNITY_BUILD": "ON", "QL_CLANG_TIDY": "clang-tidy-19", "QL_CLANG_TIDY_OPTIONS": "-quiet;-fix", "QL_USE_CLANG_TIDY": "ON", "QL_USE_STD_CLASSES": "ON" } }, { "name": "linux-ci-build-with-nonstandard-options", "inherits": [ "linux-gcc-ninja-release" ], "cacheVariables": { "BOOST_ROOT": "/usr", "BUILD_SHARED_LIBS": false, "CMAKE_CXX_COMPILER_LAUNCHER": "ccache", "QL_ENABLE_SESSIONS": "ON", "QL_ENABLE_THREAD_SAFE_OBSERVER_PATTERN": "ON", "QL_HIGH_RESOLUTION_DATE": "ON", "QL_FASTER_LAZY_OBJECTS": "OFF", "QL_THROW_IN_CYCLES": "ON", "QL_NULL_AS_FUNCTIONS": "ON", "QL_USE_INDEXED_COUPON": "ON", "QL_USE_STD_SHARED_PTR": "ON", "QL_USE_STD_ANY": "OFF", "QL_USE_STD_OPTIONAL": "OFF", "QL_COMPILE_WARNING_AS_ERROR": "ON" } }, { "name": "windows-ci-build-with-nonstandard-options", "inherits": [ "windows-msvc-release" ], "cacheVariables": { "CMAKE_UNITY_BUILD": "ON", "QL_ENABLE_SESSIONS": "ON", "QL_ENABLE_THREAD_SAFE_OBSERVER_PATTERN": "ON", "QL_HIGH_RESOLUTION_DATE": "ON", "QL_FASTER_LAZY_OBJECTS": "OFF", "QL_THROW_IN_CYCLES": "ON", "QL_NULL_AS_FUNCTIONS": "ON", "QL_USE_INDEXED_COUPON": "ON", "QL_USE_STD_SHARED_PTR": "ON", "QL_USE_STD_ANY": "OFF", "QL_USE_STD_OPTIONAL": "OFF", "QL_COMPILE_WARNING_AS_ERROR": "ON", "CMAKE_CXX_COMPILER_LAUNCHER": "sccache" } }, { "name": "apple-arm64-ninja-debug", "description": "Apple M series preset Debug", "inherits": [ "apple-arm64-base", "ninja", "_debug" ] }, { "name": "apple-arm64-ninja-release", "description": "Apple M series preset Release", "inherits": [ "apple-arm64-base", "ninja", "_release" ] }, { "name": "apple-arm64-ninja-relwithdebinfo", "description": "Apple M series preset RelWithDebInfo", "inherits": [ "apple-arm64-base", "ninja", "_relwithdebinfo" ] } ] } QuantLib-1.41/CONTRIBUTING.md000066400000000000000000000036311513115055600154140ustar00rootroot00000000000000 # Contributing to QuantLib Thanks for considering a contribution! We're looking forward to it. The preferred way to contribute is through a pull request on GitHub. This gives us some convenient tooling to look at your changes and provide feedback; also, opening a pull request triggers automated building and testing of your code and often gives you feedback before a human has a chance to look at it (the time we can give to the project is, unfortunately, limited). So, in short: get a GitHub account if you don't have it already and clone the repository at with the "Fork" button in the top right corner of the page. Check out your clone to your machine, code away, push your changes to your clone and submit a pull request: links to more detailed instructions are at the end of this file. A note: a pull request will show any new changes committed and pushed to the corresponding branch. For this reason, we strongly advise you to use a feature branch for your changes, instead of your `master` branch. This gives you the freedom to add unrelated changes to your master, and also gives the maintainers the freedom to push further changes to the branch. It's likely that we won't merge your code right away, and we'll ask for some changes instead. Don't be discouraged! That's normal; the library is complex, and thus it might take some time to become familiar with it and to use it in an idiomatic way. Again, thanks — and welcome! We're looking forward to your contributions. #### Useful links Instructions for forking a cloning a repository are at . More detailed instructions for creating pull requests are at . Finally, a basic guide to GitHub is at . GitHub also provides interactive learning at . QuantLib-1.41/ChangeLog.txt000066400000000000000000002716121513115055600155610ustar00rootroot00000000000000commit dbea7afad72f59706fa08a4cbfa5880684d9b8d9 Author: lballabio[bot] <224797326+lballabio-bot@users.noreply.github.com> Date: Mon, 12 Jan 2026 09:21:31 +0000 Set version to 1.41 CMakeLists.txt | 4 ++-- configure.ac | 2 +- ql/version.hpp | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) commit c90498ad13cbc660c3e80c8c65598ad2c897fef0 Author: lballabio[bot] <224797326+lballabio-bot@users.noreply.github.com> Date: Mon, 5 Jan 2026 19:24:10 +0000 Update changelog ChangeLog.txt | 11008 ++++++++++---------------------------------------------- 1 file changed, 1946 insertions(+), 9062 deletions(-) commit 5225d64206cd4f2555b5cf3a03b20ca55405d934 Author: lballabio[bot] <224797326+lballabio-bot@users.noreply.github.com> Date: Mon, 5 Jan 2026 19:24:10 +0000 Set version to 1.41-rc CMakeLists.txt | 4 ++-- configure.ac | 2 +- ql/version.hpp | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) commit d6d38347e51cd8f2a617b1591f87e550af29ff86 Merge: 7590f1b57 4ecf2c764 Author: Luigi Ballabio Date: Mon, 5 Jan 2026 18:11:23 +0100 typo in multi-curve error message (#2419) commit 4ecf2c764c21bfe4ed46d2da5727a6880641975f Author: Peter Caspers Date: Mon, 5 Jan 2026 17:04:10 +0100 typo ql/termstructures/multicurve.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7590f1b57853e52770da7ba6da26f01ba1226ffb Author: Luigi Ballabio Date: Mon, 5 Jan 2026 09:26:49 +0100 Add clang 21 to CI builds .github/workflows/devenv-images.yml | 2 +- .github/workflows/linux-full-tests.yml | 7 ++++++- .github/workflows/linux-nondefault.yml | 7 ++++++- .github/workflows/linux.yml | 6 +++--- 4 files changed, 16 insertions(+), 6 deletions(-) commit e41f1b6b3402c4cd44f22b7b5050f80e56c7cabc Author: Luigi Ballabio Date: Mon, 5 Jan 2026 12:37:24 +0100 Update news for 1.41 and list of contributors Contributors.txt | 3 +++ News.md | 47 +++++++++++++++++++++++------------------------ 2 files changed, 26 insertions(+), 24 deletions(-) commit defbf778b37146394da752513ad6b54070ed112d Author: lballabio[bot] <224797326+lballabio-bot@users.noreply.github.com> Date: Sat, 3 Jan 2026 13:57:18 +0000 Automated fixes by clang-tidy ql/cashflows/overnightindexedcoupon.cpp | 4 ++-- ql/cashflows/overnightindexedcoupon.hpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit bc7db315bb7ed1c5669cb8069898c1804bc4c9ea Author: Luigi Ballabio Date: Sat, 3 Jan 2026 15:53:10 +0100 Revert #2410 ql/processes/gsrprocesscore.hpp | 2 +- test-suite/gsr.cpp | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) commit b43bcbfe75a4dc8518c91ab508e76a15162bbc37 Merge: 17a5a84fa be2041853 Author: Luigi Ballabio Date: Tue, 30 Dec 2025 14:59:48 +0100 Some deferred observers get destroyed during updates II (#2412) commit be2041853087c071bdff5151a320eddc1a7c18a4 Author: francis Date: Tue, 30 Dec 2025 12:55:23 +0000 Avoid dereferencing null deferred observer. Alternative approach for PR 2409. ql/patterns/observable.cpp | 6 ++---- ql/patterns/observable.hpp | 19 +++++++++++-------- 2 files changed, 13 insertions(+), 12 deletions(-) commit 17a5a84fa618bbfb04beefcf0f5c3531fc756b58 Author: Luigi Ballabio Date: Mon, 29 Dec 2025 23:37:47 +0100 Copy latest copyright list to website when tagging a release .github/workflows/publish-release.yml | 1 + 1 file changed, 1 insertion(+) commit 6ab7d21faa12632e466f5c209e11ba4f6abd59de Merge: 2bd9e3dfd 86683188e Author: Luigi Ballabio Date: Mon, 29 Dec 2025 11:18:21 +0100 Fix GsrProcessCore crash when constructed with temporary arrays (#2410) commit 2bd9e3dfd916e9fc7004e657e374f36fa279e713 Merge: 302e4d7d7 ad90c6f1b Author: Luigi Ballabio Date: Mon, 29 Dec 2025 10:50:04 +0100 Some deferred observers get destroyed during updates (#2409) commit 302e4d7d70ad1de6d2380e9c8e1838d8018f2d48 Author: lballabio[bot] <224797326+lballabio-bot@users.noreply.github.com> Date: Sun, 28 Dec 2025 01:31:22 +0000 Automated fixes by clang-tidy ql/cashflows/blackovernightindexedcouponpricer.cpp | 5 +++-- ql/cashflows/blackovernightindexedcouponpricer.hpp | 4 ++-- ql/cashflows/overnightindexedcoupon.cpp | 6 +++--- ql/cashflows/overnightindexedcoupon.hpp | 8 ++++---- ql/cashflows/overnightindexedcouponpricer.cpp | 9 +++++---- ql/cashflows/overnightindexedcouponpricer.hpp | 7 ++++--- ql/instruments/assetswap.cpp | 2 +- ql/instruments/equitytotalreturnswap.cpp | 2 +- 8 files changed, 23 insertions(+), 20 deletions(-) commit 86683188e66943a0a5d69754b853f2cce7f13e49 Author: Yashwant Bezawada Date: Sat, 27 Dec 2025 03:11:29 -0600 Fix GsrProcessCore crash when constructed with temporary arrays GsrProcessCore stored references to the input arrays instead of copies. When temporary arrays were passed (common in SWIG bindings where Python lists are converted to temporary Array objects), these references became dangling after the constructor returned, causing segfaults during path generation. The fix changes the member variables from references to values so the arrays are copied and remain valid for the lifetime of the object. Added a test case that creates a GsrProcess with temporary arrays and uses it in PathGenerator to verify path generation works correctly. Fixes #2408 ql/processes/gsrprocesscore.hpp | 2 +- test-suite/gsr.cpp | 53 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+), 1 deletion(-) commit ad90c6f1b7c6023c040cc1cd7f548b440a646e58 Author: francis Date: Wed, 24 Dec 2025 12:24:11 +0000 Avoid dereferencing null deferred observer. Add a bool runningDeferredUpdates_ that is set to true when deferredObservers_ are being processed in ObservableSettings::enableUpdates(). We keep a set invalidDeferredObservers_ that holds elements of deferredObservers_ that are destroyed while ObservableSettings::enableUpdates() is running. We can then skip calling update on them in ObservableSettings::enableUpdates(). ql/patterns/observable.cpp | 8 ++++++++ ql/patterns/observable.hpp | 13 +++++++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) commit c2b5cc811801593b5cc2cbbbb26d40b037d4202f Author: francis Date: Wed, 24 Dec 2025 10:50:45 +0000 Add test showing issue with deferred observer. The test gives a read access violation. The problem is that some elements in deferredObservers_ can be destroyed while ObservableSettings::enableUpdates() is running. Later in the call deferredObserver->update() is called on the already destructed element and it gives a read access violation. The example here uses the zero coupon inflation swap helper to demonstrate the issue. The zciis_ member is one of the deferred observers. When ObservableSettings::enableUpdates() is running ZeroCouponInflationSwapHelper::initializeDates() is called because the helper is notified and updateDates_ is true. zciis_ is re-assigned and the original pointee is destroyed. But the original pointee that has been destroyed is still in the deferredObservers_ set and update() gets called on it leading to the read access violation. test-suite/observable.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit ecefd253d0e2b648a8994f32f208af504ca36c94 Author: Luigi Ballabio Date: Wed, 24 Dec 2025 09:46:47 +0100 Uniform naming ql/cashflows/overnightindexedcoupon.cpp | 2 +- ql/cashflows/overnightindexedcoupon.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 1daa40d013ff700292f421ec9473f419893b1379 Author: Luigi Ballabio Date: Mon, 22 Dec 2025 09:53:40 +0100 Remove a few warnings and verbosity from new pricers ql/cashflows/blackovernightindexedcouponpricer.cpp | 4 ++-- ql/cashflows/overnightindexedcouponpricer.cpp | 8 ------- ql/cashflows/overnightindexedcouponpricer.hpp | 25 +++++++++++----------- 3 files changed, 14 insertions(+), 23 deletions(-) commit 9cbbbb2708019775a89f25871f429b78861f396e Author: lballabio[bot] <224797326+lballabio-bot@users.noreply.github.com> Date: Thu, 18 Dec 2025 11:52:46 +0000 Update old license links ql/cashflows/blackovernightindexedcouponpricer.cpp | 2 +- ql/cashflows/blackovernightindexedcouponpricer.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit c15a6fecbd6bbe9fe8d509d6a20945a3815ebd2e Merge: bf18303eb 5096ee8b9 Author: Luigi Ballabio Date: Thu, 18 Dec 2025 12:52:35 +0100 QL-ORE ON coupons alignment (#2297) commit 5096ee8b9216e733b62a658662775c2e70a90e27 Author: Luigi Ballabio Date: Thu, 18 Dec 2025 11:02:52 +0100 Another test test-suite/overnightindexedcoupon.cpp | 54 ++++++++++++++++++++++++++--------- 1 file changed, 41 insertions(+), 13 deletions(-) commit bf18303ebee20dab046c5b804b3188b0cf6d07f7 Author: Luigi Ballabio Date: Thu, 18 Dec 2025 10:18:18 +0100 Add job to publish reference docs when tagging a release .github/workflows/publish-release.yml | 41 +++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) commit e10dd4e8fe0576b4fa87bd965b899ab72be7505a Author: paolodelia99 Date: Wed, 17 Dec 2025 17:45:43 +0100 Fix test,and initialized method in BlackArithmeticONPricer ql/cashflows/blackovernightindexedcouponpricer.cpp | 2 +- test-suite/overnightindexedcoupon.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 7660c595758a980f2b8d08c9bbadce7c47f67908 Merge: 4f0732537 3c0a67935 Author: Luigi Ballabio Date: Wed, 17 Dec 2025 11:27:38 +0100 add instrument weights to global bootstrap (#2398) commit 9c719887b7426b377c92da996c6011674a73934f Author: Luigi Ballabio Date: Wed, 17 Dec 2025 11:09:13 +0100 Move check at construction time With the check in setCouponPricer, the call OvernightLeg(...) .withCouponPricer(arithmeticPricer) .withAveragingMethod(RateAveraging::Simple) would fail. ql/cashflows/overnightindexedcoupon.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit fcf392a5e504f983226c73cd8be5e37d939a2398 Author: Luigi Ballabio Date: Wed, 17 Dec 2025 11:05:49 +0100 Register properly with pricer ql/cashflows/overnightindexedcoupon.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b2e5ed12ab430c40b5cf0b9d4870fd16af5355db Author: Luigi Ballabio Date: Wed, 17 Dec 2025 11:03:03 +0100 Avoid worthless caps and floors in pricer tests ql/cashflows/blackovernightindexedcouponpricer.cpp | 7 +-- test-suite/overnightindexedcoupon.cpp | 73 +++++++++++++++------- 2 files changed, 53 insertions(+), 27 deletions(-) commit 6c3ccb316ec8c5f5655ed09fd3469393fe0d98e9 Author: Luigi Ballabio Date: Wed, 17 Dec 2025 10:28:49 +0100 No need to set two different pricers depending on caps/floors ql/cashflows/overnightindexedcoupon.cpp | 20 +++----------------- ql/cashflows/overnightindexedcoupon.hpp | 7 ++----- test-suite/overnightindexedcoupon.cpp | 4 ++-- 3 files changed, 7 insertions(+), 24 deletions(-) commit 3c0a67935723ced7dc08706b616a1ed3d9d02cae Author: Peter Caspers Date: Wed, 17 Dec 2025 09:53:52 +0100 fix maxDate and revert enabling extrapolation ql/termstructures/globalbootstrap.hpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit fa60f238eb37cbac516099f1fb2e0199deb593a9 Author: paolodelia99 Date: Tue, 16 Dec 2025 19:48:59 +0100 fix infinite loop problem in initialize method in blackONPricer ql/cashflows/blackovernightindexedcouponpricer.cpp | 6 ++++-- test-suite/overnightindexedcoupon.cpp | 7 ++++++- 2 files changed, 10 insertions(+), 3 deletions(-) commit a1310598c7ba2e70e80b49c79aeb24e9eacf44e9 Author: Peter Caspers Date: Tue, 16 Dec 2025 16:45:08 +0100 fix ql/termstructures/globalbootstrap.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2900e2e9e5fefd639e55eef44596ad531ba0239a Author: Peter Caspers Date: Tue, 16 Dec 2025 16:18:23 +0100 omit sorting of helpers, enable extrapolation on underlying curve ql/termstructures/globalbootstrap.cpp | 2 +- ql/termstructures/globalbootstrap.hpp | 108 ++++++++++++++++------------------ 2 files changed, 52 insertions(+), 58 deletions(-) commit 4f073253701e2c600a87ff6a26434b5dea57a7b1 Merge: 5945c8951 c147bfc26 Author: Luigi Ballabio Date: Tue, 16 Dec 2025 11:55:54 +0100 Add an accessor for pricing engine (#2400) commit e99ae9daeaf561b53feef6bd680019c005ef0926 Author: Luigi Ballabio Date: Tue, 16 Dec 2025 09:18:59 +0100 Renamed a few classes and methods for clarity ql/cashflows/blackovernightindexedcouponpricer.cpp | 106 ++++++++++----------- ql/cashflows/blackovernightindexedcouponpricer.hpp | 18 ++-- ql/cashflows/overnightindexedcoupon.cpp | 54 +++++------ ql/cashflows/overnightindexedcoupon.hpp | 32 +++---- ql/cashflows/overnightindexedcouponpricer.cpp | 22 ++--- ql/cashflows/overnightindexedcouponpricer.hpp | 14 +-- test-suite/overnightindexedcoupon.cpp | 41 ++++---- 7 files changed, 144 insertions(+), 143 deletions(-) commit 5945c8951762799c67f1c7b3496c25d947bb3ccc Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Dec 2025 11:01:00 +0000 Bump actions/upload-artifact from 5 to 6 Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 5 to 6. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v5...v6) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] .github/workflows/msvc-analysis.yml | 2 +- .github/workflows/test-times.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit d5f33b8c412f4bb0803aa6a6adfefd0fcedb5078 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Dec 2025 11:01:19 +0000 Bump peter-evans/create-pull-request from 7 to 8 Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 7 to 8. - [Release notes](https://github.com/peter-evans/create-pull-request/releases) - [Commits](https://github.com/peter-evans/create-pull-request/compare/v7...v8) --- updated-dependencies: - dependency-name: peter-evans/create-pull-request dependency-version: '8' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] .github/workflows/copyrights.yml | 2 +- .github/workflows/generated-headers.yml | 2 +- .github/workflows/includes.yml | 2 +- .github/workflows/increase-version-number.yml | 2 +- .github/workflows/license-url.yml | 2 +- .github/workflows/misspell.yml | 2 +- .github/workflows/namespaces.yml | 2 +- .github/workflows/prepare-release-candidate.yml | 2 +- .github/workflows/prepare-release.yml | 2 +- .github/workflows/sync-qldefines.yml | 2 +- .github/workflows/tidy.yml | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) commit 99c56ceb4b6cae3437709f92f083b58d9c32b8f1 Merge: 619a23ac1 1e9efef1c Author: Luigi Ballabio Date: Fri, 12 Dec 2025 14:33:27 +0100 Use quoteError in FittedBondDiscountCurve (#2401) commit 619a23ac13e40a9528da4b8cea543b2a5f16290f Merge: 99d3a393f 536011abf Author: Luigi Ballabio Date: Thu, 11 Dec 2025 15:04:19 +0100 Patches for AD compatibility (#2402) commit 99d3a393f53df48d4f3ada206ed06379308a6859 Author: Luigi Ballabio Date: Thu, 11 Dec 2025 15:03:06 +0100 Upgrade to Boost 1.90 in CI workflows .github/workflows/cmake-latest-runners.yml | 4 ++-- .github/workflows/cmake.yml | 12 ++++++------ .github/workflows/msvc-all-configs.yml | 2 +- .github/workflows/msvc-analysis.yml | 4 ++-- .github/workflows/msvc-nondefault.yml | 2 +- .github/workflows/msvc.yml | 2 +- 6 files changed, 13 insertions(+), 13 deletions(-) commit 1c155151f2bda9545973e14f2863d0217aadc310 Author: Peter Caspers Date: Wed, 10 Dec 2025 17:09:11 +0100 fix capture test-suite/piecewiseyieldcurve.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4f07b1f04a35d2d2ba7586db6c581ab5beaeff97 Author: Peter Caspers Date: Wed, 10 Dec 2025 17:05:27 +0100 clearer code test-suite/piecewiseyieldcurve.cpp | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) commit ebb3c032b8ec99b46f3444889da82e75a8305769 Author: Peter Caspers Date: Wed, 10 Dec 2025 16:46:24 +0100 add unit test test-suite/piecewiseyieldcurve.cpp | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit 536011abfda53e1aa6b7d2f7b53f466a65887a2a Author: Auto Differentiation Dev Team <107129969+auto-differentiation-dev@users.noreply.github.com> Date: Wed, 10 Dec 2025 12:35:43 +0000 constexpr and implicit conversion fixes for using with non-double Real type test-suite/piecewiseyieldcurve.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3fdbb754932698803ce038ab108c6652aae89703 Author: Peter Caspers Date: Tue, 9 Dec 2025 20:07:58 +0100 add instrument weights ql/termstructures/globalbootstrap.hpp | 62 ++++++++++++++++++++++------------- 1 file changed, 40 insertions(+), 22 deletions(-) commit 97ba81f0a08eb1ab9990276a9caaeacabcdaf8b2 Author: Peter Caspers Date: Tue, 9 Dec 2025 19:29:13 +0100 Revert "introduce scale" This reverts commit 889b98fb2bea518090b556b28ba58ade30cf115a. ql/termstructures/bootstraphelper.hpp | 16 ++++++---------- ql/termstructures/globalbootstrap.hpp | 3 +-- ql/termstructures/iterativebootstrap.hpp | 2 +- ql/termstructures/yield/ratehelpers.cpp | 6 +++--- 4 files changed, 11 insertions(+), 16 deletions(-) commit 322392bc085800f59c06b8db88e69f49bbd9ccb4 Author: Peter Caspers Date: Tue, 9 Dec 2025 19:29:09 +0100 Revert "scale should be the factor to get to the order of 1" This reverts commit 12ea554e2eb42cd0c665ac574f6fff9e3e37c94f. ql/termstructures/yield/ratehelpers.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit bd7883ea0a26868c2999e1a33edcfb435faf07b7 Author: Auto Differentiation Dev Team <107129969+auto-differentiation-dev@users.noreply.github.com> Date: Tue, 9 Dec 2025 18:28:06 +0000 Fixes test macros to be compatible with other types test-suite/piecewiseyieldcurve.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 1e9efef1cb181e271cccafb1553ca69ee0bc5f8d Author: Eugene Toder Date: Tue, 9 Dec 2025 12:02:07 -0500 Use quoteError in FittedBondDiscountCurve ql/termstructures/yield/fittedbonddiscountcurve.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit c147bfc26db3b5ee15abb98a1b5785818dc570a6 Author: Eugene Toder Date: Tue, 9 Dec 2025 09:48:30 -0500 Add an accessor for pricing engine ql/instrument.hpp | 5 +++++ 1 file changed, 5 insertions(+) commit 7fa295f752a00eff4abcd7c55c1e2d055cb300fb Merge: eef27a34a 5acde822e Author: Luigi Ballabio Date: Tue, 9 Dec 2025 12:20:13 +0100 relax check on helper maturities in GlobalBootstrap (#2395) commit eef27a34a552f375e25b19f2632b7d3dbd433b69 Author: lballabio[bot] <224797326+lballabio-bot@users.noreply.github.com> Date: Sun, 7 Dec 2025 01:36:34 +0000 Automated fixes by clang-tidy ql/instruments/asianoption.cpp | 4 ++-- ql/instruments/asianoption.hpp | 4 ++-- ql/patterns/lazyobject.hpp | 2 +- ql/termstructures/globalbootstrap.cpp | 7 ++++--- ql/termstructures/multicurve.cpp | 6 +++--- ql/termstructures/multicurve.hpp | 4 ++-- 6 files changed, 14 insertions(+), 13 deletions(-) commit 289937841d07f30375133675985584db76e00208 Author: Luigi Ballabio Date: Tue, 9 Dec 2025 09:09:13 +0100 Avoid a few conversion warnings ql/termstructures/globalbootstrap.cpp | 2 +- test-suite/piecewiseyieldcurve.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit a55e72511632308094bc45a9a21aeeac32facd8b Author: paolodelia99 Date: Mon, 8 Dec 2025 17:35:37 +0100 return plain spread in case simple avg ONCopoun ql/cashflows/overnightindexedcoupon.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 12ea554e2eb42cd0c665ac574f6fff9e3e37c94f Author: Peter Caspers Date: Sun, 7 Dec 2025 20:21:40 +0100 scale should be the factor to get to the order of 1 ql/termstructures/yield/ratehelpers.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 889b98fb2bea518090b556b28ba58ade30cf115a Author: Peter Caspers Date: Sun, 7 Dec 2025 19:21:52 +0100 introduce scale ql/termstructures/bootstraphelper.hpp | 16 ++++++++++------ ql/termstructures/globalbootstrap.hpp | 3 ++- ql/termstructures/iterativebootstrap.hpp | 2 +- ql/termstructures/yield/ratehelpers.cpp | 6 +++--- 4 files changed, 16 insertions(+), 11 deletions(-) commit ca701f7ad702aae1e70f259160d686c2d2ffe63c Author: Auto Differentiation Dev Team <107129969+auto-differentiation-dev@users.noreply.github.com> Date: Sat, 6 Dec 2025 14:32:24 +0000 Constexpr auto as it might be incompatible with Real test-suite/piecewiseyieldcurve.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6824d28e42241c2632c090d7a1d9a2ffe9ccd7aa Author: Auto Differentiation Dev Team <107129969+auto-differentiation-dev@users.noreply.github.com> Date: Sat, 6 Dec 2025 14:29:36 +0000 Explicit return type on lambda to allow use with expression templates ql/pricingengines/vanilla/cashdividendeuropeanengine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 33a3be2c4ebbbcb91f3eeec0915f76e657bf5246 Author: Auto Differentiation Dev Team <107129969+auto-differentiation-dev@users.noreply.github.com> Date: Sat, 6 Dec 2025 10:22:21 +0000 Avoid constexpr Real, as that breaks AD types ql/termstructures/globalbootstrap.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5acde822eb05a13ff7a8d6c1137440ea78fd22ec Author: Peter Caspers Date: Sat, 6 Dec 2025 10:51:02 +0100 remove old check ql/termstructures/globalbootstrap.hpp | 6 ------ 1 file changed, 6 deletions(-) commit decdd7f4cc3c461018395e892b292d476c694627 Author: Peter Caspers Date: Sat, 6 Dec 2025 10:48:03 +0100 relax check ql/termstructures/globalbootstrap.hpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 9c6bbcff7a7573169d0ba695e8353465b6849a24 Merge: 4c8af36f2 c988da992 Author: Luigi Ballabio Date: Fri, 5 Dec 2025 09:01:40 +0100 Natural Cubic Spline Fitting method (#2378) commit 4c8af36f20219ed96196420468ff4d36b140e538 Author: Luigi Ballabio Date: Thu, 4 Dec 2025 16:04:00 +0100 Avoid warning about implicit copy constructor ql/utilities/steppingiterator.hpp | 1 + 1 file changed, 1 insertion(+) commit c988da992947c38670261a138b36f4dffe9b3e81 Author: Luigi Ballabio Date: Thu, 4 Dec 2025 17:39:13 +0100 Avoid Codacy warning ql/termstructures/yield/nonlinearfittingmethods.hpp | 1 + 1 file changed, 1 insertion(+) commit 967ec6e95045dcc70969ca7dddbf2305206295db Author: Luigi Ballabio Date: Thu, 4 Dec 2025 16:22:12 +0100 No need to add a node at t=0 in the example code Examples/FittedBondCurve/FittedBondCurve.cpp | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) commit 41f6b252be88db24e9389f28e92c666806deba6a Author: Luigi Ballabio Date: Thu, 4 Dec 2025 16:21:59 +0100 More simplification .../yield/nonlinearfittingmethods.cpp | 22 +++++++--------------- .../yield/nonlinearfittingmethods.hpp | 1 - 2 files changed, 7 insertions(+), 16 deletions(-) commit c6f23c27209f9c87fce7dbb906e7d18425d32aaf Author: Krishn Parasar Date: Thu, 4 Dec 2025 00:21:55 +0530 Updates based on comments Examples/FittedBondCurve/FittedBondCurve.cpp | 5 +++-- .../yield/nonlinearfittingmethods.cpp | 23 +++++----------------- .../yield/nonlinearfittingmethods.hpp | 9 --------- 3 files changed, 8 insertions(+), 29 deletions(-) commit 7a04258b20f599e4b489ae599def7a9155358900 Author: lballabio[bot] <224797326+lballabio-bot@users.noreply.github.com> Date: Wed, 3 Dec 2025 17:06:52 +0000 Update copyright list in license LICENSE.TXT | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 6350a42558383f46c52932a4f9ff12e77503fcad Author: lballabio[bot] <224797326+lballabio-bot@users.noreply.github.com> Date: Wed, 3 Dec 2025 17:06:51 +0000 Update old license links ql/termstructures/globalbootstrap.cpp | 2 +- ql/termstructures/multicurve.cpp | 2 +- ql/termstructures/multicurve.hpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 0b3940320262d2f3efe48dc0cc3f0a897bf9b5a8 Author: lballabio[bot] <224797326+lballabio-bot@users.noreply.github.com> Date: Wed, 3 Dec 2025 14:50:38 +0000 Update generated headers ql/termstructures/all.hpp | 1 + 1 file changed, 1 insertion(+) commit 44513c97d8f4ef293475cfda51d7dbcb82586b2a Merge: 7ed57d00e 09edbae05 Author: Luigi Ballabio Date: Wed, 3 Dec 2025 15:48:31 +0100 Add support for seasoned continuous Asian options (#2381) commit 8721724e6bbae7a352f2eaa6256a116eb81abc4b Author: Krishn Parasar Date: Wed, 3 Dec 2025 19:39:01 +0530 Updates based on comments. Examples/FittedBondCurve/FittedBondCurve.cpp | 3 + .../yield/nonlinearfittingmethods.cpp | 71 +--------------------- 2 files changed, 6 insertions(+), 68 deletions(-) commit 09edbae052edffbde9393eb097c21ba0b27c3e63 Author: Luigi Ballabio Date: Wed, 3 Dec 2025 14:35:20 +0100 Avoid deprecated constructor in example Examples/AsianOption/AsianOption.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 43a9156b4ab8e1a31baca5f3b4e5d9ee95ef0b9f Author: Luigi Ballabio Date: Wed, 3 Dec 2025 14:20:19 +0100 Deprecate old engine constructor .../asian/continuousarithmeticasianlevyengine.cpp | 15 ++++++++++++--- .../asian/continuousarithmeticasianlevyengine.hpp | 8 ++++++++ test-suite/asianoptions.cpp | 14 +++++++------- 3 files changed, 27 insertions(+), 10 deletions(-) commit 7ed57d00e1011f5a036ead8a3dd627cc2d61f520 Merge: b3612efbd 313f6c36a Author: Luigi Ballabio Date: Wed, 3 Dec 2025 13:03:22 +0100 add multicurve bootstrap (#2344) commit 313f6c36a4719770b18c9893e1894f571f30b68c Author: Peter Caspers Date: Mon, 1 Dec 2025 18:03:10 +0100 improve doc ql/termstructures/multicurve.hpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 04d3317642ea2d8486753114011ed1eb7839211c Author: Peter Caspers Date: Mon, 1 Dec 2025 17:56:55 +0100 udpate documentation ql/termstructures/multicurve.hpp | 45 +++++++++++++++++++++++++++++++++------- 1 file changed, 38 insertions(+), 7 deletions(-) commit b3612efbd2aab169f3298f203441f5f86777b019 Author: lballabio[bot] <224797326+lballabio-bot@users.noreply.github.com> Date: Sun, 30 Nov 2025 01:38:50 +0000 Automated fixes by clang-tidy ql/experimental/termstructures/crosscurrencyratehelpers.cpp | 10 +++++----- ql/experimental/termstructures/crosscurrencyratehelpers.hpp | 2 +- test-suite/crosscurrencyratehelpers.cpp | 6 ++++-- 3 files changed, 10 insertions(+), 8 deletions(-) commit 20ab3cbbab1aedf50a15e0d37e9ccce32ba9c280 Author: Peter Caspers Date: Sun, 30 Nov 2025 12:10:56 +0100 refactor and rename ql/termstructures/multicurve.cpp | 35 ++++++++++------------------------- ql/termstructures/multicurve.hpp | 26 ++++++++++++++------------ test-suite/piecewiseyieldcurve.cpp | 8 ++++---- 3 files changed, 28 insertions(+), 41 deletions(-) commit a91e6dcb0ee169d092e9c0e951413cda67f919f1 Author: Peter Caspers Date: Sat, 29 Nov 2025 20:01:31 +0100 use rvalue ref ql/termstructures/multicurve.cpp | 10 ++++------ ql/termstructures/multicurve.hpp | 4 ++-- test-suite/piecewiseyieldcurve.cpp | 8 ++++---- 3 files changed, 10 insertions(+), 12 deletions(-) commit e103123e29eb62fa78f0ad199b687fef034d3aee Author: Peter Caspers Date: Sat, 29 Nov 2025 19:42:16 +0100 formatting ql/termstructures/multicurve.cpp | 9 ++++----- ql/termstructures/multicurve.hpp | 4 ++-- 2 files changed, 6 insertions(+), 7 deletions(-) commit a806e4338ec5eb2a8e0d80efd4620893b014cf59 Author: Peter Caspers Date: Sat, 29 Nov 2025 19:41:01 +0100 formatting ql/termstructures/multicurve.cpp | 1 - 1 file changed, 1 deletion(-) commit 7358039bd3ddd6f879218bb94eba8772cdcb57b6 Author: Peter Caspers Date: Sat, 29 Nov 2025 19:40:18 +0100 fix ql/termstructures/multicurve.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ce8a571b3c466a236cb246e22c7e13cead70dbf2 Author: Peter Caspers Date: Sat, 29 Nov 2025 18:52:23 +0100 Revert "Simplify usage" This reverts commit 03db67cd4486a24a81bd39ac91491e94af557df1. ql/termstructures/multicurve.cpp | 42 ++++++++++++++++++------- ql/termstructures/multicurve.hpp | 35 ++++++++++++++------- ql/termstructures/yield/piecewiseyieldcurve.hpp | 32 ++++++------------- ql/termstructures/yieldtermstructure.hpp | 2 -- test-suite/piecewiseyieldcurve.cpp | 23 +++++++------- 5 files changed, 75 insertions(+), 59 deletions(-) commit 04019bd614733bd1c99d201bd9371899e81aa769 Author: Peter Caspers Date: Sat, 29 Nov 2025 13:27:12 +0100 add non-pw curve ql/termstructures/multicurve.cpp | 20 ++++++++++++++++++-- ql/termstructures/multicurve.hpp | 7 +++++-- test-suite/piecewiseyieldcurve.cpp | 19 +++---------------- 3 files changed, 26 insertions(+), 20 deletions(-) commit 9d2fe9986c5547d5b59a61378ec85a5c80ca59e7 Author: Peter Caspers Date: Sat, 29 Nov 2025 11:45:12 +0100 remove QuantLib namespace qualification ql/termstructures/globalbootstrap.hpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 66b5513c4cad1bc958e00f9dffb9bfb11a1e4e44 Author: Peter Caspers Date: Sat, 29 Nov 2025 11:41:29 +0100 add unit test for cycle of zero spreaded and pw curve test-suite/piecewiseyieldcurve.cpp | 75 +++++++++++++++++++++++++++++++++++++- 1 file changed, 73 insertions(+), 2 deletions(-) commit 03d53bbd92d1ba76ab710e25fc6d01f527486c64 Author: Kareem Fareed <88599145+KookiesNKareem@users.noreply.github.com> Date: Fri, 28 Nov 2025 03:14:20 -0700 Refactor seasoned Asian options: move startDate to option, keep currentAverage in engine Separates contract terms (option) from market data (engine) per ideal design. ql/instruments/asianoption.cpp | 13 +------------ ql/instruments/asianoption.hpp | 10 ++++------ ql/pricingengines/asian/analytic_cont_geom_av_price.cpp | 2 +- .../asian/continuousarithmeticasianlevyengine.cpp | 15 +++------------ test-suite/asianoptions.cpp | 8 +++----- 5 files changed, 12 insertions(+), 36 deletions(-) commit 08ef0689336d2d43ae1d08447f7c9dcc0c62acdc Author: lballabio[bot] <224797326+lballabio-bot@users.noreply.github.com> Date: Thu, 27 Nov 2025 14:01:40 +0000 Update generated headers ql/quantlib.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2b6e7a6a80dab5f44967899b1488141c67c34098 Merge: 641992d73 7f9f90b2d Author: Luigi Ballabio Date: Thu, 27 Nov 2025 14:49:34 +0100 Minor change for consistency of BOOST_ALL_NO_LIB and ql auto_link. (#2385) commit 641992d7387ec01db08551a48e2736d5d32eb59b Author: lballabio[bot] <224797326+lballabio-bot@users.noreply.github.com> Date: Thu, 27 Nov 2025 07:51:04 +0000 Update copyright list in license LICENSE.TXT | 2 ++ 1 file changed, 2 insertions(+) commit 86b141ead5041baf3f842ac5586c3b6d0ad2b522 Author: Krishn Parasar Date: Thu, 27 Nov 2025 18:28:08 +0530 Updates based on comments Refactored NaturalCubicFitting to use QuantLib’s CubicInterpolation for natural spline second-derivative computation and removed custom tridiagonal solver. .../yield/nonlinearfittingmethods.cpp | 195 +++++++++------------ .../yield/nonlinearfittingmethods.hpp | 15 +- 2 files changed, 93 insertions(+), 117 deletions(-) commit 7f9f90b2d2f4173370bcfe665ce96b965b1f0c4c Author: francis Date: Thu, 27 Nov 2025 11:01:59 +0000 Minor change for consistency of BOOST_ALL_NO_LIB and ql auto_link. ql/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cc56685e572b4ff6743fd5f2d239665e26860eea Merge: 924d4ad0e 673ab76d0 Author: Luigi Ballabio Date: Thu, 27 Nov 2025 08:50:53 +0100 Add CrossCurrencySwapRateHelper for cross-currency swap bootstrapping (#2367) commit 282e7423506fd083036bca535af41ba293b6b0d9 Author: paolodelia99 Date: Wed, 26 Nov 2025 23:14:02 +0100 fix win compilation error using static_cast of lookbackDays ql/cashflows/overnightindexedcoupon.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6399fcabaca4578482e6214eae29b931e045b1f0 Author: paolodelia99 Date: Wed, 26 Nov 2025 23:00:00 +0100 Added adj in ONCoupoon ctor, fix bug when computing the effectiveIndexFixing ql/cashflows/overnightindexedcoupon.cpp | 9 ++++++++- ql/cashflows/overnightindexedcouponpricer.cpp | 12 ++++++------ 2 files changed, 14 insertions(+), 7 deletions(-) commit 673ab76d0c69cac2b635cf527ba0c28bbee30f4a Author: Luigi Ballabio Date: Wed, 26 Nov 2025 17:08:17 +0100 Refactor common functionality in cross-currency swaps .../termstructures/crosscurrencyratehelpers.cpp | 347 ++++++++++----------- .../termstructures/crosscurrencyratehelpers.hpp | 148 ++++----- test-suite/crosscurrencyratehelpers.cpp | 210 +++++++------ 3 files changed, 345 insertions(+), 360 deletions(-) commit 924d4ad0e74abe1c879a3456c4d3627cfe23f574 Merge: 0766d68c1 ef7ed6a5f Author: Luigi Ballabio Date: Wed, 26 Nov 2025 10:41:18 +0100 Add Asian option example (#2380) commit ef7ed6a5f187f9d02705ff3880d648fb3569d0ea Author: Luigi Ballabio Date: Wed, 26 Nov 2025 09:46:16 +0100 Add new project to VC++ solution file QuantLib.sln | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 7db5e392a6281899c5f783d74ea8656b471e2e8b Author: Kareem Fareed <88599145+KookiesNKareem@users.noreply.github.com> Date: Tue, 25 Nov 2025 22:45:44 -0700 added vcxprroj & vcxproj.filters Examples/AsianOption/AsianOption.vcxproj | 562 +++++++++++++++++++++++ Examples/AsianOption/AsianOption.vcxproj.filters | 22 + 2 files changed, 584 insertions(+) commit a9a3092c23aa7aee4a6bd5d0103d744ccf67c057 Author: Peter Caspers Date: Tue, 25 Nov 2025 15:50:31 +0100 compile issue ql/termstructures/yield/piecewiseyieldcurve.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2d71ab59180f142bafdb1bceaa933ece981c7ea3 Author: Peter Caspers Date: Tue, 25 Nov 2025 12:57:30 +0100 fix ql/termstructures/yield/piecewiseyieldcurve.hpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 0766d68c1f9e8e6247e4a116b8a1597029d8cdd3 Author: Luigi Ballabio Date: Tue, 25 Nov 2025 10:34:18 +0100 Fix formatting in man page man/quantlib-test-suite.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5a0ebbe190c5ba9d12831db6fdd760d7c1c93859 Author: Kareem Fareed <88599145+KookiesNKareem@users.noreply.github.com> Date: Mon, 24 Nov 2025 11:33:42 -0800 Address PR review feedback - Fix comment: 'Bootstrap' -> 'Set up flat' curves - Move Finite Differences to discrete arithmetic section - Cleaned output and fixed inaccurate inequality - Increase column width for proper alignment (20->24) Examples/AsianOption/AsianOption.cpp | 43 +++++++++++++----------------------- 1 file changed, 15 insertions(+), 28 deletions(-) commit 3522a8dffb142e55dbc3a13dafbca99af9d8712e Merge: 3e41c3731 9dcb76300 Author: Luigi Ballabio Date: Mon, 24 Nov 2025 17:00:45 +0100 Make sure the correct vector initialiser is used even in AD case (#2383) commit 3e41c3731ecb29b51c22706435488236a72312a5 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Nov 2025 11:32:02 +0000 Bump actions/checkout from 5 to 6 Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v5...v6) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] .github/workflows/cmake-latest-runners.yml | 2 +- .github/workflows/cmake.yml | 12 ++++++------ .github/workflows/codeql-analysis.yml | 2 +- .github/workflows/copyrights.yml | 2 +- .github/workflows/coveralls.yml | 2 +- .github/workflows/devenv-images.yml | 2 +- .github/workflows/doxygen.yml | 4 ++-- .github/workflows/filelists.yml | 2 +- .github/workflows/generated-headers.yml | 2 +- .github/workflows/headers.yml | 2 +- .github/workflows/includes.yml | 2 +- .github/workflows/increase-version-number.yml | 2 +- .github/workflows/license-url.yml | 2 +- .github/workflows/linux-full-tests.yml | 2 +- .github/workflows/linux-nondefault.yml | 2 +- .github/workflows/linux.yml | 2 +- .github/workflows/macos-nondefault.yml | 2 +- .github/workflows/macos.yml | 2 +- .github/workflows/misspell.yml | 2 +- .github/workflows/msvc-all-configs.yml | 2 +- .github/workflows/msvc-analysis.yml | 2 +- .github/workflows/msvc-nondefault.yml | 2 +- .github/workflows/msvc.yml | 2 +- .github/workflows/namespaces.yml | 2 +- .github/workflows/prepare-release-candidate.yml | 2 +- .github/workflows/prepare-release.yml | 2 +- .github/workflows/publish-release-candidate.yml | 2 +- .github/workflows/publish-release.yml | 2 +- .github/workflows/sanitizer.yml | 4 ++-- .github/workflows/sync-qldefines.yml | 2 +- .github/workflows/test-times.yml | 2 +- .github/workflows/tidy.yml | 2 +- 32 files changed, 39 insertions(+), 39 deletions(-) commit 09959bef7ca4f7ccb8026b01e40f63f740bdb29e Author: Kareem Fareed <88599145+KookiesNKareem@users.noreply.github.com> Date: Sun, 23 Nov 2025 23:03:07 -0800 Add support for seasoned continuous Asian options Implements the long-standing TODO for running average support in continuous Asian options. Seasoned options are those where averaging has already started and a current average value is known. - Add new constructor to ContinuousAveragingAsianOption accepting currentAverage and startDate for seasoned options - Update ContinuousArithmeticAsianLevyEngine to handle seasoned options by adjusting strike based on accumulated average - Add proper validation requiring both currentAverage and startDate together - Add error handling for geometric seasoned options (not yet implemented) - Add comprehensive unit tests verifying correct pricing behavior - Maintain full backward compatibility with existing code All 1171 tests pass with no errors or warnings. ql/instruments/asianoption.cpp | 25 ++++- ql/instruments/asianoption.hpp | 28 ++++- .../asian/analytic_cont_geom_av_price.cpp | 8 ++ .../asian/continuousarithmeticasianlevyengine.cpp | 23 +++- test-suite/asianoptions.cpp | 119 +++++++++++++++++++++ 5 files changed, 192 insertions(+), 11 deletions(-) commit e8e8ed6b23ee6eb1231774b3b0712e3e3a21d79c Author: Kareem Fareed <88599145+KookiesNKareem@users.noreply.github.com> Date: Sun, 23 Nov 2025 22:24:16 -0800 Add Asian option example This example demonstrates pricing of Asian options using various methods: - Discrete geometric average (analytic and Monte Carlo) - Discrete arithmetic average (Monte Carlo with/without control variate, Turnbull-Wakeman approximation, finite differences) - Continuous geometric average (analytic) - Continuous arithmetic average (Levy engine) Examples/AsianOption/AsianOption.cpp | 314 +++++++++++++++++++++++++++++++++++ Examples/AsianOption/CMakeLists.txt | 5 + Examples/CMakeLists.txt | 1 + Examples/Makefile.am | 4 + 4 files changed, 324 insertions(+) commit ee298ee6565b80715a28e1fe627fe2df77f7fc19 Author: uzi101 Date: Sun, 23 Nov 2025 15:49:19 -0500 Finalize const-notional CCS helper and test suite per review feedback .../termstructures/crosscurrencyratehelpers.cpp | 44 +++--- .../termstructures/crosscurrencyratehelpers.hpp | 7 +- ql/termstructures/yield/all.hpp | 1 - test-suite/crosscurrencyratehelpers.cpp | 166 ++++++++++++--------- 4 files changed, 118 insertions(+), 100 deletions(-) commit 330285ff8e038755065747fda052e1895fbbbc4f Author: Peter Caspers Date: Sun, 23 Nov 2025 20:01:10 +0100 handle case where base class enables shared from this ql/termstructures/yield/piecewiseyieldcurve.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 03db67cd4486a24a81bd39ac91491e94af557df1 Author: Eugene Toder Date: Tue, 28 Oct 2025 15:20:06 -0400 Simplify usage ql/termstructures/multicurve.cpp | 20 ++++++-------------- ql/termstructures/multicurve.hpp | 19 +++++++------------ ql/termstructures/yield/piecewiseyieldcurve.hpp | 23 +++++++++++++++-------- test-suite/piecewiseyieldcurve.cpp | 4 ++-- 4 files changed, 30 insertions(+), 36 deletions(-) commit d8a49e3d14b513e62ca13742bada0724f5aaa431 Author: Krishn Parasar Date: Sun, 23 Nov 2025 20:07:01 +0530 Natural Cubic Spline Fitting method Examples/FittedBondCurve/FittedBondCurve.cpp | 61 ++++++- .../yield/nonlinearfittingmethods.cpp | 187 +++++++++++++++++++++ .../yield/nonlinearfittingmethods.hpp | 40 +++++ 3 files changed, 281 insertions(+), 7 deletions(-) commit 262bce13bcd67fcd77e46bba64c5e49be469248a Author: Peter Caspers Date: Sun, 23 Nov 2025 13:14:44 +0100 make MultiCurveBootstrap internal to MultiCurve ql/termstructures/globalbootstrap.cpp | 8 +++++++- ql/termstructures/multicurve.cpp | 8 ++++++-- ql/termstructures/multicurve.hpp | 4 +++- test-suite/piecewiseyieldcurve.cpp | 2 +- 4 files changed, 17 insertions(+), 5 deletions(-) commit 9dcb763008752d894848b16dba640ccc3d648177 Author: Auto Differentiation Dev Team <107129969+auto-differentiation-dev@users.noreply.github.com> Date: Fri, 21 Nov 2025 12:34:28 +0000 Make sure the correct vector initialiser is used even in AD case If Real is not double, the compiler has to choose between converting {1.0} to a `Real` for value initializer, or converting it to a `size_t` for the size initializer, and favours the latter. test-suite/dividendoption.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e46ecf9f013f3fbc9ea9bbaec07ed43b99df5818 Author: lballabio[bot] <224797326+lballabio-bot@users.noreply.github.com> Date: Tue, 18 Nov 2025 13:43:56 +0000 Update generated headers ql/pricingengines/vanilla/all.hpp | 1 + 1 file changed, 1 insertion(+) commit 825246da0d208dc0a7ed887aef2caebbf0c9c671 Merge: e3bf39e73 3d3c2f133 Author: Luigi Ballabio Date: Tue, 18 Nov 2025 14:41:44 +0100 added semi-analytic European engine for a single asset with cash dividends (#2373) commit ae36b13f2e5a9a7f4edfb6e4e6bf4ab55bc06926 Author: uzi101 Date: Fri, 14 Nov 2025 11:06:53 -0500 Update cross-currency swap rate helper and test suite .../termstructures/crosscurrencyratehelpers.cpp | 168 ++++++++++++--------- .../termstructures/crosscurrencyratehelpers.hpp | 56 ++++--- test-suite/crosscurrencyratehelpers.cpp | 100 +++++++++++- 3 files changed, 224 insertions(+), 100 deletions(-) commit e3bf39e73e79d5a15e1b23a314f126e35711298e Merge: 18819d475 58036268f Author: Luigi Ballabio Date: Thu, 13 Nov 2025 11:37:06 +0100 Deprecate retrieval of lagged rates from inflation term structures (#2374) commit 18819d47591901acd33ac78430cfce7d7363626a Author: Luigi Ballabio Date: Thu, 13 Nov 2025 09:42:50 +0100 Fix a few typos Docs/pages/lattices.docs | 2 +- Examples/DiscreteHedging/DiscreteHedging.cpp | 2 +- Examples/FRA/FRA.cpp | 2 +- ql/experimental/credit/basecorrelationlossmodel.hpp | 2 +- ql/experimental/credit/defaultevent.hpp | 2 +- ql/experimental/credit/randomdefaultlatentmodel.hpp | 2 +- ql/experimental/credit/randomlosslatentmodel.hpp | 2 +- ql/experimental/credit/recursivelossmodel.hpp | 2 +- ql/experimental/credit/saddlepointlossmodel.hpp | 2 +- ql/methods/finitedifferences/tridiagonaloperator.hpp | 2 +- ql/models/marketmodels/models/capletcoterminalswaptioncalibration.cpp | 4 ++-- ql/models/shortrate/onefactormodels/markovfunctional.hpp | 2 +- ql/pricingengines/forward/forwardengine.hpp | 2 +- ql/pricingengines/swaption/gaussian1dfloatfloatswaptionengine.hpp | 4 ++-- ql/termstructures/defaulttermstructure.hpp | 2 +- ql/termstructures/volatility/equityfx/impliedvoltermstructure.hpp | 4 ++-- 16 files changed, 19 insertions(+), 19 deletions(-) commit 58036268f142968d014900bcf4e374f3082d643a Author: Luigi Ballabio Date: Wed, 12 Nov 2025 08:16:55 +0100 Deprecate retrieval of lagged rates from inflation term structures No longer needed since the lag is managed by the coupons. .../inflation/yoycapfloortermpricesurface.hpp | 3 +- ql/indexes/inflationindex.cpp | 4 +-- .../inflation/inflationcapfloorengines.cpp | 2 +- ql/termstructures/inflationtermstructure.cpp | 12 +++++++ ql/termstructures/inflationtermstructure.hpp | 37 ++++++++++++++-------- test-suite/inflation.cpp | 2 +- 6 files changed, 41 insertions(+), 19 deletions(-) commit 3d3c2f133a0d32c9f0e494f2a39b124ef27ec043 Author: klaus spanderen Date: Wed, 12 Nov 2025 21:54:25 +0100 fixed error message ql/pricingengines/basket/choibasketengine.cpp | 2 ++ test-suite/dividendoption.cpp | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) commit 4049af9e4eae2a3c25460bec60ffda2b4bdc7f30 Author: klaus spanderen Date: Wed, 12 Nov 2025 19:23:37 +0100 extend test cases ql/pricingengines/basket/choibasketengine.cpp | 6 +- .../vanilla/cashdividendeuropeanengine.cpp | 47 +++-- test-suite/dividendoption.cpp | 203 +++++++++++++++++++-- 3 files changed, 228 insertions(+), 28 deletions(-) commit a1fe2fe4e1bed4d8d174800d5a84d036f769cf12 Merge: 339376eeb e6ebc3426 Author: Luigi Ballabio Date: Wed, 12 Nov 2025 13:47:57 +0100 Make it possible to use default setting for `includeSettlementDateFlows` in `CashFlows` methods (#2372) commit e6ebc34265bc2bb42dc2c098824154430da437ec Author: Luigi Ballabio Date: Tue, 11 Nov 2025 17:59:45 +0100 Use default settings in Bond::isExpired ql/instruments/bond.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 02b1a141388e39e05a404a9a5048d1590c8e038a Author: Luigi Ballabio Date: Tue, 11 Nov 2025 17:04:39 +0100 Remove unused parameter in internal function ql/cashflows/cashflows.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 4b7ea77e4cfda714a676d00fc7080829d977fd49 Author: Luigi Ballabio Date: Tue, 11 Nov 2025 16:55:55 +0100 Make it possible to use default setting for includeSettlementDateFlows ql/cashflows/cashflows.cpp | 84 +++++++++++++++++++++---------------------- ql/cashflows/cashflows.hpp | 90 +++++++++++++++++++++++----------------------- 2 files changed, 87 insertions(+), 87 deletions(-) commit 339376eebbad41b032c2d8249c838ef5bd30e024 Merge: 0d1259428 d6e29d7b1 Author: Luigi Ballabio Date: Tue, 11 Nov 2025 09:05:40 +0100 Simplify LogInterpolationImpl and MixedInterpolationImpl (#2363) commit 0d12594286c3da9d610ffbc0c04fdb9a77678c8a Author: Luigi Ballabio Date: Mon, 10 Nov 2025 11:04:40 +0100 Update Boost download link in workflow .github/workflows/cmake-latest-runners.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5c85938badaff1787800f4e13da28184d76d7f5a Author: lballabio[bot] <224797326+lballabio-bot@users.noreply.github.com> Date: Sun, 9 Nov 2025 01:41:09 +0000 Automated fixes by clang-tidy ql/termstructures/yield/piecewiseforwardspreadedtermstructure.hpp | 4 ++-- ql/termstructures/yield/piecewisezerospreadedtermstructure.hpp | 4 ++-- ql/termstructures/yield/zerospreadedtermstructure.hpp | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) commit 7ccb3629ef1b423ab7c7eca2152bd3b272f4208d Author: uzi101 Date: Sat, 8 Nov 2025 08:56:29 -0500 Refactor CrossCurrencySwapRateHelper into experimental helpers with unified collateral handling ql/CMakeLists.txt | 2 - .../termstructures/crosscurrencyratehelpers.cpp | 133 +++++++++ .../termstructures/crosscurrencyratehelpers.hpp | 54 +++- .../yield/crosscurrencyswapratehelper.cpp | 166 ----------- .../yield/crosscurrencyswapratehelper.hpp | 73 ----- test-suite/CMakeLists.txt | 1 - test-suite/crosscurrencyratehelpers.cpp | 116 +++++++- test-suite/crosscurrencyswapratehelper.cpp | 306 --------------------- 8 files changed, 301 insertions(+), 550 deletions(-) commit ef1f370cea722ed63ad6222abee63789689d31b5 Author: klaus spanderen Date: Thu, 6 Nov 2025 22:59:43 +0100 reformat tabs .../finitedifferences/stepconditions/fdmstepconditioncomposite.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 70fb37f74906f1ea5d04d469beb5ce82ffeed332 Author: klaus spanderen Date: Thu, 6 Nov 2025 22:58:38 +0100 reformat tabs .../vanilla/cashdividendeuropeanengine.cpp | 36 +-- .../vanilla/cashdividendeuropeanengine.hpp | 10 +- .../vanilla/fdblackscholesvanillaengine.cpp | 10 +- .../vanilla/fdblackscholesvanillaengine.hpp | 4 +- test-suite/dividendoption.cpp | 308 ++++++++++----------- 5 files changed, 184 insertions(+), 184 deletions(-) commit 97a7e04c3ae54b02b7978e631ee1c27f9efc90e9 Author: klaus spanderen Date: Thu, 6 Nov 2025 22:51:49 +0100 fixed test cases .../vanilla/cashdividendeuropeanengine.cpp | 173 +++++++++++++++++++++ .../vanilla/cashdividendeuropeanengine.hpp | 67 ++++++++ test-suite/americanoption.cpp | 4 +- test-suite/dividendoption.cpp | 2 +- 4 files changed, 242 insertions(+), 4 deletions(-) commit 6e20b12c99edaf4092920bd3bb771421852dad90 Author: klaus spanderen Date: Thu, 6 Nov 2025 21:16:05 +0100 cash dividend engine, first version QuantLib.vcxproj | 2 + QuantLib.vcxproj.filters | 6 + ql/CMakeLists.txt | 2 + .../stepconditions/fdmstepconditioncomposite.cpp | 12 +- .../utilities/escroweddividendadjustment.cpp | 3 +- ql/pricingengines/vanilla/Makefile.am | 2 + .../vanilla/fdblackscholesvanillaengine.cpp | 20 +- .../vanilla/fdblackscholesvanillaengine.hpp | 7 +- test-suite/dividendoption.cpp | 270 +++++++++++++++++++++ test-suite/fdheston.cpp | 1 - 10 files changed, 312 insertions(+), 13 deletions(-) commit a56667380bef38d0f8fe766d8e4a1ff9c122b7b5 Author: uzi101 Date: Wed, 5 Nov 2025 18:06:21 -0500 Add CrossCurrencySwapRateHelper for cross-currency swap bootstrapping ql/CMakeLists.txt | 2 + ql/termstructures/yield/all.hpp | 1 + .../yield/crosscurrencyswapratehelper.cpp | 166 +++++++++++ .../yield/crosscurrencyswapratehelper.hpp | 73 +++++ test-suite/CMakeLists.txt | 1 + test-suite/crosscurrencyswapratehelper.cpp | 306 +++++++++++++++++++++ 6 files changed, 549 insertions(+) commit 33e452e496f8e6b5147e5b4a214e3934a48d6e18 Merge: c068ec3a2 7419a6885 Author: Luigi Ballabio Date: Wed, 5 Nov 2025 14:29:24 +0100 Remove day counter argument from spreaded curves (#2365) commit 7419a6885dded8f111a199c95ce1fab7b7d4ef90 Author: Luigi Ballabio Date: Wed, 5 Nov 2025 12:11:09 +0100 Show deprecation in generated docs ql/termstructures/yield/piecewiseforwardspreadedtermstructure.hpp | 3 +++ ql/termstructures/yield/piecewisezerospreadedtermstructure.hpp | 3 +++ ql/termstructures/yield/zerospreadedtermstructure.hpp | 3 +++ 3 files changed, 9 insertions(+) commit c068ec3a276834f5a60358bdce8d29c22671204d Merge: d823f4ecb e1b3051f5 Author: Luigi Ballabio Date: Mon, 3 Nov 2025 16:24:03 +0100 Allow crossed ranges in holidayList and businessDayList (#2362) commit 5cb1bffa0d3a1e4ddf40c530fdefd6281f32ffdc Author: Eugene Toder Date: Thu, 30 Oct 2025 15:31:15 -0400 Remove day counter argument from spreaded curves Spreaded curves always use the same day counter as the original curve. It's not possible to support a different day counter without some API changes on the base YieldTermStructure. Currently these classes simply ignore the passed day counter. Deprecate the current constructors and add new ones that do not take a day counter. ql/cashflows/cashflows.cpp | 71 +++++----------------- .../finitedifferences/operators/fdmbatesop.cpp | 4 +- .../piecewiseforwardspreadedtermstructure.hpp | 42 +++++++++---- .../yield/piecewisezerospreadedtermstructure.hpp | 49 +++++++++++---- .../yield/zerospreadedtermstructure.hpp | 24 +++++--- test-suite/capfloor.cpp | 8 +-- test-suite/piecewisezerospreadedtermstructure.cpp | 5 +- 7 files changed, 101 insertions(+), 102 deletions(-) commit d6e29d7b12265bcd52e535d7743e1041ef154c15 Author: Eugene Toder Date: Wed, 29 Oct 2025 22:18:28 -0400 Simplify LogInterpolationImpl and MixedInterpolationImpl Remove Interpolators as class template parameters and move them to constructors instead. They are not used after construction. This removes duplication in the generated code. Also, remove unneeded members from MixedInterpolationImpl and improve the check on switch point. ql/math/interpolation.hpp | 4 +- ql/math/interpolations/loginterpolation.hpp | 41 ++++++++--------- ql/math/interpolations/mixedinterpolation.hpp | 64 +++++++++++++-------------- 3 files changed, 51 insertions(+), 58 deletions(-) commit 1e8c557b296526b7607d8916d31106b6f7dbaac6 Author: Peter Caspers Date: Thu, 30 Oct 2025 09:02:47 +0100 allow to add observers to multicurve bootstrap ql/termstructures/globalbootstrap.cpp | 10 +++++++++- ql/termstructures/globalbootstrap.hpp | 2 ++ ql/termstructures/multicurve.cpp | 4 ++++ ql/termstructures/multicurve.hpp | 5 +++-- 4 files changed, 18 insertions(+), 3 deletions(-) commit e1b3051f571f37d986bd9ff347e571bbcdfa270d Author: Eugene Toder Date: Wed, 29 Oct 2025 22:09:27 -0400 Allow crossed ranges in holidayList and businessDayList This should just return an empty vector instead of throwing an error. ql/time/calendar.cpp | 6 ------ test-suite/calendars.cpp | 13 +++++++++---- 2 files changed, 9 insertions(+), 10 deletions(-) commit 42bdd82ef8385a1b8c303319e159f70df4d56b71 Author: Peter Caspers Date: Wed, 29 Oct 2025 18:03:18 +0100 not needed any more ql/termstructures/iterativebootstrap.hpp | 1 - ql/termstructures/localbootstrap.hpp | 1 - 2 files changed, 2 deletions(-) commit 139b5e3d7963f70f86cb46c43efb282ca9a149ba Author: Eugene Toder Date: Tue, 28 Oct 2025 15:53:03 -0400 Make safer ql/termstructures/multicurve.cpp | 3 ++- ql/termstructures/yield/piecewiseyieldcurve.hpp | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) commit 0497ccdba90de03a4563817d6360f0649b263182 Author: Peter Caspers Date: Wed, 29 Oct 2025 16:24:53 +0100 handle thread safe observer build ql/termstructures/multicurve.cpp | 12 ++++++++---- ql/termstructures/multicurve.hpp | 9 ++++++--- 2 files changed, 14 insertions(+), 7 deletions(-) commit d353587bf8d101101368890dc0449172428dd836 Author: Peter Caspers Date: Wed, 29 Oct 2025 12:09:28 +0100 back to original code, does the order matter? ql/termstructures/multicurve.cpp | 4 ++-- ql/termstructures/multicurve.hpp | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) commit c3e3fee60b04cd281ac35ec3d1cf72831d2177b2 Author: Peter Caspers Date: Wed, 29 Oct 2025 12:08:21 +0100 Revert "attempt to resolve compile and weak_ptr issues" This reverts commit f6e7a59a57bc877403d657494aa457ac06b3ef70. ql/termstructures/multicurve.cpp | 4 ++-- ql/termstructures/multicurve.hpp | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) commit f6e7a59a57bc877403d657494aa457ac06b3ef70 Author: Peter Caspers Date: Wed, 29 Oct 2025 11:29:57 +0100 attempt to resolve compile and weak_ptr issues ql/termstructures/multicurve.cpp | 4 ++-- ql/termstructures/multicurve.hpp | 7 +++---- 2 files changed, 5 insertions(+), 6 deletions(-) commit a8095fd9069eda1afe64d25197c6a6e40eca770b Author: Peter Caspers Date: Wed, 29 Oct 2025 09:56:23 +0100 do we need this? ql/termstructures/multicurve.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 21808cdf585172ff4ceb78f2fa4f1dc5748a7e3c Author: Peter Caspers Date: Wed, 29 Oct 2025 09:46:19 +0100 not needed ql/termstructures/multicurve.hpp | 1 - 1 file changed, 1 deletion(-) commit e3966ee973b627b45d44944874d88f748999ebfd Author: Peter Caspers Date: Wed, 29 Oct 2025 09:24:05 +0100 fix ql/termstructures/multicurve.cpp | 4 ++-- ql/termstructures/multicurve.hpp | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) commit ea31f6d580ed1a62feb9b754b1e007c300300f31 Author: Peter Caspers Date: Tue, 28 Oct 2025 19:45:45 +0100 simplify observability ql/termstructures/multicurve.cpp | 31 +++++++------------------------ ql/termstructures/multicurve.hpp | 21 +++++---------------- 2 files changed, 12 insertions(+), 40 deletions(-) commit 4a2638ba567e0e011107ed71ec6a6d2d49bc238d Author: Peter Caspers Date: Tue, 28 Oct 2025 19:45:24 +0100 use dynamic cast ql/termstructures/globalbootstrap.hpp | 2 +- ql/termstructures/iterativebootstrap.hpp | 1 + ql/termstructures/localbootstrap.hpp | 1 + ql/termstructures/yield/piecewiseyieldcurve.hpp | 5 ++++- ql/termstructures/yieldtermstructure.hpp | 2 +- 5 files changed, 8 insertions(+), 3 deletions(-) commit d823f4ecbadebeeafc98b4b68e7372576341aa11 Merge: aa0fa6ff8 db1b59cc4 Author: Luigi Ballabio Date: Tue, 28 Oct 2025 15:43:46 +0100 Implement ZeroCouponInflationSwap::fixedLegBPS() (#2360) commit aa0fa6ff89fc8aba2a659d9052e7d4f9d88e07dc Merge: b5f79d4a3 d734b6b9b Author: Luigi Ballabio Date: Tue, 28 Oct 2025 15:28:08 +0100 Small optimization for VV adjustment (#2356) commit db1b59cc4ff8c125244998844aa7ae33cf0cc224 Author: Eugene Toder Date: Sat, 25 Oct 2025 10:33:16 -0400 Implement ZeroCouponInflationSwap::fixedLegBPS() ql/instruments/zerocouponinflationswap.cpp | 19 +++++++++++++++++++ ql/instruments/zerocouponinflationswap.hpp | 1 + ql/instruments/zerocouponswap.cpp | 6 +++--- test-suite/inflation.cpp | 21 ++++++++++++++++++++- 4 files changed, 43 insertions(+), 4 deletions(-) commit b5f79d4a320c6ee78bf6364c943bd9bfc7545da8 Merge: fd20c1cfe 04186b702 Author: Luigi Ballabio Date: Mon, 27 Oct 2025 15:14:31 +0100 fixed misspelled Euribor curve (#2359) commit fd20c1cfe47da2b4521dd548dfd8ccd9120e0852 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Oct 2025 12:05:30 +0000 Bump actions/upload-artifact from 4 to 5 Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 5. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] .github/workflows/msvc-analysis.yml | 2 +- .github/workflows/test-times.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 04186b70291f39f42cbe728f7be4713e1dcc909c Author: Babar Khan <46613555+BabarZKhan@users.noreply.github.com> Date: Mon, 27 Oct 2025 13:49:03 +0100 Fix misspelled Euribor curve Examples/Gaussian1dModels/Gaussian1dModels.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d1574ee74ddb850a64d8a6385d15d91b50096c78 Author: lballabio[bot] <224797326+lballabio-bot@users.noreply.github.com> Date: Sun, 26 Oct 2025 01:32:00 +0000 Automated fixes by clang-tidy ql/termstructures/inflation/inflationhelpers.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c698c94c474cb91c8af3080a93e614226a01754a Author: Peter Caspers Date: Sun, 26 Oct 2025 10:28:27 +0100 tbd, simplify interface, but undefined behavior possible ql/termstructures/multicurve.cpp | 8 ++++++-- ql/termstructures/multicurve.hpp | 3 +-- ql/termstructures/yield/piecewiseyieldcurve.hpp | 3 ++- ql/termstructures/yieldtermstructure.hpp | 5 +++++ test-suite/piecewiseyieldcurve.cpp | 4 ++-- 5 files changed, 16 insertions(+), 7 deletions(-) commit e25269befa0c9a0b706c3ae7dd595066300daf80 Author: Peter Caspers Date: Sun, 26 Oct 2025 10:26:52 +0100 merge setupCostFunction() and guess() into one method ql/termstructures/globalbootstrap.cpp | 3 +-- ql/termstructures/globalbootstrap.hpp | 22 +++++++++------------- 2 files changed, 10 insertions(+), 15 deletions(-) commit c2e2f07a811af23d67bbd2fa0463e04156b74867 Author: Peter Caspers Date: Sun, 26 Oct 2025 09:45:25 +0100 make class final ql/termstructures/globalbootstrap.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 41f0b952750daf76a3265bb1b535cc0da0d74e2b Author: Peter Caspers Date: Sat, 25 Oct 2025 16:13:43 +0200 fix test setup test-suite/piecewiseyieldcurve.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit b6f3538bb01d56701776c0e95503927c9931a509 Author: Peter Caspers Date: Sat, 25 Oct 2025 13:25:28 +0200 should be explicit ql/termstructures/globalbootstrap.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 56adfa9c264aa2b72ae9e078d5771a0995e98249 Author: Peter Caspers Date: Sat, 25 Oct 2025 12:42:45 +0200 init members ql/termstructures/globalbootstrap.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit aa3366889f789240ea1d5a6980c211f67a1c7723 Author: Peter Caspers Date: Sat, 25 Oct 2025 12:20:13 +0200 add unit test test-suite/piecewiseyieldcurve.cpp | 141 +++++++++++++++++++++++++++++++++++++ 1 file changed, 141 insertions(+) commit 0443b4ed1052bd2ec41df2561bf678e6e46f5990 Author: Peter Caspers Date: Sat, 25 Oct 2025 12:20:03 +0200 add multicurve QuantLib.vcxproj | 4 ++- QuantLib.vcxproj.filters | 8 ++++- ql/CMakeLists.txt | 2 ++ ql/termstructures/Makefile.am | 2 ++ ql/termstructures/multicurve.cpp | 71 ++++++++++++++++++++++++++++++++++++++++ ql/termstructures/multicurve.hpp | 69 ++++++++++++++++++++++++++++++++++++++ 6 files changed, 154 insertions(+), 2 deletions(-) commit 126d40fe220c7c1cd23abaab960d22d0f534fc1b Author: Peter Caspers Date: Sat, 25 Oct 2025 12:19:33 +0200 simplify ql/termstructures/globalbootstrap.cpp | 146 ++++++++++++++------------------- ql/termstructures/globalbootstrap.hpp | 147 ++++++++++++++-------------------- 2 files changed, 122 insertions(+), 171 deletions(-) commit 70d83d5b4cd64615019efb7e8ab7e42dd1ff00ef Author: Peter Caspers Date: Sat, 25 Oct 2025 12:19:16 +0200 add inspector ql/termstructures/yield/piecewiseyieldcurve.hpp | 1 + 1 file changed, 1 insertion(+) commit d734b6b9b58c12dd0250939f191c4e8d5dbc29b0 Author: paolodelia99 Date: Fri, 24 Oct 2025 23:56:15 +0200 Remove atm bs and atm market price, since they are the same ql/experimental/barrieroption/vannavolgabarrierengine.cpp | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) commit ca8d518c857d8667da402f97aa8294844561f73f Merge: a41624cfe 19c510204 Author: Luigi Ballabio Date: Fri, 24 Oct 2025 16:56:57 +0200 fix: clean up extra semicolon in output loops (#2355) commit 19c5102048bbb53b2f98931d9bbcbb6643fb02b7 Author: Luigi Ballabio Date: Fri, 24 Oct 2025 15:16:09 +0200 Fix indentation to avoid CI warning Examples/LatentModel/LatentModel.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit a41624cfe9e8ba88b59817de158b629f9e6c7142 Merge: a67b0dba4 4ae8dfcfe Author: Luigi Ballabio Date: Fri, 24 Oct 2025 15:01:12 +0200 Vanna-Volga (#2354) commit 5f6c9e0e55688e8545605a4124179e82cb5f76c0 Author: BabarZKhan <46613555+BabarZKhan@users.noreply.github.com> Date: Fri, 24 Oct 2025 12:11:57 +0200 fix: clean up extra semicolon in output loops I'm using QuantLib examples to deep-dive into QuantLib. While testing and understanding basic usage of a Latent variable model, I found some extra semicolons in nested loops. Yes, it is syntactically valid but serves no purpose. Examples/LatentModel/LatentModel.cpp | 2 -- 1 file changed, 2 deletions(-) commit 4ae8dfcfefd70e6c141a2c87c1afaf7b3e48cba3 Author: kp9991 Date: Wed, 22 Oct 2025 19:58:09 +1100 Vanna-Volga ql/pricingengines/bacheliercalculator.cpp | 21 ++++++++++++ ql/pricingengines/bacheliercalculator.hpp | 6 ++++ ql/pricingengines/blackcalculator.cpp | 32 +++++++++++++++++++ ql/pricingengines/blackcalculator.hpp | 6 ++++ test-suite/bacheliercalculator.cpp | 53 +++++++++++++++++++++++++++++++ test-suite/blackcalculator.cpp | 52 ++++++++++++++++++++++++++++++ 6 files changed, 170 insertions(+) commit a67b0dba4db6217ec5c48f324df382c7864f9198 Author: Luigi Ballabio Date: Tue, 21 Oct 2025 12:49:56 +0200 Update default Ubuntu image for CI builds .github/workflows/devenv-images.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit afd13138c17f64a8f6ded6b36dc1e0c1da919607 Merge: 81d4dd108 65074a39a Author: Luigi Ballabio Date: Mon, 20 Oct 2025 17:11:15 +0200 Add constructors with 2 dates for inflation swap helpers (#2351) commit 81d4dd10881d81593d30b2ca35fecba11f010e8a Merge: 10fa56041 948ff6fcc Author: Luigi Ballabio Date: Mon, 20 Oct 2025 12:26:29 +0200 Make PiecewiseSpreadYieldCurve::traits_type public (#2350) commit 10fa56041dd734e4356f3c907e51347170e7adfe Author: lballabio[bot] <224797326+lballabio-bot@users.noreply.github.com> Date: Sun, 19 Oct 2025 01:42:45 +0000 Automated fixes by clang-tidy test-suite/ultimateforwardtermstructure.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 65074a39a82810a7ac7ef6a23957294077129992 Author: Eugene Toder Date: Sat, 18 Oct 2025 19:18:59 -0400 Add constructors with 2 dates for inflation swap helpers ql/termstructures/inflation/inflationhelpers.cpp | 77 +++++++++++++++++++----- ql/termstructures/inflation/inflationhelpers.hpp | 40 +++++++++++- 2 files changed, 98 insertions(+), 19 deletions(-) commit 948ff6fccc4c61b2f6d790e25f61e9639b0b66d3 Author: Eugene Toder Date: Sat, 18 Oct 2025 17:19:19 -0400 Make PiecewiseSpreadYieldCurve::traits_type public This matches PiecewiseYieldCurve and is useful in some generic code. ql/termstructures/yield/piecewisespreadyieldcurve.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b8a116f59706c57f683cc0298cdbcd96f5e9446f Author: paolodelia99 Date: Fri, 17 Oct 2025 10:49:41 +0200 Small adjustments as suggested in the PR ql/cashflows/blackovernightindexedcouponpricer.hpp | 2 -- ql/cashflows/couponpricer.cpp | 18 ++++++++++-------- ql/cashflows/overnightindexedcouponpricer.cpp | 1 + 3 files changed, 11 insertions(+), 10 deletions(-) commit ae9d80438ac70e644eb97cbcff96e29cb928d057 Author: lballabio[bot] <224797326+lballabio-bot@users.noreply.github.com> Date: Wed, 15 Oct 2025 15:42:42 +0000 Update copyright list in license LICENSE.TXT | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0f8041b4cb0e5da5ec2e5799640f9b00b6baf99c Merge: 84b0e8ecc bccac7e14 Author: Luigi Ballabio Date: Wed, 15 Oct 2025 17:42:32 +0200 Enable rounding in UFR interpolation (#2342) commit bccac7e14ff917a9d4a8ee1d03bce3b4c337a94a Author: Luigi Ballabio Date: Wed, 15 Oct 2025 16:15:26 +0200 Expanded comment ql/termstructures/yield/ultimateforwardtermstructure.hpp | 8 ++++---- test-suite/ultimateforwardtermstructure.cpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) commit 84b0e8ecc99836c31a7350f9f68b0bf77be7d9ce Merge: 10f1dfd7e 6f379f4e9 Author: Luigi Ballabio Date: Tue, 14 Oct 2025 15:11:39 +0200 Remove features deprecated in version 1.36 (#2348) commit 10f1dfd7e076e540b2c855b7dd1a16789edd5666 Author: lballabio[bot] <224797326+lballabio-bot@users.noreply.github.com> Date: Tue, 14 Oct 2025 08:47:55 +0000 Set version to 1.41-dev CMakeLists.txt | 6 +++--- configure.ac | 2 +- ql/version.hpp | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) commit bcd4d3b7d8eb2502b486930d1b0db50468f6be45 Author: Luigi Ballabio Date: Tue, 14 Oct 2025 09:39:51 +0200 Removed deprecated macos-13 runner from CI builds .github/workflows/cmake-latest-runners.yml | 1 - .github/workflows/macos-nondefault.yml | 2 +- .github/workflows/macos.yml | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) commit 976baa9f6b6626da2e796fa59d78c5608725a296 Author: Luigi Ballabio Date: Tue, 14 Oct 2025 09:59:51 +0200 Add workflow to increase version number after release .github/workflows/increase-version-number.yml | 40 +++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) commit 463fbded733c90120dc2c24b2e1b22dd98dc18ca Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Oct 2025 11:48:14 +0000 Bump github/codeql-action from 3 to 4 Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3 to 4. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/v3...v4) --- updated-dependencies: - dependency-name: github/codeql-action dependency-version: '4' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] .github/workflows/codeql-analysis.yml | 6 +++--- .github/workflows/msvc-analysis.yml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit 6f379f4e9dea16419365f6c64dae8f9106f51f78 Author: Luigi Ballabio Date: Mon, 8 Sep 2025 17:24:56 +0200 Remove features deprecated in version 1.36 QuantLib.vcxproj | 6 - QuantLib.vcxproj.filters | 18 -- cmake/GenerateHeaders.cmake | 9 +- ql/CMakeLists.txt | 6 - ql/Makefile.am | 2 + ql/cashflows/capflooredinflationcoupon.hpp | 23 -- ql/cashflows/conundrumpricer.cpp | 2 +- ql/cashflows/yoyinflationcoupon.cpp | 25 -- ql/cashflows/yoyinflationcoupon.hpp | 25 -- ql/experimental/Makefile.am | 2 - ql/experimental/averageois/Makefile.am | 30 +- ql/experimental/averageois/all.hpp | 3 - .../averageois/arithmeticaverageois.cpp | 150 --------- .../averageois/arithmeticaverageois.hpp | 95 +----- .../averageois/arithmeticoisratehelper.cpp | 113 ------- .../averageois/arithmeticoisratehelper.hpp | 69 +--- .../averageois/averageoiscouponpricer.hpp | 28 -- .../averageois/makearithmeticaverageois.cpp | 241 -------------- .../averageois/makearithmeticaverageois.hpp | 83 +---- .../perturbativebarrieroptionengine.cpp | 2 +- ql/experimental/credit/gaussianlhplossmodel.hpp | 2 +- ql/experimental/credit/pool.cpp | 2 +- .../credit/randomdefaultlatentmodel.hpp | 2 +- ql/experimental/credit/saddlepointlossmodel.hpp | 2 +- .../finitedifferences/fdmvppstepcondition.hpp | 2 +- .../inflation/yoycapfloortermpricesurface.cpp | 17 - .../inflation/yoycapfloortermpricesurface.hpp | 63 ---- ql/experimental/inflation/yoyoptionlethelpers.cpp | 14 - ql/experimental/inflation/yoyoptionlethelpers.hpp | 16 +- .../gaussiannoncentralchisquaredpolynomial.cpp | 2 - .../gaussiannoncentralchisquaredpolynomial.hpp | 2 +- ql/experimental/math/multidimintegrator.hpp | 2 +- ql/experimental/math/multidimquadrature.hpp | 2 +- ql/experimental/math/tcopulapolicy.hpp | 2 +- .../mcbasket/longstaffschwartzmultipathpricer.hpp | 2 +- ql/experimental/models/normalclvmodel.hpp | 2 +- ql/experimental/models/squarerootclvmodel.hpp | 2 +- .../processes/extendedornsteinuhlenbeckprocess.hpp | 2 +- ql/experimental/risk/Makefile.am | 28 +- ql/experimental/risk/all.hpp | 2 - ql/experimental/risk/creditriskplus.cpp | 240 -------------- ql/experimental/risk/creditriskplus.hpp | 74 +---- ql/experimental/risk/sensitivityanalysis.cpp | 350 --------------------- ql/experimental/risk/sensitivityanalysis.hpp | 198 +----------- .../generalizedornsteinuhlenbeckprocess.hpp | 2 +- .../integralhestonvarianceoptionengine.cpp | 2 +- ql/functional.hpp | 50 +-- ql/indexes/equityindex.cpp | 12 - ql/indexes/equityindex.hpp | 10 - ql/instruments/makeyoyinflationcapfloor.cpp | 7 - ql/instruments/makeyoyinflationcapfloor.hpp | 10 +- ql/instruments/yearonyearinflationswap.cpp | 16 - ql/instruments/yearonyearinflationswap.hpp | 18 +- ql/math/integrals/integral.hpp | 2 +- ql/math/integrals/kronrodintegral.hpp | 2 +- ql/math/integrals/twodimensionalintegral.hpp | 2 +- ql/math/interpolations/chebyshevinterpolation.hpp | 2 +- ql/math/linearleastsquaresregression.hpp | 2 +- ql/math/matrixutilities/bicgstab.hpp | 2 +- ql/math/matrixutilities/gmres.hpp | 3 +- ql/math/matrixutilities/tapcorrelations.hpp | 2 +- ql/math/ode/adaptiverungekutta.hpp | 2 +- ql/math/optimization/levenbergmarquardt.cpp | 2 +- ql/math/optimization/levenbergmarquardt.hpp | 6 - ql/math/optimization/lmdif.hpp | 2 +- .../randomnumbers/stochasticcollocationinvcdf.hpp | 2 +- ql/math/richardsonextrapolation.hpp | 2 +- .../meshers/concentrating1dmesher.hpp | 4 +- .../operators/numericaldifferentiation.hpp | 2 +- .../schemes/impliciteulerscheme.cpp | 2 +- .../finitedifferences/schemes/trbdf2scheme.hpp | 2 +- .../utilities/escroweddividendadjustment.hpp | 2 +- .../utilities/fdminnervaluecalculator.hpp | 2 +- .../utilities/fdmmesherintegral.hpp | 2 +- .../utilities/fdmtimedepdirichletboundary.hpp | 2 +- ql/methods/montecarlo/earlyexercisepathpricer.hpp | 2 +- .../montecarlo/longstaffschwartzpathpricer.hpp | 2 +- ql/methods/montecarlo/lsmbasissystem.hpp | 2 +- .../basket/mcamericanbasketengine.hpp | 3 +- ql/pricingengines/vanilla/analytichestonengine.cpp | 4 +- ql/pricingengines/vanilla/analytichestonengine.hpp | 2 +- .../vanilla/exponentialfittinghestonengine.cpp | 2 +- ql/quantlib.hpp | 2 - ql/termstructures/globalbootstrap.hpp | 2 +- ql/termstructures/inflation/inflationhelpers.cpp | 13 - ql/termstructures/inflation/inflationhelpers.hpp | 13 - .../inflation/piecewisezeroinflationcurve.hpp | 2 +- .../equityfx/andreasenhugevolatilityinterpl.hpp | 3 +- .../equityfx/gridmodellocalvolsurface.cpp | 2 +- ql/timeseries.hpp | 2 +- ql/tuple.hpp | 34 +- test-suite/CMakeLists.txt | 1 - test-suite/Makefile.am | 1 - test-suite/creditriskplus.cpp | 132 -------- test-suite/testsuite.vcxproj | 1 - test-suite/testsuite.vcxproj.filters | 3 - 96 files changed, 81 insertions(+), 2287 deletions(-) commit 3bdcb6e8211f110152b73b20386f9fb1cfc0019d Author: Luigi Ballabio Date: Tue, 14 Oct 2025 09:34:12 +0200 Fix link in draft release notes .github/workflows/publish-release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d7f10e50521c00a3e597d725358650499f4650a2 Author: Peter Caspers Date: Sun, 12 Oct 2025 12:10:32 +0200 make ctor explicit ql/termstructures/globalbootstrap.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e4df62a83429eaa705b308a9b2ade6ce66e5fc2f Author: Peter Caspers Date: Sun, 12 Oct 2025 12:05:26 +0200 remove debug output ql/termstructures/globalbootstrap.hpp | 2 -- 1 file changed, 2 deletions(-) commit 654f421be4f6cabffa1e7a0863f8b3502979468e Author: Peter Caspers Date: Sun, 12 Oct 2025 11:51:00 +0200 fix ql/termstructures/globalbootstrap.hpp | 64 +++++++++++++++++------------------ 1 file changed, 31 insertions(+), 33 deletions(-) commit bd1eaf827ce2bdd17ce8bdee03a15ea1c00557e8 Author: Peter Caspers Date: Sat, 11 Oct 2025 20:25:32 +0200 update msvc files QuantLib.vcxproj | 1 + QuantLib.vcxproj.filters | 3 +++ 2 files changed, 4 insertions(+) commit 60f917289189d7badeafa71a6bb5a29f3fbbcdc9 Author: Peter Caspers Date: Sat, 11 Oct 2025 20:17:03 +0200 add multicurve bootstrap ql/CMakeLists.txt | 1 + ql/patterns/lazyobject.hpp | 6 ++ ql/termstructures/Makefile.am | 1 + ql/termstructures/globalbootstrap.cpp | 128 ++++++++++++++++++++++++ ql/termstructures/globalbootstrap.hpp | 177 ++++++++++++++++++++++++++-------- 5 files changed, 273 insertions(+), 40 deletions(-) commit 12f9d137cf875b35b6ea2d6c452ed279c5bdc04b Author: paolodelia99 Date: Fri, 10 Oct 2025 18:24:23 +0200 ovveride cap/floorletRate(Real, bool) and in direct childs ql/cashflows/overnightindexedcouponpricer.hpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 87f381bc07ff69f3c1ae7317bfa8b10e5620b6c5 Author: paolodelia99 Date: Fri, 10 Oct 2025 18:14:52 +0200 use ext::dynamic_pointer_cast ql/cashflows/overnightindexedcoupon.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 972bace443e4a75ad9c7477dfb3046f6d123da9e Author: paolodelia99 Date: Fri, 10 Oct 2025 17:15:42 +0200 Fix compilation error, overload virtual functions ql/cashflows/overnightindexedcouponpricer.hpp | 2 ++ 1 file changed, 2 insertions(+) commit 40fb3278ab2c92517df892f63f83694c2c477c1f Author: paolodelia99 Date: Fri, 10 Oct 2025 17:11:00 +0200 Make onIndexedCouponPricer the base class for the blackONPricers, adj inheritance among those classes ql/cashflows/blackovernightindexedcouponpricer.cpp | 12 ++--- ql/cashflows/blackovernightindexedcouponpricer.hpp | 10 ++-- ql/cashflows/couponpricer.cpp | 20 ++++--- ql/cashflows/overnightindexedcoupon.cpp | 23 +++++--- ql/cashflows/overnightindexedcoupon.hpp | 7 ++- ql/cashflows/overnightindexedcouponpricer.cpp | 61 +++++++++++----------- ql/cashflows/overnightindexedcouponpricer.hpp | 56 +++++++++----------- 7 files changed, 99 insertions(+), 90 deletions(-) commit 04521a414bbf0fd12d115174d9ddde01c42750f9 Author: Marcin Rybacki Date: Wed, 8 Oct 2025 12:27:29 +0200 Incorporated PR feedback. .../yield/ultimateforwardtermstructure.hpp | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) commit 469e542cd16e8d45c8f3d646523d2eb8993aa8e8 Author: Marcin Rybacki Date: Wed, 8 Oct 2025 11:42:02 +0200 Calculate equivalent rates only when compounding different than continuous. .../yield/ultimateforwardtermstructure.hpp | 21 +++-- test-suite/ultimateforwardtermstructure.cpp | 95 +++++++++------------- 2 files changed, 54 insertions(+), 62 deletions(-) commit d4326f5e41fe312367071db406e29fff7e8f701a Author: Marcin Rybacki Date: Tue, 7 Oct 2025 17:05:50 +0200 Use camel-case naming. ql/termstructures/yield/ultimateforwardtermstructure.hpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 50fed27595f5e4826ca8908ed4150b71dc8a4099 Author: Marcin Rybacki Date: Tue, 7 Oct 2025 16:56:56 +0200 Adjusted indentation. ql/termstructures/yield/ultimateforwardtermstructure.hpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 961c1db60ab185f29afe0c8e120c47ac8e33ad69 Author: Marcin Rybacki Date: Tue, 7 Oct 2025 16:54:53 +0200 Updated docstring. ql/termstructures/yield/ultimateforwardtermstructure.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3f6d9e60fec79aaccd9f07c7515e8f1908a2698f Author: Marcin Rybacki Date: Tue, 7 Oct 2025 16:52:35 +0200 Enabled rounding in UFR interpolation .../yield/ultimateforwardtermstructure.hpp | 52 +++++++++++++++++----- test-suite/ultimateforwardtermstructure.cpp | 41 +++++++++++++++++ 2 files changed, 83 insertions(+), 10 deletions(-) commit 9ad665a3f2d8557406021bb36079ddf2814d105b Author: paolodelia99 Date: Sat, 4 Oct 2025 17:39:52 +0200 made some ctors explicit ql/cashflows/blackovernightindexedcouponpricer.hpp | 4 ++-- ql/cashflows/overnightindexedcoupon.hpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit c84af72c7acb3d19d09d569af02e8a0c4b456057 Author: paolodelia99 Date: Sat, 4 Oct 2025 16:59:10 +0200 Adjustements to the ON coupon pricers class as suggested ql/cashflows/blackovernightindexedcouponpricer.cpp | 151 +++++++++++---------- ql/cashflows/blackovernightindexedcouponpricer.hpp | 26 ++-- ql/cashflows/overnightindexedcoupon.cpp | 25 ++-- ql/cashflows/overnightindexedcoupon.hpp | 3 + ql/cashflows/overnightindexedcouponpricer.cpp | 52 ++++--- ql/cashflows/overnightindexedcouponpricer.hpp | 83 +++++++---- test-suite/overnightindexedcoupon.cpp | 7 + 7 files changed, 215 insertions(+), 132 deletions(-) commit 25c0cd5b507b50d4bd9f5904f863375b3fb1bb1e Author: Luigi Ballabio Date: Wed, 3 Sep 2025 10:16:42 +0200 Initialize flags properly ql/cashflows/overnightindexedcoupon.hpp | 4 ++-- test-suite/overnightindexedcoupon.cpp | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) commit db54efa4a881698b3b0706040e1e07f0f92d05ee Author: paolodelia99 Date: Sun, 31 Aug 2025 12:27:51 +0200 More realistic tests when calculating ON leg npv test-suite/overnightindexedcoupon.cpp | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) commit cf0670779074dd4b7b83edbe9593710edbfb04c3 Author: paolodelia99 Date: Fri, 29 Aug 2025 22:40:01 +0200 add a futher cap and floor rate to match the schedule size in the tests test-suite/overnightindexedcoupon.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a16c479b591606d0d6b58e16836f16740d50066a Author: paolodelia99 Date: Fri, 22 Aug 2025 19:07:50 +0200 Fix at par Coupon error test-suite/overnightindexedcoupon.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit c4deaad8bc6adfc423c989fb5a01bdbebd310ebb Author: paolodelia99 Date: Fri, 22 Aug 2025 18:18:28 +0200 add test for capped-floored on coupons and leg ql/cashflows/blackovernightindexedcouponpricer.hpp | 1 + test-suite/overnightindexedcoupon.cpp | 96 ++++++++++++++++++++-- 2 files changed, 89 insertions(+), 8 deletions(-) commit fabeac9063cdbd2adda540c65002dca9130b9a30 Author: paolodelia99 Date: Fri, 22 Aug 2025 11:48:01 +0200 removed redundant attributes, add first test for black pricer and reformat code ql/cashflows/blackovernightindexedcouponpricer.cpp | 846 +++++++++++---------- ql/cashflows/blackovernightindexedcouponpricer.hpp | 104 +-- ql/cashflows/overnightindexedcoupon.cpp | 5 +- ql/cashflows/overnightindexedcoupon.hpp | 10 +- ql/cashflows/overnightindexedcouponpricer.hpp | 20 +- test-suite/overnightindexedcoupon.cpp | 67 ++ 6 files changed, 568 insertions(+), 484 deletions(-) commit 8081384bf8fffa41c6a98f06a11e90470c46cc23 Author: paolodelia99 Date: Tue, 19 Aug 2025 09:32:44 +0200 Removed pragma once and use ifdef ql/cashflows/blackovernightindexedcouponpricer.hpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit c8a9a430508aa3efab60a0874ea406b07676b140 Author: paolodelia99 Date: Tue, 19 Aug 2025 09:19:05 +0200 Fix typo in vcxproj file QuantLib.vcxproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5092a673ab17fdfc832bc212dd10c6d898fb58ca Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 19 Aug 2025 07:18:14 +0000 Update copyright list in license LICENSE.TXT | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1dc90fded9b6b775b3c227ff495a2e31dcc021f2 Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 18 Aug 2025 21:32:10 +0000 Update generated headers ql/cashflows/all.hpp | 1 + 1 file changed, 1 insertion(+) commit 121b3f38bce0ce7643f11350fa744b48e212764e Author: paolodelia99 Date: Mon, 18 Aug 2025 23:29:53 +0200 Added blackovernigthindexedcouponpricer and updated pricesetter methods QuantLib.vcxproj | 2 + QuantLib.vcxproj.filters | 6 + ql/CMakeLists.txt | 2 + ql/cashflows/Makefile.am | 2 + ql/cashflows/blackovernightindexedcouponpricer.cpp | 511 +++++++++++++++++++++ ql/cashflows/blackovernightindexedcouponpricer.hpp | 85 ++++ ql/cashflows/couponpricer.cpp | 33 ++ ql/cashflows/overnightindexedcoupon.cpp | 15 +- ql/cashflows/overnightindexedcoupon.hpp | 13 +- 9 files changed, 663 insertions(+), 6 deletions(-) commit 633167fc20e93cc18ddf1b85d93419f5eade21a5 Author: paolodelia99 Date: Sun, 10 Aug 2025 12:03:50 +0200 Fix tolerance in overnightleg test test-suite/overnightindexedcoupon.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 85216a2c0dc1eda7aeede1c2ff9dd8dff722a72e Author: paolodelia99 Date: Thu, 7 Aug 2025 18:05:43 +0200 Add test for the overnightLeg ql/cashflows/overnightindexedcoupon.cpp | 18 +- ql/cashflows/overnightindexedcoupon.hpp | 5 +- ql/cashflows/overnightindexedcouponpricer.cpp | 3 +- test-suite/overnightindexedcoupon.cpp | 349 ++++++++++++++++++++++++++ 4 files changed, 367 insertions(+), 8 deletions(-) commit 93e3a241cededb251d81574cc7163fead74f37ed Author: paolodelia99 Date: Thu, 7 Aug 2025 12:18:03 +0200 First alignment ORE/QL ON coupon and ON coupon pricer ql/cashflows/overnightindexedcoupon.cpp | 337 +++++++++++++++++++++++++- ql/cashflows/overnightindexedcoupon.hpp | 110 ++++++++- ql/cashflows/overnightindexedcouponpricer.cpp | 92 ++++++- ql/cashflows/overnightindexedcouponpricer.hpp | 23 ++ 4 files changed, 538 insertions(+), 24 deletions(-) QuantLib-1.41/Contributors.txt000066400000000000000000000126511513115055600164230ustar00rootroot00000000000000We gratefully acknowledge contributions from (in alphabetical order): Nathan Abbott, Samad Abdessadki, Kakhkhor Abdijalilov, Xavier Abulker, Toyin Akin, Marius Akre, Mario Aleppo, Ferdinando Ametrano, Imrane Amri, Jongbong An, Tom Anderson, Grzegorz Andruszkiewicz, Ignacio Anguita, Fanis Antoniou, Driss Aouad, Jose Aparicio, Sergio Araujo, Leonardo Arcari, Sercan Atalik, F. Eugene Aumson, Ahmed Ayadi, Arnaud Baguet, Lluis Pujol Bajador, Gerardo Ballabio, Luigi Ballabio, Jonathan Barber, Nabila Barkati, Riccardo Barone, Clément Barret, Christopher Baus, Thomas Becker, Michaël Benguigui, Adolfo Benin, Hachemi Benyahia, Luca Berardi, Nicholas Bertocchi, Sylvain Bertrand, Manas Bhatt, Marco Bianchetti, David Binderman, Theo Boafo, Marcin Bogusz, Francois Botha, Delphine Bouthier, Fakher Braham, Nathaniel Brough, Ole Bueker, Joe Byers, Xavier Caron, Marine Casanova, Peter Caspers, Antoine Cellerier, Yee Man Chan, Aurelien Chanudet, Yiping Chen, Yanice Cherrak, Gualtiero Chiaia, Meryem Chibo, Warren Chou, Scott Condit, Marco Craveiro, Paolo D'Elia, Stephen Dacek, Jon Davidson, William Day, Daniele De Francesco, Frédéric Degraeve, Piero Del Boca, Mike DelMedico, Barry Devlin, Nicolas Di Césaré, Lucas Dias, Piter Dias, Binrui Dong, Jacques du Toit, François du Vignaud, Francis Duffy, Cristina Duminuco, Jan Ladislav Dussek, Ralf Konrad Eckel, Dirk Eddelbuettel, Faycal El Karaa, Joshua Engelman, Bernd Engelmann, Giorgio Facchinetti, Matt Fair, Kareem Fareed, Paul Farrington, Lorella Fatone, Isuru Fernando, Luca Ferraro, Marco Bruno Ferreira Vasconcellos, Davide Ferretti, Neil Firth, Stefano Fondi, Chiara Fornarola, Silvia Frasson, Rémy Frèrebeau, Andreas Gaida, Matteo Gallivanoni, Jose Garcia, Lakshay Garg, Fredrik Gerdin Börjesson, Riccardo Ghetta, Hoang Giap Vu, Ryan Gibson, Jack Gillett, Paul Giltinan, Roman Gitlin, Nick Glass, Marek Glowacki, Dmitri Goloubentsev, Richard Gomes, Johannes Göttker-Schnetmann, Henri Gough, Richard Gould, Eleanor Green, Florent Grenier, Matthias Groncki, Sebastien Gurrieri, Tawanda Gwena, Cavit Hafizoglu, Lew Wei Hao, Joshua Hayes, Michael Heckl, Jake Heke, Andres Hernandez, Chris Higgs, Laurent Hoffmann, Xiangyu Hong, Guillaume Horel, Benoît Houzelle, Frank Hövermann, Daniel Hrabovcak, Shen Hui, Charles Chongseok Hyun, Simon Ibbotson, Alexey Indiryakov, Norbert Irmer, Mike Jake, Nicola Jean, Joseph Jeisman, Yi Jiang, Tomas Kalibera, Rahul Kanchi, Roland Kapl, Andrey Karpov, Michal Kaut, Tomoya Kawanishi, Gary Kennedy, Chris Kenyon, Babar Khan, Oleksandr Khomenko, Joel King, Kevin Kirchhoff, Matt Knox, Matthew Kolbe, Andrew Kolesnikov, Nijaz Kovacevic, Philip Kovacs, Zak Kraehling, Silakhdar Krikeb, Pradeep Krishnamurthy, Nathan Kruck, Yan Kuang, Werner Kuerzinger, Oleg Kulkov, Allen Kuo, Christian Köhnenkamp, Mickael Anas Laaouini, Paul Laderoute, Yasmine Lahlou, Alix Lassauzet, Fabien Le Floc'h, Fabrice Lecuyer, James Lee, Jonghee Lee, Ka Wai Lee, Jacob Lee-Howes, Samuel Lerouge, Bernd Lewerenz, Patrick Lewis, Cheng Li, Gang Liang, Roland Lichters, Kai Lin, Hank Liu, Robert Lopez, André Louw, Benson Luk, Matthias Lungwitz, Jasen Mackie, Trent Maetzold, Andrea Maffezzoli, Joao Paulo Magalhaes, Jose Magana, Andrea Maggiulli, John Maiden, Katiuscia Manzoni, Marco Marchioro, Francesca Mariani, Daniel Martinez Davies, Slava Mazur, Paolo Mazzocchi, Siddharth Mehrotra, Magnus Mencke, Enrico Michelotti, Andre Miemiec, Raso Mirko, Radu Mondescu, Bryte Morio, Bart Mosley, Tiziano Müller, Joan Carlos Naftanaila, Prince Nanda, Dmitri Nesteruk, Billy Ng, Bojan Nikolic, Jean Nkeng, Robin Northcott, Konstantin Novitsky, Nikolai Nowaczyk, Adrian O'Neill, Andrea Odetti, Cay Oest, Hiroto Ogawa, Anubhav Pandey, Sotirios Papathanasopoulos, Krishn Parasar, Mike Parker, Giorgio Pazmandi, Guillaume Pealat, Gilbert Peffer, Andrea Pellegatta, Ignacio Peña, Walter Penschke, Francesco Perissin, Robert Philipp, Marcello Pietrobon, Adrien Pinatton, Gianni Piolanti, Vladimir Polin, Sebastian Poloczek, Berat Postalcioglu, Nolan Potier, Mario Pucci, Ian Qsong, Paul Rädle, Alexandre Radicchi, J. Erik Radmall, Ilyas Rahbaoui, Fabio Ramponi, Hristo Raykov, Maria Cristina Recchioni, Simon Rees, Dimitri Reiswich, Sadruddin Rejeb, Martin Ross, Alessandro Roveda, Ryan Russell, Marcin Rybacki, Mohamed Amine Sadaoui, Amine Samani, David Sansom, Alpha Sanou Toure, Tamas Sashalmi, Sebastian Schlenkrich, Peter Schmitteckert, Ralph Schreyer, Leander Schulten, David Schwartz, Benjamin Schwendinger, Henning Segger, Carlos Fidel Selva Ochoa, Giacomo Sergio, Simon Shakeshaft, Michael Sharpe, Kirill Shemyakin, Eugene Shevkoplyas, Mohammad Shojatalab, Anastasiia Shumyk, Piotr Siejda, Matthias Siemering, Adityakumar Sinha, Gyan Sinha, Enrico Sirola, Leon Sit, Wojciech Slusarski, Andrew Smith, Dale Smith, Tim Smith, Maxim Sokolov, Prasad Somwanshi, Niels Elken Sønderby, Klaus Spanderen, Andreas Spengler, Roland Stamm, Weston Steimel, Philip Stephens, Kai Striega, Jonathan Sweemer, Edouard Tallent, Eisuke Tani, Marco Tarenghi, Ryan Taylor, Yue Tian, Eugene Toder, Steven Van Haren, Jayanth R. Varma, Michael von den Driesch, Joseph Wang, Qingxiao Wang, Tony Wang, Charles Whitmore, Tomass Wilson, Stephen Wong, Krzysztof Wos, Bernd Johannes Wuebben, Sun Xiuxin, Frank Xue, Jeff Yu, Maddalena Zanzi, Li Zhong, Viktor Zhou, Francesco Zirilli, and Roy Zywina. QuantLib includes code taken from Peter Jäckel's book "Monte Carlo Methods in Finance". QuantLib includes software developed by the University of Chicago, as Operator of Argonne National Laboratory. QuantLib-1.41/Docs/000077500000000000000000000000001513115055600140505ustar00rootroot00000000000000QuantLib-1.41/Docs/Makefile.am000066400000000000000000000020631513115055600161050ustar00rootroot00000000000000 EXTRA_DIST = \ quantlib.doxy \ quantlibextra.css \ quantlibfooter.html \ quantlibheader.html DOXYGEN_CONFIG := quantlib.doxy DOXYGEN_CUSTOM := quantlibextra.css quantlibheader.html quantlibfooter.html DOXYGEN_INPUT := $(shell find ${top_srcdir} -name *.hpp) \ $(wildcard pages/*.docs) BASEPATH = $(shell cd @abs_top_srcdir@ && pwd) .PHONY: docs docs-clean dist-hook: mkdir -p $(distdir)/pages $(distdir)/images cp -p $(srcdir)/pages/*.docs $(distdir)/pages cp -p $(srcdir)/images/*.jpg \ $(srcdir)/images/*.ico \ $(distdir)/images docs: .time-stamp clean-local: rm -Rf html rm -f .time-stamp .time-stamp: $(DOXYGEN_CONFIG) $(DOXYGEN_CUSTOM) $(DOXYGEN_INPUT) ../LICENSE.TXT cp -p ${top_srcdir}/LICENSE.TXT ${top_srcdir}/Contributors.txt . $(SED) -e "s|ql_basepath|${BASEPATH}/|" \ -e "s|ql_version|$(VERSION)|" \ ${srcdir}/quantlib.doxy > .quantlib.doxy $(DOXYGEN) .quantlib.doxy rm -f .quantlib.doxy rm -f html/*.md5 rm -f html/*.map touch .time-stamp QuantLib-1.41/Docs/images/000077500000000000000000000000001513115055600153155ustar00rootroot00000000000000QuantLib-1.41/Docs/images/QL-title.jpg000066400000000000000000000277711513115055600174700ustar00rootroot00000000000000JFIFHH XICC_PROFILE HLinomntrRGB XYZ  1acspMSFTIEC sRGB-HP cprtP3desclwtptbkptrXYZgXYZ,bXYZ@dmndTpdmddvuedLview$lumimeas $tech0 rTRC< gTRC< bTRC< textCopyright (c) 1998 Hewlett-Packard CompanydescsRGB IEC61966-2.1sRGB IEC61966-2.1XYZ QXYZ XYZ o8XYZ bXYZ $descIEC http://www.iec.chIEC http://www.iec.chdesc.IEC 61966-2.1 Default RGB colour space - sRGB.IEC 61966-2.1 Default RGB colour space - sRGBdesc,Reference Viewing Condition in IEC61966-2.1,Reference Viewing Condition in IEC61966-2.1view_. \XYZ L VPWmeassig CRT curv #(-27;@EJOTY^chmrw| %+28>ELRY`gnu| &/8AKT]gqz !-8COZfr~ -;HUcq~ +:IXgw'7HYj{+=Oat 2FZn  % : O d y  ' = T j " 9 Q i  * C \ u & @ Z t .Id %A^z &Ca~1Om&Ed#Cc'Ij4Vx&IlAe@e Ek*Qw;c*R{Gp@j>i  A l !!H!u!!!"'"U"""# #8#f###$$M$|$$% %8%h%%%&'&W&&&''I'z''( (?(q(())8)k))**5*h**++6+i++,,9,n,,- -A-v--..L.../$/Z///050l0011J1112*2c223 3F3334+4e4455M555676r667$7`7788P8899B999:6:t::;-;k;;<' >`>>?!?a??@#@d@@A)AjAAB0BrBBC:C}CDDGDDEEUEEF"FgFFG5G{GHHKHHIIcIIJ7J}JK KSKKL*LrLMMJMMN%NnNOOIOOP'PqPQQPQQR1R|RSS_SSTBTTU(UuUVV\VVWDWWX/X}XYYiYZZVZZ[E[[\5\\]']x]^^l^__a_``W``aOaabIbbcCccd@dde=eef=ffg=ggh?hhiCiijHjjkOkklWlmm`mnnknooxop+ppq:qqrKrss]sttptu(uuv>vvwVwxxnxy*yyzFz{{c{|!||}A}~~b~#G k͂0WGrׇ;iΉ3dʋ0cʍ1fΏ6n֑?zM _ɖ4 uL$h՛BdҞ@iءG&vVǥ8nRĩ7u\ЭD-u`ֲK³8%yhYѹJº;.! zpg_XQKFAǿ=ȼ:ɹ8ʷ6˶5̵5͵6ζ7ϸ9к<Ѿ?DINU\dlvۀ܊ݖޢ)߯6DScs 2F[p(@Xr4Pm8Ww)KmCC2" =  !#89x"Qv12ATWw3!"#21$36ABt%QSq ?3ϔ²Ec='[LM斀%꭯J4r{[F~WkioT]cr{U+)w`ܰ3Yi\gebBYKɟ3%l܂wqckNt*s4;M{˦CմhFJ'8YYj=dN?1핀/R媓`ĉ*gMDwIg ō{驮ںYRbxm1 VR*f5͈/-3`Q^K#‹[v VIk*՚j\,ԕA4K|ș B=''`^q2 w_0Sna I}A&(rs4Ŷ1"p.ƣDG,=Ƕvݹu:ݵ8\AH^jMPfMervHKLqEWG∶l¬``"w=ź -8V?BT*Ov,*I`$Z?HYaG}v nd9ƧC[ludl$Y{eϾ ߊ͟xyaQ-,`vs7GDF&%'2VO4Oܫf%jhFT$҅Muv*f@^__GTYQý\7%|/*h k`֍ѵIR )09wYqVh]J:jГ߸~oxG8NME^IP2r\j ;!%^~Bl[0YmfVl:|1kBZik@ґ1 >O:EЁ{Β&vvaOY[ށ8GjȓT_5gpʆj ؂.ĖOZrؾbLxdsSmcBn kVrNJ#tRN5WxfP[ZdUd~GK}s/ 05؜#l-,zeouf]iTg5 = S>UX8Qd7þ5('ygNÑWmKE}tl3韮1n6_w|tp3r8=6 1wok??kÕf|(ǣPLa >>=vQv"Q՘FFRZP*eMܷm.+leQYO5yojJ$8`^@CDX-+{Z1GRme/9ig)/rC@ä6# P10#t"̹CVvZ0,^>n@VffiD"6rRvtg$J=#.TwQ|n^Ek1Dqi91gNkGug0[ȼFLK[jZrWξ Y34IxrЦ D#߾(x"@=* c D_wk!a,6Ms75Msb渵omƘ?]/t{b(fz'6 N.1^""WK5٦8pq?'9lmgY]2aG:y4 P'o2D9N[*)jʂo*{=87.ɸKؼDĿRF3}e1xK+3PC `  혼Bd4j'dt :$՗8e iکD5 T~i:&bѬZ7`͈H@8[2k 6t5u'ky8{]d{l嗤9]IZ+y_g+*xˤIe#T9ZOD]mM@[h氩t;!:4W]>hd[vOI Ux?s;k {Rɑ&p)'׫s=m_`C]Hg GәBUV#e@r'qԲ! {pk1HN Yt\&`8"/J|c%İ3Lu]&1Ylq lQ} 6~~p5QR}r&9Ů9oɢ3v||!Q\> k_ A7 2)$_r ҵI"{u!Ca4᳽Ƌ !E j|N/6Hoa <^iN3fuhA'-K,SHd|UJ?Khgd)XXZ>2Y+Tf Z2BNFlvRWQΝx1x1GeQHcjK< .Ǘ PZ 0w 0YVQ'*$|}H3nЫKuOV6*|z'>\ַɜsqYg9AAı.Fi4}3|'7ITM7Z_"^Pp(!HDOF;XPFEכ>ER+LY 4o xl,؅reh4SN|c¬M9$ŜZ wa17_I`!u\=ۃd2b<20.#%VEbT҅,Q_ݗP.!݁wHC(v5ù[أ2vyc"|rijgnVeU+8sÐJGriJ ֫M5 }Cr}]rs)J3 tm-ْ]f,9,ctUC O3OyW0[:eTQS^;~ԨPoQCEp [*(i_}ր?RaFBe'â%Pq|=k0EfV:ȂJhħAH]2)㢲aIt>l600(_9ny=`m$q ޳,N3 Nt4I3h/s[7_xoE8_ۗlV(TUW[(axO߮خw'թv[H0x(38V ]|mzR$ѦOIM:A=}W5HrqJj]WQFˍ++MM n"e)p=UM:ׂIrJ7(ci_??cEzQZgޏ8DRFLPŰ WNHҢjG ,䦇XF#.E=KOvr-G:Gq?_"ev$}r24^yrZpQF>K:-p< `:Nm̭K,?Qm2j("=|)У^ءq;5s.7y(XnZgKZN3f (be˜5!}chɢIgTvµlul~$c0[z'/IHI#Z8<ڢ`QP4xDhypG o N )qð0L&R#5Xl-?ePE"صt;G6u)sr/&)w?TZӱ9鬥şEk;ӗ> t 6ED>tgsUV!0bO d@)I6l%Srсjΰ?fL.(qWj'7kOns8&Ćf,Z,ݒMXapO *Y4Dlj _LM=4dT-;qW2@Kf-?l31V1W EDž7S]sC z LjWDr? % 0>03AO^ç%p _z<^*jd6諈$ r#|їZ#~@fPUfDWOn֭/0ijf߫^VBШ9ZOzcv$eV|ei<):03‚ xtKxDwbY>;46.4n2BO $;cY"m"xF)2mPG4g3=N|/ե+-{x^ra+"?ƽ4m4&'ofnFSw&(U(+RIkNi\enc gyUVsY'u]C3M4C6 >M LJxx#_c=/g~ZV޽.4[ʼ%F,V`fĐQf;'vҢ^hX?W*(~ESGYQE&vyp%nJK&+L1n Q*#t3yVy9GyŞ[w#8b+S;v]'4i(•4T$B7MýzP/fr{?+SzpLXNMBϠ+UkqXQpmkN`E@E#Cۺ3Nتӎ8 r_Ii:mjХK ' f؝vO%_O]jv?LqժԄ~?B.*XN@(%Q믰+gZymV#Wa& B0IaD=գwhAnuI 'UwNq괤]rSUC )/T[PxxȨ x'[:Z$i1btQFHO>ט}?)/jT @>(Xv-7+&Je} eRIo U 0 "&QR9WFb}f**V6i]l1;/FтqfTQ4w`o-]TnܾõxxAqyb%,CG*BD`{wz>_?%jv$%NmmOKݹ,K~_f#[B)F(suⳔDCT_Tgteheq*D:ԭAmU߈hqӘS#4Og$~H3r\p4Uy[_ImZTi]!ZQG >ʌW.nrܖFMQxNW2h33ͷ QuE$omt{sM}'Ti؛jMuPu;~%,ѕ"Se-!J!3tu嵳̽{Ur8^u9 tٸ,6둓Vhɴbm*HKSkȅ2b'ф<<΂Q͞C><:2xeURZ:Љ4D\;ڵ?)sfZ,CQff$+~mc:mVq1gggƸƺ11c?ٌcc>Gz<<<<=Gz<<<<=GQuantLib-1.41/Docs/images/favicon.ico000066400000000000000000000020661513115055600174420ustar00rootroot00000000000000BM66(   FFFTTTLLL qqq)))fff!!!;;;~~~111444(((mmmBBB AAAwwwQuantLib-1.41/Docs/pages/000077500000000000000000000000001513115055600151475ustar00rootroot00000000000000QuantLib-1.41/Docs/pages/authors.docs000066400000000000000000000015131513115055600175060ustar00rootroot00000000000000 /* Copyright (C) 2003 Ferdinando Ametrano Copyright (C) 2000-2003 StatPro Italia srl 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. */ /*! \page group Contributors \htmlinclude Contributors.txt */ QuantLib-1.41/Docs/pages/config.docs000066400000000000000000000133051513115055600172700ustar00rootroot00000000000000 /* Copyright (C) 2004, 2005 StatPro Italia srl 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. */ /*! \page config User configuration A number of macros is provided for user configuration. Defining or undefining such macros triggers variations in some library functionality. When using CMake, they can be set to `ON` or `OFF` as properties. Under a Linux/Unix system, they are (un)set by `configure`; run \code ./configure --help \endcode for a list of corresponding command-line options. Under a Windows system, they must be (un)defined by editing the file `` and commenting or uncommenting the relevant lines. Such macros include: \code #define QL_ERROR_FUNCTIONS \endcode If defined, function information is added to the error messages thrown by the library. Undefined by default. \code #define QL_ERROR_LINES \endcode If defined, file and line information is added to the error messages thrown by the library. Undefined by default. \code #define QL_ENABLE_TRACING \endcode If defined, tracing messages might be emitted by the library depending on run-time settings. Enabling this option can degrade performance. Undefined by default. \code #define QL_EXTRA_SAFETY_CHECKS \endcode If defined, extra run-time checks are added to a few functions. This can prevent their inlining and degrade performance. Undefined by default. \code #define QL_USE_INDEXED_COUPON \endcode If defined, indexed coupons (see the documentation) are used in floating legs. If undefined (the default), par coupons are used. \code #define QL_ENABLE_SESSIONS \endcode If defined, singletons will return different instances for different threads; in particular, this means that the evaluation date, the stored index fixings and any other settings will be per-thread. Undefined by default. \code #define QL_ENABLE_THREAD_SAFE_OBSERVER_PATTERN \endcode If defined, a thread-safe (but less performant) version of the observer pattern is used. You should define it if you want to use %QuantLib via the SWIG layer within the JVM or .NET ecosystem or any other environment with an async garbage collector. Undefined by default. \code #define QL_HIGH_RESOLUTION_DATE \endcode If defined, date objects willsupport an intraday datetime resolution down to microseconds. Strictly monotone daycounters (`Actual360`, `Actual365Fixed` and `ActualActual`) will take the additional information into account and allow for accurate intraday pricing. If undefined (the default) the smallest resolution of date objects is a single day. Intraday datetime resolution is experimental. \code #define QL_THROW_IN_CYCLES \endcode If defined, lazy objects will raise an exception when they detect a notification cycle which would result in an infinite recursion loop. If undefined (the default), they will break the recursion without throwing. Enabling this option is recommended but might cause existing code to throw. \code #define QL_FASTER_LAZY_OBJECTS \endcode If defined (the default), lazy objects will forward the first notification received, and discard the others until recalculated; the rationale is that observers were already notified, and don't need further notifications until they recalculate, at which point this object would be recalculated too. After recalculation, this object would again forward the first notification received. Although not always correct, this behavior is a lot faster and thus is the current default. \code #define QL_USE_STD_ANY \endcode If defined (the default), `std::any` and related classes and functions will be used instead of `boost::any`. If undefined, the Boost facilities will be used. \code #define QL_USE_STD_OPTIONAL \endcode If defined (the default), `std::optional` and related classes and functions will be used instead of `boost::optional`. If undefined, the Boost facilities will be used. \code #define QL_USE_STD_SHARED_PTR \endcode If defined, `std::shared_ptr` and related classes and functions will used instead of `boost::shared_ptr`. If undefined (the default) the Boost facilities will be used. Note that `std::shared_ptr` does not check access and can cause segmentation faults. \code #define QL_NULL_AS_FUNCTIONS \endcode If defined, `Null` will be implemented as a template function. This allows the code to work with user-defined `Real` types but was reported to cause internal compiler errors with Visual C++ 2022 in some cases. If undefined (the default) `Null` will be implemented as a class template, as in previous releases. \code #define QL_ENABLE_PARALLEL_UNIT_TEST_RUNNER \endcode If defined, a parallel unit test runner will be used to execute the C++ test suite. This will reduce the runtime on multi core CPUs. Undefined by default. */ QuantLib-1.41/Docs/pages/coreclasses.docs000066400000000000000000000015621513115055600203330ustar00rootroot00000000000000 /* Copyright (C) 2000-2004 StatPro Italia srl 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. */ /*! \defgroup types Numeric types A number of numeric types are defined in order to add clarity to function and method declarations. */ QuantLib-1.41/Docs/pages/currencies.docs000066400000000000000000000014241513115055600201640ustar00rootroot00000000000000 /* Copyright (C) 2000-2003 StatPro Italia srl 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. */ /*! \defgroup currencies Currencies and FX rates */ QuantLib-1.41/Docs/pages/datetime.docs000066400000000000000000000040641513115055600176210ustar00rootroot00000000000000 /* Copyright (C) 2004 Ferdinando Ametrano Copyright (C) 2000-2004 StatPro Italia srl 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. */ /*! \defgroup datetime Date and time calculations The concrete class QuantLib::Date implements the concept of date. Its functionalities include: - providing basic information such as weekday, day of the month, day of the year, month, and year; - comparing two dates to determine whether they are equal, or which one is the earlier or later, or the difference between them expressed in days; - incrementing or decrementing a date of a given number of days, or of a given period expressed in weeks, months, or years. @{ */ /*! \defgroup calendars Calendars The class QuantLib::Calendar provides the interface for determining whether a date is a business day or a holiday for a given exchange or a given country, and for incrementing/decrementing a date of a given number of business days. A number of calendars is contained in the ql/time/calendars directory. */ /*! \defgroup daycounters Day counters The class QuantLib::DayCounter provides more advanced means of measuring the distance between two dates according to a given market convention, both as number of days of fraction of year. A number of such conventions is contained in the ql/time/daycounters directory. */ /*! @} */ QuantLib-1.41/Docs/pages/engines.docs000066400000000000000000000026631513115055600174600ustar00rootroot00000000000000 /* Copyright (C) 2004 StatPro Italia srl 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. */ /*! \defgroup engines Pricing engines @{ */ /*! \defgroup asianengines Asian option engines */ /*! \defgroup barrierengines Barrier option engines */ /*! \defgroup basketengines Basket option engines */ /*! \defgroup bondengines Basket option engines */ /*! \defgroup capfloorengines Cap/floor engines */ /*! \defgroup cliquetengines Cliquet option engines */ /*! \defgroup forwardengines Forward option engines */ /*! \defgroup inflationcapfloorengines Inflation cap/floor engines */ /*! \defgroup lookbackengines Lookback option engines */ /*! \defgroup quantoengines Quanto option engines */ /*! \defgroup swaptionengines Swaption engines */ /*! \defgroup vanillaengines Vanilla option engines */ /*! @} */ QuantLib-1.41/Docs/pages/examples.docs000066400000000000000000000123101513115055600176340ustar00rootroot00000000000000 /* Copyright (C) 2000-2003 StatPro Italia srl 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. */ /*! \example BasketLosses.cpp This example shows how to model losses across correlated assets. \example BermudanSwaption.cpp This example prices a bermudan swaption using different models calibrated to market swaptions. The calibration examples include Hull and White's using both an analytic formula as well as numerically, and Black and Karasinski's model. Using these three calibrations, Bermudan swaptions are priced for at-the-money, out-of-the-money and in-the-money volatilities. \example Bonds.cpp This example shows how to set up a term structure and then price some simple bonds. The last part is dedicated to peripherical computations such as yield-to-price or price-to-yield. \example CallableBonds.cpp This example prices a number of callable bonds and compares the results to known good data. \example CDS.cpp This example bootstraps a default-probability curve over a number of CDS and reprices them. \example ConvertibleBonds.cpp For a given set of option parameters, this example computes the value of a convertible bond with an embedded put option for two different equity options types (with european and american exercise features) using the Tsiveriotis-Fernandes method with different implied tree algorithms. The tree types are Jarrow-Rudd, Cox-Ross-Rubinstein, Additive equiprobabilities, Trigeorgis, Tian and Leisen-Reimer. \example CVAIRS.cpp This example shows how to calculate credit value adjustment for an interest rate swap. \example DiscreteHedging.cpp This example computes profit and loss of a discrete interval hedging strategy and compares with the outcome with the results of Derman and Kamal's Goldman Sachs Equity Derivatives Research Note "When You Cannot Hedge Continuously: The Corrections to Black-Scholes". It shows the use of the Monte Carlo framework. \example EquityOption.cpp For a given set of option parameters, this example computes the value of three different equity options types (with european, bermudan and american exercise features) using different valuation algorithms. The calculation methods are Black-Scholes (for european options only), Barone-Adesi/Whaley (american-only), Bjerksund/Stensland (american), Integral (european), finite differences, binomial trees, crude Monte Carlo (european-only) and Sobol-sequence Monte Carlo (european-only). \example FittedBondCurve.cpp For a given set of coupons and terms to maturity, this example computes the value of a bond by fitting the yields to a curve using different methods. The fitting methods are exponential splines, simple polynomials, Nelson-Siegel, and cubic B-splines. It then shifts the evaluation date into the future to compute implied forward par rates. It also computes yields after small price shifts. \example FRA.cpp This example values a forward-rate agreement (FRA) at different forward dates under two yield curve assumptions. It thereby illustrates how set up a term structure, and to use it to price a simple forward-rate agreement. \example Gaussian1dModels.cpp This example shows the use of Gaussian short rate model for interest rate derivatives. \example GlobalOptimizer.cpp This example shows the use of several different optimizers: firefly algorithm, hybrid simulated annealing, particle swarm optimization, simulated annealing, and differential evolution. \example LatentModel.cpp This example shows the calculation of correlated defaults. \example MarketModels.cpp This example shows the use of interest-rate market models. \example MulticurveBootstrapping.cpp This example prices an interest rate swap over a term structure and calculates its fair fixed rate and floating spread. \example MultidimIntegral.cpp This example shows multi-dimensional numerical integration. \example Replication.cpp This example uses the CompositeInstrument class to statically replicate a down-and-out barrier options. \example Repo.cpp This example values a fixed-coupon bond repurchase (repo). The repurchase agreement example is set up to use the repo rate to do all discounting (including the underlying bond income). Forward delivery price is also obtained using this repo rate. All this is done by supplying the FixedCouponBondForward constructor with a flat repo YieldTermStructure. */ QuantLib-1.41/Docs/pages/findiff.docs000066400000000000000000000017631513115055600174350ustar00rootroot00000000000000 /* Copyright (C) 2000-2003 StatPro Italia srl 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. */ /*! \defgroup findiff Finite-differences framework This framework (corresponding to the ql/methods/finitedifferences directory) contains basic building blocks for the numerical solution of partial differential equations by means of finite-difference methods. */ QuantLib-1.41/Docs/pages/fixedincome.docs000066400000000000000000000077221513115055600203230ustar00rootroot00000000000000 /* Copyright (C) 2000-2003 Sadruddin Rejeb 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. */ /*! \defgroup shortrate Short-rate modelling framework This framework (corresponding to the ql/models/shortrate directory) implements some single-factor and two-factor short rate models. The models implemented in this library are widely used by practitioners. For the moment, the ShortRateModel class defines the short-rate dynamics with stochastic equations of the type \f[ dx_i = \mu(t,x_i) dt + \sigma(t,x_i) dW_t \f] where \f$ r = f(t,x) \f$. If the model is affine (i.e. derived from the QuantLib::AffineModel class), analytical formulas for discount bonds and discount bond options are given (useful for calibration). \section singlefactormodels Single-factor models \par The Hull & White model \f[ dr_t = (\theta(t) - \alpha(t) r_t)dt + \sigma(t) dW_t \f] When \f$ \alpha \f$ and \f$ \sigma \f$ are constants, this model has analytical formulas for discount bonds and discount bond options. \par The Black-Karasinski model \f[ d\ln{r_t} = (\theta(t) - \alpha \ln{r_t})dt + \sigma dW_t \f] No analytical tractability here. \par The extended Cox-Ingersoll-Ross model \f[ dr_t = (\theta(t) - k r_t)dt + \sigma \sqrt{r_t} dW_t \f] There are analytical formulas for discount bonds (and soon for discount bond options). \section calibration Calibration The class CalibrationHelper is a base class that facilitates the instantiation of market instruments used for calibration. It has a method marketValue() that gives the market price using a Black formula, and a modelValue() method that gives the price according to a model Derived classed are QuantLib::CapHelper and QuantLib::SwaptionHelper. For the calibration itself, you must choose an optimization method that will find constant parameters such that the value: \f[ V = \sqrt{\sum_{i=1}^{n} \frac{(T_i - M_i)^2}{M_i}}, \f] where \f$ T_i \f$ is the price given by the model and \f$ M_i \f$ is the market price, is minimized. A few optimization methods are available in the ql/Optimization directory. \section twofactormodels Two-factor models \section pricers Pricers \par Analytical pricers If the model is affine, i.e. discount bond options formulas exist, caps are easily priced since they are a portfolio of discount bond options. Such a pricer is implemented in QuantLib::AnalyticalCapFloor. In the case of single-factor affine models, swaptions can be priced using the Jamshidian decomposition, implemented in QuantLib::JamshidianSwaption. \par Using Trees Each model derived from the single-factor model class has the ability to return a trinomial tree. For yield-curve consistent models, the fitting parameter can be determined either analytically (when possible) or numerically. When a tree is built, it is then pretty straightforward to implement a pricer for any path-independent derivative. Just implement a class derived from NumericalDerivative (see QuantLib::NumericalSwaption for example) and roll it back until the present time... Just look at QuantLib::TreeCapFloor and QuantLib::TreeSwaption for working pricers. */ QuantLib-1.41/Docs/pages/history.docs000066400000000000000000000015601513115055600175240ustar00rootroot00000000000000/* Copyright (C) 2000-2018 StatPro Italia srl 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. */ /*! \page history Version history The list of releases is available from GitHub at . */ QuantLib-1.41/Docs/pages/index.docs000066400000000000000000000032531513115055600171330ustar00rootroot00000000000000 /* Copyright (C) 2000-2003 StatPro Italia srl 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. */ /*! \mainpage Introduction %QuantLib (https://www.quantlib.org/) is a C++ library for financial quantitative analysts and developers. %QuantLib is Non-Copylefted Free Software released under the modified BSD License. It is also OSI Certified Open Source Software. OSI Certified is a certification mark of the Open Source Initiative. %QuantLib is free software and you are allowed to use, copy, modify, merge, publish, distribute, and/or sell copies of it under the conditions stated in the \ref license. %QuantLib and its documentation are distributed in the hope that they will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the \ref license for more details. \section disclaimer Disclaimer At this time, this documentation is widely incomplete and must be regarded as a work in progress. Contributions are welcome. */ QuantLib-1.41/Docs/pages/instruments.docs000066400000000000000000000014231513115055600204140ustar00rootroot00000000000000 /* Copyright (C) 2000-2004 StatPro Italia srl 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. */ /*! \defgroup instruments Financial instruments */ QuantLib-1.41/Docs/pages/lattices.docs000066400000000000000000000106521513115055600176350ustar00rootroot00000000000000 /* Copyright (C) 2002, 2003 Sadruddin Rejeb 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. */ /*! \defgroup lattices Lattice methods The framework (corresponding to the ql/methods/lattices directory) contains basic building blocks for pricing instruments using lattice methods (trees). A lattice, i.e. an instance of the abstract class QuantLib::Lattice, relies on one or several trees (each one approximating a diffusion process) to price an instance of the DiscretizedAsset class. Trees are instances of classes derived from QuantLib::Tree, classes which define the branching between nodes and transition probabilities. \section binomial Binomial trees The binomial method is the simplest numerical method that can be used to price path-independent derivatives. It is usually the preferred lattice method under the Black-Scholes-Merton model. As an example, let's see the framework implemented in the bsmlattice.hpp file. It is a method based on a binomial tree, with constant short-rate (discounting). There are several approaches to build the underlying binomial tree, like Jarrow-Rudd or Cox-Ross-Rubinstein. \section trinomial Trinomial trees When the underlying stochastic process has a mean-reverting pattern, it is usually better to use a trinomial tree instead of a binomial tree. An example is implemented in the QuantLib::TrinomialTree class, which is constructed using a diffusion process and a time-grid. The goal is to build a recombining trinomial tree that will discretize, at a finite set of times, the possible evolutions of a random variable \f$ y \f$ satisfying \f[ dy_t = \mu(t, y_t) dt + \sigma(t, y_t) dW_t. \f] At each node, there is a probability \f$ p_u, p_m \f$ and \f$ p_d \f$ to go through respectively the upper, the middle and the lower branch. These probabilities must satisfy \f[ p_{u}y_{i+1,k+1}+p_{m}y_{i+1,k}+p_{d}y_{i+1,k-1}=E_{i,j} \f] and \f[ p_u y_{i+1,k+1}^2 + p_m y_{i+1,k}^2 + p_d y_{i+1,k-1}^2 = V^2_{i,j}+E_{i,j}^2, \f] where k (the index of the node at the end of the middle branch) is the index of the node which is the nearest to the expected future value, \f$ E_{i,j}=\mathbf{E}\left( y(t_{i+1})|y(t_{i})=y_{i,j}\right) \f$ and \f$ V_{i,j}^{2}=\mathbf{Var}\{y(t_{i+1})|y(t_{i})=y_{i,j}\} \f$. If we suppose that the variance is only dependent on time \f$ V_{i,j}=V_{i} \f$ and set \f$ y_{i+1} \f$ to \f$ V_{i}\sqrt{3} \f$, we find that \f[ p_{u} = \frac{1}{6}+\frac{(E_{i,j}-y_{i+1,k})^{2}}{6V_{i}^{2}} + \frac{E_{i,j}-y_{i+1,k}}{2\sqrt{3}V_{i}}, \f] \f[ p_{m} = \frac{2}{3}-\frac{(E_{i,j}-y_{i+1,k})^{2}}{3V_{i}^{2}}, \f] \f[ p_{d} = \frac{1}{6}+\frac{(E_{i,j}-y_{i+1,k})^{2}}{6V_{i}^{2}} - \frac{E_{i,j}-y_{i+1,k}}{2\sqrt{3}V_{i}}. \f] \section bidimensional Bidimensional lattices To come... \section discretizedasset The QuantLib::DiscretizedAsset class This class is a representation of the price of a derivative at a specific time. It is roughly an array of values, each value being associated to a state of the underlying stochastic variables. For the moment, it is only used when working with trees, but it should be quite easy to make a use of it in finite-differences methods. The two main points, when deriving classes from QuantLib::DiscretizedAsset, are: -# Define the initialisation procedure (e.g. terminal payoff for european stock options). -# Define the method adjusting values, when necessary, at each time steps (e.g. apply the step condition for american or bermudan options). Some examples are found in QuantLib::DiscretizedSwap and QuantLib::DiscretizedSwaption. */ QuantLib-1.41/Docs/pages/license.docs000066400000000000000000000020471513115055600174460ustar00rootroot00000000000000 /*! \page license QuantLib License \verbinclude LICENSE.TXT
\section licensecomments Comments on Copyright and License %QuantLib is Non-Copylefted Free Software [1] released under the modified BSD License [2] (also know as XFree86-style license). %QuantLib is Open Source [3] because of its license: it is OSI Certified Open Source Software [4]. OSI Certified is a certification mark of the Open Source Initiative [5]. The modified BSD License is GPL compatible as confirmed by the Free Software Foundation [6]. This license has been adopted to allow free use of %QuantLib and its source, to make %QuantLib flourish as a free-software/open-source project. It allows proprietary extensions to be commercialized. [1] http://www.gnu.org/philosophy/categories.html#Non-CopyleftedFreeSoftware
[2] http://www.opensource.org/licenses/bsd-license.html
[3] http://www.opensource.org/docs/definition.html
[4] http://www.opensource.org/docs/certification_mark.html
[5] http://www.opensource.org
[6] http://www.gnu.org/philosophy/bsd.html */ QuantLib-1.41/Docs/pages/math.docs000066400000000000000000000034471513115055600167620ustar00rootroot00000000000000 /* Copyright (C) 2000-2003 StatPro Italia srl 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. */ /*! \defgroup math Math tools @{ */ /*! \defgroup interpolations 1-D Interpolations and corresponding traits */ /*! \defgroup solvers One-dimensional solvers The abstract class QuantLib::Solver1D provides the interface for one-dimensional solvers which can find the zeroes of a given function. A number of such solvers is contained in the ql/Solvers1D directory. The implementation of the algorithms was inspired by "Numerical Recipes in C", 2nd edition, Press, Teukolsky, Vetterling, Flannery - Chapter 9 Some work is needed to resolve the ambiguity of the root finding accuracy definition: for some algorithms it is the x-accuracy, for others it is f(x)-accuracy. */ /*! \defgroup optimizers Optimizers The optimization framework (corresponding to the ql/Optimization directory) implements some multi-dimensional minimizing methods. The function to be minimized is to be derived from the QuantLib::CostFunction base class (if the gradient is not analytically implemented, it will be computed numerically). */ /*! @} */ QuantLib-1.41/Docs/pages/mcarlo.docs000066400000000000000000000016321513115055600173000ustar00rootroot00000000000000 /* Copyright (C) 2000-2003 StatPro Italia srl 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. */ /*! \defgroup mcarlo Monte Carlo framework This framework (corresponding to the ql/methods/montecarlo directory) contains basic building blocks for Monte Carlo simulations. */ QuantLib-1.41/Docs/pages/patterns.docs000066400000000000000000000014121513115055600176570ustar00rootroot00000000000000 /* Copyright (C) 2000-2004 StatPro Italia srl 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. */ /*! \defgroup patterns Design patterns */ QuantLib-1.41/Docs/pages/processes.docs000066400000000000000000000020041513115055600200230ustar00rootroot00000000000000 /* Copyright (C) 2006 StatPro Italia srl 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. */ /*! \defgroup processes Stochastic processes The classes QuantLib::StochasticProcess and QuantLib::StochasticProcess1D provide the interface for a generic stochastic process. A number of specific processes is contained in the ql/processes directory. */ QuantLib-1.41/Docs/pages/resources.docs000066400000000000000000000027301513115055600200350ustar00rootroot00000000000000 /* Copyright (C) 2000-2003 StatPro Italia srl 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. */ /*! \page resources Additional resources The main %QuantLib resource is the %QuantLib web site (https://www.quantlib.org). Additional resources available from the above site include: - available documentation (https://www.quantlib.org/docs.shtml); - the %QuantLib mailing lists and forums (https://www.quantlib.org/mailinglists.shtml); - the %QuantLib programming style guidelines (https://www.quantlib.org/style.shtml); - links to pages for reporting issues (https://github.com/lballabio/QuantLib/issues) and submitting changes (https://github.com/lballabio/QuantLib/pulls); - a page (https://www.quantlib.org/extensions.shtml) about how to use %QuantLib in other languages/platforms. */ QuantLib-1.41/Docs/pages/termstructures.docs000066400000000000000000000026611513115055600211410ustar00rootroot00000000000000 /* Copyright (C) 2000-2003 StatPro Italia srl 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. */ /*! \defgroup termstructuressss Term structures @{ */ /*! \defgroup yieldtermstructures Interest-rate term structures The abstract class QuantLib::YieldTermStructure provides the common interface to concrete yield-rate term structure models. Among others, methods are declared which return instantaneous forward rate, discount factor, and zero rate at a given date. Adapter classes are provided which already implement part of the required methods, thus allowing the programmer to define only the non-redundant part. */ /*! \defgroup defaultprobabilitytermstructures Default-probability term structures */ /*! \defgroup inflationtermstructures Inflation term structures */ /*! @} */ QuantLib-1.41/Docs/quantlib.doxy000066400000000000000000000317311513115055600166010ustar00rootroot00000000000000# Doxyfile 1.14.0 #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- DOXYFILE_ENCODING = UTF-8 PROJECT_NAME = QuantLib PROJECT_NUMBER = ql_version PROJECT_BRIEF = "A free/open-source library for quantitative finance" PROJECT_LOGO = PROJECT_ICON = OUTPUT_DIRECTORY = CREATE_SUBDIRS = NO CREATE_SUBDIRS_LEVEL = 8 ALLOW_UNICODE_NAMES = NO OUTPUT_LANGUAGE = English BRIEF_MEMBER_DESC = YES REPEAT_BRIEF = YES ABBREVIATE_BRIEF = ALWAYS_DETAILED_SEC = NO INLINE_INHERITED_MEMB = NO FULL_PATH_NAMES = YES STRIP_FROM_PATH = ql_basepath STRIP_FROM_INC_PATH = ql_basepath SHORT_NAMES = NO JAVADOC_AUTOBRIEF = NO JAVADOC_BANNER = NO QT_AUTOBRIEF = NO MULTILINE_CPP_IS_BRIEF = NO PYTHON_DOCSTRING = YES INHERIT_DOCS = YES SEPARATE_MEMBER_PAGES = NO TAB_SIZE = 4 ALIASES = "warning=\xrefitem caveats \"Warning\" \"Caveats\"" \ "test=\xrefitem test \"Tests\" \"Test Suite\"" \ "bug=\xrefitem bug \"Bug\" \"Known Bugs\"" \ "deprecated=\xrefitem deprecated \"Deprecated\" \"Deprecated Features\"" OPTIMIZE_OUTPUT_FOR_C = NO OPTIMIZE_OUTPUT_JAVA = NO OPTIMIZE_FOR_FORTRAN = NO OPTIMIZE_OUTPUT_VHDL = NO OPTIMIZE_OUTPUT_SLICE = NO EXTENSION_MAPPING = MARKDOWN_SUPPORT = YES TOC_INCLUDE_HEADINGS = 0 MARKDOWN_ID_STYLE = DOXYGEN AUTOLINK_SUPPORT = YES AUTOLINK_IGNORE_WORDS = BUILTIN_STL_SUPPORT = YES CPP_CLI_SUPPORT = NO SIP_SUPPORT = NO IDL_PROPERTY_SUPPORT = YES DISTRIBUTE_GROUP_DOC = NO GROUP_NESTED_COMPOUNDS = NO SUBGROUPING = YES INLINE_GROUPED_CLASSES = NO INLINE_SIMPLE_STRUCTS = NO TYPEDEF_HIDES_STRUCT = NO LOOKUP_CACHE_SIZE = 0 NUM_PROC_THREADS = 1 TIMESTAMP = NO #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- EXTRACT_ALL = NO EXTRACT_PRIVATE = NO EXTRACT_PRIV_VIRTUAL = NO EXTRACT_PACKAGE = NO EXTRACT_STATIC = NO EXTRACT_LOCAL_CLASSES = NO EXTRACT_LOCAL_METHODS = NO EXTRACT_ANON_NSPACES = NO RESOLVE_UNNAMED_PARAMS = YES HIDE_UNDOC_MEMBERS = NO HIDE_UNDOC_CLASSES = YES HIDE_UNDOC_NAMESPACES = YES HIDE_FRIEND_COMPOUNDS = NO HIDE_IN_BODY_DOCS = YES INTERNAL_DOCS = NO CASE_SENSE_NAMES = NO HIDE_SCOPE_NAMES = YES HIDE_COMPOUND_REFERENCE= NO SHOW_HEADERFILE = YES SHOW_INCLUDE_FILES = YES SHOW_GROUPED_MEMB_INC = NO FORCE_LOCAL_INCLUDES = NO INLINE_INFO = NO SORT_MEMBER_DOCS = NO SORT_BRIEF_DOCS = NO SORT_MEMBERS_CTORS_1ST = YES SORT_GROUP_NAMES = YES SORT_BY_SCOPE_NAME = YES STRICT_PROTO_MATCHING = NO GENERATE_TODOLIST = NO GENERATE_TESTLIST = YES GENERATE_BUGLIST = YES GENERATE_DEPRECATEDLIST= YES ENABLED_SECTIONS = MAX_INITIALIZER_LINES = 30 SHOW_USED_FILES = NO SHOW_FILES = NO SHOW_NAMESPACES = NO FILE_VERSION_FILTER = LAYOUT_FILE = CITE_BIB_FILES = EXTERNAL_TOOL_PATH = #--------------------------------------------------------------------------- # Configuration options related to warning and progress messages #--------------------------------------------------------------------------- QUIET = YES WARNINGS = YES WARN_IF_UNDOCUMENTED = NO WARN_IF_DOC_ERROR = YES WARN_IF_INCOMPLETE_DOC = NO WARN_NO_PARAMDOC = NO WARN_IF_UNDOC_ENUM_VAL = NO WARN_LAYOUT_FILE = YES WARN_AS_ERROR = YES WARN_FORMAT = "$file:$line: $text" WARN_LINE_FORMAT = "at line $line of file $file" WARN_LOGFILE = #--------------------------------------------------------------------------- # Configuration options related to the input files #--------------------------------------------------------------------------- INPUT = ql_basepath/Docs//pages \ ql_basepath/ql INPUT_ENCODING = UTF-8 INPUT_FILE_ENCODING = FILE_PATTERNS = *.docs \ *.hpp \ *.h RECURSIVE = YES EXCLUDE = ql_basepath//ql/config.hpp \ ql_basepath//ql/config.msvc.hpp EXCLUDE_SYMLINKS = NO EXCLUDE_PATTERNS = */all.hpp EXCLUDE_SYMBOLS = EXAMPLE_PATH = ql_basepath/Examples \ . EXAMPLE_PATTERNS = *.cpp EXAMPLE_RECURSIVE = YES IMAGE_PATH = INPUT_FILTER = FILTER_PATTERNS = FILTER_SOURCE_FILES = NO FILTER_SOURCE_PATTERNS = USE_MDFILE_AS_MAINPAGE = IMPLICIT_DIR_DOCS = YES FORTRAN_COMMENT_AFTER = 72 #--------------------------------------------------------------------------- # Configuration options related to source browsing #--------------------------------------------------------------------------- SOURCE_BROWSER = NO INLINE_SOURCES = NO STRIP_CODE_COMMENTS = YES REFERENCED_BY_RELATION = NO REFERENCES_RELATION = NO REFERENCES_LINK_SOURCE = NO SOURCE_TOOLTIPS = NO USE_HTAGS = NO VERBATIM_HEADERS = NO #--------------------------------------------------------------------------- # Configuration options related to the alphabetical class index #--------------------------------------------------------------------------- ALPHABETICAL_INDEX = YES IGNORE_PREFIX = #--------------------------------------------------------------------------- # Configuration options related to the HTML output #--------------------------------------------------------------------------- GENERATE_HTML = YES HTML_OUTPUT = html HTML_FILE_EXTENSION = .html HTML_HEADER = ql_basepath/Docs/quantlibheader.html HTML_FOOTER = ql_basepath/Docs/quantlibfooter.html HTML_STYLESHEET = HTML_EXTRA_STYLESHEET = ql_basepath/Docs/quantlibextra.css HTML_EXTRA_FILES = ql_basepath/Docs/images/favicon.ico HTML_COLORSTYLE = AUTO_LIGHT HTML_COLORSTYLE_HUE = 220 HTML_COLORSTYLE_SAT = 100 HTML_COLORSTYLE_GAMMA = 80 HTML_DYNAMIC_MENUS = YES HTML_DYNAMIC_SECTIONS = YES HTML_CODE_FOLDING = YES HTML_COPY_CLIPBOARD = YES HTML_PROJECT_COOKIE = HTML_INDEX_NUM_ENTRIES = 100 GENERATE_DOCSET = NO DOCSET_FEEDNAME = "Doxygen generated docs" DOCSET_FEEDURL = DOCSET_BUNDLE_ID = org.doxygen.Project DOCSET_PUBLISHER_ID = org.doxygen.Publisher DOCSET_PUBLISHER_NAME = Publisher GENERATE_HTMLHELP = NO CHM_FILE = HHC_LOCATION = hhc.exe GENERATE_CHI = NO CHM_INDEX_ENCODING = BINARY_TOC = NO TOC_EXPAND = NO SITEMAP_URL = GENERATE_QHP = NO QCH_FILE = QHP_NAMESPACE = org.doxygen.Project QHP_VIRTUAL_FOLDER = doc QHP_CUST_FILTER_NAME = QHP_CUST_FILTER_ATTRS = QHP_SECT_FILTER_ATTRS = QHG_LOCATION = GENERATE_ECLIPSEHELP = NO ECLIPSE_DOC_ID = org.doxygen.Project DISABLE_INDEX = NO GENERATE_TREEVIEW = NO PAGE_OUTLINE_PANEL = YES FULL_SIDEBAR = NO ENUM_VALUES_PER_LINE = 4 SHOW_ENUM_VALUES = NO TREEVIEW_WIDTH = 250 EXT_LINKS_IN_WINDOW = NO OBFUSCATE_EMAILS = YES HTML_FORMULA_FORMAT = png FORMULA_FONTSIZE = 12 FORMULA_MACROFILE = USE_MATHJAX = YES MATHJAX_VERSION = MathJax_2 MATHJAX_FORMAT = HTML-CSS MATHJAX_RELPATH = https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/ MATHJAX_EXTENSIONS = MATHJAX_CODEFILE = SEARCHENGINE = YES SERVER_BASED_SEARCH = NO EXTERNAL_SEARCH = NO SEARCHENGINE_URL = SEARCHDATA_FILE = searchdata.xml EXTERNAL_SEARCH_ID = EXTRA_SEARCH_MAPPINGS = #--------------------------------------------------------------------------- # Configuration options related to the LaTeX output #--------------------------------------------------------------------------- GENERATE_LATEX = NO LATEX_OUTPUT = latex LATEX_CMD_NAME = latex MAKEINDEX_CMD_NAME = makeindex LATEX_MAKEINDEX_CMD = makeindex COMPACT_LATEX = NO PAPER_TYPE = a4 EXTRA_PACKAGES = LATEX_HEADER = LATEX_FOOTER = LATEX_EXTRA_STYLESHEET = LATEX_EXTRA_FILES = PDF_HYPERLINKS = YES USE_PDFLATEX = YES LATEX_BATCHMODE = NO LATEX_HIDE_INDICES = NO LATEX_BIB_STYLE = plain LATEX_EMOJI_DIRECTORY = #--------------------------------------------------------------------------- # Configuration options related to the RTF output #--------------------------------------------------------------------------- GENERATE_RTF = NO RTF_OUTPUT = rtf COMPACT_RTF = NO RTF_HYPERLINKS = NO RTF_STYLESHEET_FILE = RTF_EXTENSIONS_FILE = RTF_EXTRA_FILES = #--------------------------------------------------------------------------- # Configuration options related to the man page output #--------------------------------------------------------------------------- GENERATE_MAN = NO MAN_OUTPUT = man MAN_EXTENSION = .3 MAN_SUBDIR = MAN_LINKS = YES #--------------------------------------------------------------------------- # Configuration options related to the XML output #--------------------------------------------------------------------------- GENERATE_XML = NO XML_OUTPUT = xml XML_PROGRAMLISTING = NO XML_NS_MEMB_FILE_SCOPE = NO #--------------------------------------------------------------------------- # Configuration options related to the DOCBOOK output #--------------------------------------------------------------------------- GENERATE_DOCBOOK = NO DOCBOOK_OUTPUT = docbook #--------------------------------------------------------------------------- # Configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- GENERATE_AUTOGEN_DEF = NO #--------------------------------------------------------------------------- # Configuration options related to Sqlite3 output #--------------------------------------------------------------------------- GENERATE_SQLITE3 = NO SQLITE3_OUTPUT = sqlite3 SQLITE3_RECREATE_DB = YES #--------------------------------------------------------------------------- # Configuration options related to the Perl module output #--------------------------------------------------------------------------- GENERATE_PERLMOD = NO PERLMOD_LATEX = NO PERLMOD_PRETTY = YES PERLMOD_MAKEVAR_PREFIX = #--------------------------------------------------------------------------- # Configuration options related to the preprocessor #--------------------------------------------------------------------------- ENABLE_PREPROCESSING = YES MACRO_EXPANSION = YES EXPAND_ONLY_PREDEF = NO SEARCH_INCLUDES = YES INCLUDE_PATH = INCLUDE_FILE_PATTERNS = PREDEFINED = __DOXYGEN__ EXPAND_AS_DEFINED = SKIP_FUNCTION_MACROS = YES #--------------------------------------------------------------------------- # Configuration options related to external references #--------------------------------------------------------------------------- TAGFILES = GENERATE_TAGFILE = ALLEXTERNALS = NO EXTERNAL_GROUPS = YES EXTERNAL_PAGES = YES #--------------------------------------------------------------------------- # Configuration options related to diagram generator tools #--------------------------------------------------------------------------- HIDE_UNDOC_RELATIONS = NO HAVE_DOT = YES DOT_NUM_THREADS = 0 DOT_COMMON_ATTR = "fontname=Helvetica,fontsize=10" DOT_EDGE_ATTR = "labelfontname=Helvetica,labelfontsize=10" DOT_NODE_ATTR = "shape=box,height=0.2,width=0.4" DOT_FONTPATH = CLASS_GRAPH = YES COLLABORATION_GRAPH = NO GROUP_GRAPHS = NO UML_LOOK = NO UML_LIMIT_NUM_FIELDS = 10 UML_MAX_EDGE_LABELS = 10 DOT_UML_DETAILS = NO DOT_WRAP_THRESHOLD = 17 TEMPLATE_RELATIONS = NO INCLUDE_GRAPH = NO INCLUDED_BY_GRAPH = NO CALL_GRAPH = NO CALLER_GRAPH = NO GRAPHICAL_HIERARCHY = YES DIRECTORY_GRAPH = NO DIR_GRAPH_MAX_DEPTH = 1 DOT_IMAGE_FORMAT = png INTERACTIVE_SVG = NO DOT_PATH = DOTFILE_DIRS = DIA_PATH = DIAFILE_DIRS = PLANTUML_JAR_PATH = PLANTUML_CFG_FILE = PLANTUML_INCLUDE_PATH = PLANTUMLFILE_DIRS = DOT_GRAPH_MAX_NODES = 150 MAX_DOT_GRAPH_DEPTH = 2 DOT_MULTI_TARGETS = NO GENERATE_LEGEND = YES DOT_CLEANUP = YES MSCGEN_TOOL = MSCFILE_DIRS = QuantLib-1.41/Docs/quantlibextra.css000066400000000000000000000014711513115055600174500ustar00rootroot00000000000000#projectname, #projectname a, #projectname a:visited { font-family: "Lato", sans-serif; font-weight: 700; font-style: italic; color: black; } #projectname { padding: 1em; } #projectnumber { font-family: "Lato", sans-serif; font-weight: 400; font-style: italic; font-size: 60%; margin-top: 1em; margin-bottom: 0; } body, table, div, p, dl { font: 300 16px/22px Lato,sans-serif; } p.reference, p.definition { font: 300 16px/22px Lato,sans-serif; } .title { font-family: "Lato", sans-serif; font-style: italic; } table.directory { font: 400 16px "Lato",sans-serif; } h1 { font-style: italic; } .sm-dox a,.sm-dox a:focus,.sm-dox a:hover,.sm-dox a:active { font-family: "Lato", sans-serif; font-weight: 400; font-style: italic; } QuantLib-1.41/Docs/quantlibfooter.html000066400000000000000000000011261513115055600177740ustar00rootroot00000000000000 QuantLib-1.41/Docs/quantlibheader.html000066400000000000000000000040641513115055600177320ustar00rootroot00000000000000 $projectname: $title $title $treeview $search $mathjax $extrastylesheet
QuantLib: a free/open-source library for quantitative finance
Reference manual - version $projectnumber
$projectbrief
$searchbox
QuantLib-1.41/Examples/000077500000000000000000000000001513115055600147365ustar00rootroot00000000000000QuantLib-1.41/Examples/AsianOption/000077500000000000000000000000001513115055600171625ustar00rootroot00000000000000QuantLib-1.41/Examples/AsianOption/AsianOption.cpp000066400000000000000000000330631513115055600221170ustar00rootroot00000000000000/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /*! Copyright (C) 2025 Kareem Fareed 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. */ /* This example demonstrates Asian option pricing using various methods available in QuantLib, including: - Discrete vs. Continuous averaging - Arithmetic vs. Geometric averaging - Multiple pricing engines (Analytic, Monte Carlo, PDE, Approximations) */ #include #if !defined(BOOST_ALL_NO_LIB) && defined(BOOST_MSVC) # include #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace QuantLib; int main(int, char* []) { try { std::cout << std::endl; // set up dates Calendar calendar = TARGET(); Date todaysDate(15, November, 2025); Date settlementDate(17, November, 2025); Settings::instance().evaluationDate() = todaysDate; // our options Option::Type type(Option::Put); Real underlying = 100; Real strike = 100; Spread dividendYield = 0.03; Rate riskFreeRate = 0.06; Volatility volatility = 0.20; Date maturity(17, November, 2026); DayCounter dayCounter = Actual365Fixed(); std::cout << "Asian Option Pricing Example" << std::endl; std::cout << "=============================" << std::endl << std::endl; std::cout << "Option type = " << type << std::endl; std::cout << "Maturity = "<< maturity << std::endl; std::cout << "Underlying price = " << underlying << std::endl; std::cout << "Strike = " << strike << std::endl; std::cout << "Risk-free interest rate = " << io::rate(riskFreeRate) << std::endl; std::cout << "Dividend yield = " << io::rate(dividendYield) << std::endl; std::cout << "Volatility = " << io::volatility(volatility) << std::endl; std::cout << std::endl; // Set up fixing dates for discrete averaging (monthly fixings) std::vector fixingDates; Date d = settlementDate; while (d <= maturity) { fixingDates.push_back(d); d = calendar.advance(d, 1, Months); } std::cout << "Number of fixings: " << fixingDates.size() << std::endl; std::cout << std::endl; // Set up flat yield/dividend/vol curves auto underlyingH = makeQuoteHandle(underlying); Handle flatTermStructure( ext::make_shared(settlementDate, riskFreeRate, dayCounter)); Handle flatDividendTS( ext::make_shared(settlementDate, dividendYield, dayCounter)); Handle flatVolTS( ext::make_shared(settlementDate, calendar, volatility, dayCounter)); auto payoff = ext::make_shared(type, strike); auto bsmProcess = ext::make_shared( underlyingH, flatDividendTS, flatTermStructure, flatVolTS); auto europeanExercise = ext::make_shared(maturity); // Create Asian options DiscreteAveragingAsianOption discreteArithmeticOption( Average::Arithmetic, 0.0, // running sum 0, // past fixings fixingDates, payoff, europeanExercise); DiscreteAveragingAsianOption discreteGeometricOption( Average::Geometric, 0.0, // running product (should be 1.0 for geometric, but 0 means no past fixings) 0, // past fixings fixingDates, payoff, europeanExercise); ContinuousAveragingAsianOption continuousArithmeticOption( Average::Arithmetic, settlementDate, payoff, europeanExercise); ContinuousAveragingAsianOption continuousGeometricOption( Average::Geometric, payoff, europeanExercise); // ********************************************** // DISCRETE AVERAGING - GEOMETRIC AVERAGE // ********************************************** std::cout << std::endl; std::cout << "DISCRETE AVERAGING - GEOMETRIC AVERAGE" << std::endl; std::cout << "======================================" << std::endl; Size widths[] = { 40, 16 }; // Analytic geometric discrete std::cout << std::setw(widths[0]) << std::left << "Analytic (Discrete Geometric)" << std::fixed << std::setprecision(6) << std::setw(widths[1]) << std::left; discreteGeometricOption.setPricingEngine( ext::make_shared(bsmProcess)); std::cout << discreteGeometricOption.NPV() << std::endl; // Monte Carlo geometric discrete Size mcSeed = 42; std::cout << std::setw(widths[0]) << std::left << "Monte Carlo (Discrete Geometric)" << std::fixed << std::setprecision(6) << std::setw(widths[1]) << std::left; discreteGeometricOption.setPricingEngine( MakeMCDiscreteGeometricAPEngine(bsmProcess) .withSamples(10000) .withSeed(mcSeed)); std::cout << discreteGeometricOption.NPV() << std::endl; // ********************************************** // DISCRETE AVERAGING - ARITHMETIC AVERAGE // ********************************************** std::cout << std::endl; std::cout << "DISCRETE AVERAGING - ARITHMETIC AVERAGE" << std::endl; std::cout << "=======================================" << std::endl; // Monte Carlo arithmetic discrete std::cout << std::setw(widths[0]) << std::left << "Monte Carlo (Discrete Arithmetic)" << std::fixed << std::setprecision(6) << std::setw(widths[1]) << std::left; discreteArithmeticOption.setPricingEngine( MakeMCDiscreteArithmeticAPEngine(bsmProcess) .withSamples(10000) .withSeed(mcSeed)); std::cout << discreteArithmeticOption.NPV() << std::endl; // Monte Carlo arithmetic discrete with control variate std::cout << std::setw(widths[0]) << std::left << "MC with Control Variate" << std::fixed << std::setprecision(6) << std::setw(widths[1]) << std::left; discreteArithmeticOption.setPricingEngine( MakeMCDiscreteArithmeticAPEngine(bsmProcess) .withSamples(10000) .withControlVariate() .withSeed(mcSeed)); std::cout << discreteArithmeticOption.NPV() << std::endl; // Turnbull-Wakeman approximation std::cout << std::setw(widths[0]) << std::left << "Turnbull-Wakeman Approximation" << std::fixed << std::setprecision(6) << std::setw(widths[1]) << std::left; discreteArithmeticOption.setPricingEngine( ext::make_shared(bsmProcess)); std::cout << discreteArithmeticOption.NPV() << std::endl; // Finite Differences (PDE method) std::cout << std::setw(widths[0]) << std::left << "Finite Differences (PDE)" << std::fixed << std::setprecision(6) << std::setw(widths[1]) << std::left; discreteArithmeticOption.setPricingEngine( ext::make_shared(bsmProcess, 100, 100, 50)); std::cout << discreteArithmeticOption.NPV() << std::endl; // ********************************************** // CONTINUOUS AVERAGING - GEOMETRIC AVERAGE // ********************************************** std::cout << std::endl; std::cout << "CONTINUOUS AVERAGING - GEOMETRIC AVERAGE" << std::endl; std::cout << "========================================" << std::endl; // Analytic geometric continuous std::cout << std::setw(widths[0]) << std::left << "Analytic (Continuous Geometric)" << std::fixed << std::setprecision(6) << std::setw(widths[1]) << std::left; continuousGeometricOption.setPricingEngine( ext::make_shared(bsmProcess)); std::cout << continuousGeometricOption.NPV() << std::endl; // ********************************************** // CONTINUOUS AVERAGING - ARITHMETIC AVERAGE // ********************************************** std::cout << std::endl; std::cout << "CONTINUOUS AVERAGING - ARITHMETIC AVERAGE" << std::endl; std::cout << "=========================================" << std::endl; // Continuous Arithmetic Levy Engine std::cout << std::setw(widths[0]) << std::left << "Continuous Arithmetic Levy Engine" << std::fixed << std::setprecision(6) << std::setw(widths[1]) << std::left; auto currentAverage = makeQuoteHandle(0.0); // No averaging yet for fresh option continuousArithmeticOption.setPricingEngine( ext::make_shared(bsmProcess, currentAverage)); std::cout << continuousArithmeticOption.NPV() << std::endl; // ********************************************** // COMPARISON SUMMARY // ********************************************** std::cout << std::endl; std::cout << "SUMMARY COMPARISON" << std::endl; std::cout << "==================" << std::endl; std::cout << std::endl; std::cout << "Averaging Type Method NPV" << std::endl; std::cout << "--------------------------------------------------------------------------------" << std::endl; // Re-price all for summary discreteGeometricOption.setPricingEngine( ext::make_shared(bsmProcess)); std::cout << std::setw(24) << std::left << "Discrete Geometric" << std::setw(36) << std::left << "Analytic" << std::fixed << std::setprecision(6) << discreteGeometricOption.NPV() << std::endl; discreteArithmeticOption.setPricingEngine( MakeMCDiscreteArithmeticAPEngine(bsmProcess) .withSamples(10000) .withControlVariate() .withSeed(mcSeed)); std::cout << std::setw(24) << std::left << "Discrete Arithmetic" << std::setw(36) << std::left << "Monte Carlo (Control Variate)" << std::fixed << std::setprecision(6) << discreteArithmeticOption.NPV() << std::endl; discreteArithmeticOption.setPricingEngine( ext::make_shared(bsmProcess)); std::cout << std::setw(24) << std::left << "Discrete Arithmetic" << std::setw(36) << std::left << "Turnbull-Wakeman" << std::fixed << std::setprecision(6) << discreteArithmeticOption.NPV() << std::endl; continuousGeometricOption.setPricingEngine( ext::make_shared(bsmProcess)); std::cout << std::setw(24) << std::left << "Continuous Geometric" << std::setw(36) << std::left << "Analytic" << std::fixed << std::setprecision(6) << continuousGeometricOption.NPV() << std::endl; continuousArithmeticOption.setPricingEngine( ext::make_shared(bsmProcess, currentAverage)); std::cout << std::setw(24) << std::left << "Continuous Arithmetic" << std::setw(36) << std::left << "Levy Engine" << std::fixed << std::setprecision(6) << continuousArithmeticOption.NPV() << std::endl; std::cout << std::endl; return 0; } catch (std::exception& e) { std::cerr << e.what() << std::endl; return 1; } catch (...) { std::cerr << "unknown error" << std::endl; return 1; } } QuantLib-1.41/Examples/AsianOption/AsianOption.vcxproj000066400000000000000000001055641513115055600230360ustar00rootroot00000000000000 Debug (static runtime) Win32 Debug (static runtime) x64 Debug Win32 Debug x64 Release (static runtime) Win32 Release (static runtime) x64 Release Win32 Release x64 AsianOption {A17D4799-97BF-410A-97C2-683F489A9DA8} $(VCTargetsPath11) Application false MultiByte Application false MultiByte Application false MultiByte Application false MultiByte Application false MultiByte Application false MultiByte Application false MultiByte Application false MultiByte <_ProjectFileVersion>10.0.30319.1 .\bin\ .\bin\ .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ false false false false .\bin\ .\bin\ .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ false false false false .\bin\ .\bin\ .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ true true false false .\bin\ .\bin\ .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ true true false false AsianOption-mt-sgd AsianOption-x64-mt-sgd AsianOption-mt-gd AsianOption-x64-mt-gd AsianOption-mt-s AsianOption-x64-mt-s AsianOption-mt AsianOption-x64-mt .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\AsianOption.tlb MaxSpeed stdcpp17 AnySuitable false Speed ..\..;%(AdditionalIncludeDirectories) NDEBUG;WIN32;_CONSOLE;_SCL_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS;%(PreprocessorDefinitions) true MultiThreadedDLL true false true true quantlib.hpp .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\AsianOption.pch .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ true .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ Level3 true Default false NDEBUG;%(PreprocessorDefinitions) 0x0409 $(OutDir)$(TargetName)$(TargetExt) true ..\..\lib;%(AdditionalLibraryDirectories) .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\AsianOption.pdb Console false MachineX86 .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\AsianOption.tlb MaxSpeed stdcpp17 AnySuitable false Speed ..\..;%(AdditionalIncludeDirectories) NDEBUG;WIN32;_CONSOLE;_SCL_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS;%(PreprocessorDefinitions) true MultiThreadedDLL true false true true quantlib.hpp .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\AsianOption.pch .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ true .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ Level3 true Default false NDEBUG;%(PreprocessorDefinitions) 0x0409 $(OutDir)$(TargetName)$(TargetExt) true ..\..\lib;%(AdditionalLibraryDirectories) .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\AsianOption.pdb Console false .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\AsianOption.tlb MaxSpeed stdcpp17 AnySuitable false Speed ..\..;%(AdditionalIncludeDirectories) NDEBUG;WIN32;_CONSOLE;_SCL_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS;%(PreprocessorDefinitions) true MultiThreaded true false true true quantlib.hpp .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\AsianOption.pch .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ true .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ Level3 true Default false NDEBUG;%(PreprocessorDefinitions) 0x0409 $(OutDir)$(TargetName)$(TargetExt) true ..\..\lib;%(AdditionalLibraryDirectories) .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\AsianOption.pdb Console false MachineX86 .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\AsianOption.tlb MaxSpeed stdcpp17 AnySuitable false Speed ..\..;%(AdditionalIncludeDirectories) NDEBUG;WIN32;_CONSOLE;_SCL_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS;%(PreprocessorDefinitions) true MultiThreaded true false true true quantlib.hpp .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\AsianOption.pch .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ true .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ Level3 true Default false NDEBUG;%(PreprocessorDefinitions) 0x0409 $(OutDir)$(TargetName)$(TargetExt) true ..\..\lib;%(AdditionalLibraryDirectories) .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\AsianOption.pdb Console false .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\AsianOption.tlb Disabled stdcpp17 false ..\..;%(AdditionalIncludeDirectories) _DEBUG;WIN32;_CONSOLE;_SCL_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebug false true true quantlib.hpp .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\AsianOption.pch .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ true .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ Level3 true EditAndContinue Default false _DEBUG;%(PreprocessorDefinitions) 0x0409 $(OutDir)$(TargetName)$(TargetExt) true ..\..\lib;%(AdditionalLibraryDirectories) true .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\AsianOption.pdb Console false MachineX86 false .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\AsianOption.tlb Disabled stdcpp17 false ..\..;%(AdditionalIncludeDirectories) _DEBUG;WIN32;_CONSOLE;_SCL_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebug false true true quantlib.hpp .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\AsianOption.pch .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ true .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ Level3 true ProgramDatabase Default false _DEBUG;%(PreprocessorDefinitions) 0x0409 $(OutDir)$(TargetName)$(TargetExt) true ..\..\lib;%(AdditionalLibraryDirectories) true .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\AsianOption.pdb Console false .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\AsianOption.tlb Disabled stdcpp17 false ..\..;%(AdditionalIncludeDirectories) _DEBUG;WIN32;_CONSOLE;_SCL_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebugDLL false true true quantlib.hpp .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\AsianOption.pch .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ true .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ Level3 true EditAndContinue Default false _DEBUG;%(PreprocessorDefinitions) 0x0409 $(OutDir)$(TargetName)$(TargetExt) true ..\..\lib;%(AdditionalLibraryDirectories) true .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\AsianOption.pdb Console false MachineX86 false .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\AsianOption.tlb Disabled stdcpp17 false ..\..;%(AdditionalIncludeDirectories) _DEBUG;WIN32;_CONSOLE;_SCL_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebugDLL false true true quantlib.hpp .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\AsianOption.pch .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ true .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ Level3 true ProgramDatabase Default false _DEBUG;%(PreprocessorDefinitions) 0x0409 $(OutDir)$(TargetName)$(TargetExt) true ..\..\lib;%(AdditionalLibraryDirectories) true .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\AsianOption.pdb Console false {ad0a27da-91da-46a2-acbd-296c419ed3aa} false QuantLib-1.41/Examples/AsianOption/AsianOption.vcxproj.filters000066400000000000000000000016131513115055600244730ustar00rootroot00000000000000 {e1cf0425-cf98-4329-a9cc-02cc9512d9e4} cpp;c;cxx;rc;def;r;odl;idl;hpj;bat {3fba9b70-6bea-43e7-b0e8-5a037bc32d53} h;hpp;hxx;hm;inl {6a339176-8fa2-4b45-ac4a-0af262ec79fe} ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe Source Files QuantLib-1.41/Examples/AsianOption/CMakeLists.txt000066400000000000000000000003411513115055600217200ustar00rootroot00000000000000add_executable(AsianOption AsianOption.cpp) target_link_libraries(AsianOption ql_library ${QL_THREAD_LIBRARIES}) if (QL_INSTALL_EXAMPLES) install(TARGETS AsianOption RUNTIME DESTINATION ${QL_INSTALL_EXAMPLESDIR}) endif() QuantLib-1.41/Examples/BasketLosses/000077500000000000000000000000001513115055600173405ustar00rootroot00000000000000QuantLib-1.41/Examples/BasketLosses/BasketLosses.cpp000066400000000000000000000266021513115055600224540ustar00rootroot00000000000000/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Copyright (C) 2014 Jose Aparicio 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. */ #include #if !defined(BOOST_ALL_NO_LIB) && defined(BOOST_MSVC) # include #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; using namespace QuantLib; int main(int, char* []) { try { std::cout << std::endl; Calendar calendar = TARGET(); Date todaysDate(19, March, 2014); // must be a business day todaysDate = calendar.adjust(todaysDate); Settings::instance().evaluationDate() = todaysDate; /* -------------------------------------------------------------- SET UP BASKET PORTFOLIO -------------------------------------------------------------- */ // build curves and issuers into a basket of ten names std::vector hazardRates = { 0.001, 0.01, 0.02, 0.03, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09 }; std::vector names; names.reserve(hazardRates.size()); for(Size i=0; i> defTS; for (Real& hazardRate : hazardRates) { defTS.emplace_back( ext::make_shared(0, TARGET(), hazardRate, Actual365Fixed())); defTS.back()->enableExtrapolation(); } std::vector issuers; for(Size i=0; i curves(1, std::make_pair(NorthAmericaCorpDefaultKey( EURCurrency(), QuantLib::SeniorSec, Period(), 1. // amount threshold ), defTS[i])); issuers.emplace_back(curves); } auto thePool = ext::make_shared(); for(Size i=0; iadd(names[i], issuers[i], NorthAmericaCorpDefaultKey( EURCurrency(), QuantLib::SeniorSec, Period(), 1.)); std::vector defaultKeys(hazardRates.size(), NorthAmericaCorpDefaultKey(EURCurrency(), SeniorSec, Period(), 1.)); auto theBskt = ext::make_shared( todaysDate, names, std::vector(hazardRates.size(), 100.), thePool, // 0.0, 0.78); 0.03, .06); /* -------------------------------------------------------------- SET UP DEFAULT LOSS MODELS -------------------------------------------------------------- */ std::vector recoveries(hazardRates.size(), 0.4); Date calcDate(TARGET().advance(Settings::instance().evaluationDate(), Period(60, Months))); Real factorValue = 0.05; std::vector> fctrsWeights(hazardRates.size(), std::vector(1, std::sqrt(factorValue))); // --- LHP model -------------------------- #ifndef QL_PATCH_SOLARIS auto lmGLHP = ext::make_shared( fctrsWeights[0][0] * fctrsWeights[0][0], recoveries); theBskt->setLossModel(lmGLHP); std::cout << "GLHP Expected 10-Yr Losses: " << std::endl; std::cout << theBskt->expectedTrancheLoss(calcDate) << std::endl; // --- G Binomial model -------------------- auto ktLossLM = ext::make_shared(fctrsWeights, recoveries, LatentModelIntegrationType::GaussianQuadrature, GaussianCopulaPolicy::initTraits()); auto lmBinomial = ext::make_shared(ktLossLM); theBskt->setLossModel(lmBinomial); std::cout << "Gaussian Binomial Expected 10-Yr Losses: " << std::endl; std::cout << theBskt->expectedTrancheLoss(calcDate) << std::endl; #endif // --- T Binomial model -------------------- TCopulaPolicy::initTraits initT; initT.tOrders = std::vector(2, 3); auto ktTLossLM = ext::make_shared(fctrsWeights, recoveries, //LatentModelIntegrationType::GaussianQuadrature, LatentModelIntegrationType::Trapezoid, initT); auto lmTBinomial = ext::make_shared(ktTLossLM); theBskt->setLossModel(lmTBinomial); std::cout << "T Binomial Expected 10-Yr Losses: " << std::endl; std::cout << theBskt->expectedTrancheLoss(calcDate) << std::endl; // --- G Inhomogeneous model --------------- Size numSimulations = 100000; #ifndef QL_PATCH_SOLARIS auto gLM = ext::make_shared(fctrsWeights, recoveries, LatentModelIntegrationType::GaussianQuadrature, // g++ requires this when using make_shared GaussianCopulaPolicy::initTraits()); Size numBuckets = 100; auto inhomogeneousLM = ext::make_shared(gLM, numBuckets); theBskt->setLossModel(inhomogeneousLM); std::cout << "G Inhomogeneous Expected 10-Yr Losses: " << std::endl; std::cout << theBskt->expectedTrancheLoss(calcDate) << std::endl; // --- G Random model --------------------- // Gaussian random joint default model: // Size numCoresUsed = 4; // Sobol, many cores auto rdlmG = ext::make_shared>>>(gLM, recoveries, numSimulations, 1.e-6, 2863311530UL); //auto rdlmG = ext::make_shared>(gLM, // recoveries, numSimulations, 1.e-6, 2863311530); theBskt->setLossModel(rdlmG); std::cout << "Random G Expected 10-Yr Losses: " << std::endl; std::cout << theBskt->expectedTrancheLoss(calcDate) << std::endl; #endif // --- StudentT Random model --------------------- // Sobol, many cores auto rdlmT = ext::make_shared>>>(ktTLossLM, recoveries, numSimulations, 1.e-6, 2863311530UL); //auto rdlmT = ext::make_shared>(ktTLossLM, // recoveries, numSimulations, 1.e-6, 2863311530); theBskt->setLossModel(rdlmT); std::cout << "Random T Expected 10-Yr Losses: " << std::endl; std::cout << theBskt->expectedTrancheLoss(calcDate) << std::endl; // Spot Loss latent model: #ifndef QL_PATCH_SOLARIS std::vector> fctrsWeightsRR(2 * hazardRates.size(), std::vector(1, std::sqrt(factorValue))); Real modelA = 2.2; auto sptLG = ext::make_shared( fctrsWeightsRR, recoveries, modelA, LatentModelIntegrationType::GaussianQuadrature, GaussianCopulaPolicy::initTraits()); auto sptLT = ext::make_shared(fctrsWeightsRR, recoveries, modelA, LatentModelIntegrationType::GaussianQuadrature, initT); // --- G Random Loss model --------------------- // Gaussian random joint default model: // Sobol, many cores auto rdLlmG = ext::make_shared>(sptLG, numSimulations, 1.e-6, 2863311530UL); theBskt->setLossModel(rdLlmG); std::cout << "Random Loss G Expected 10-Yr Losses: " << std::endl; std::cout << theBskt->expectedTrancheLoss(calcDate) << std::endl; // --- T Random Loss model --------------------- // Gaussian random joint default model: // Sobol, many cores auto rdLlmT = ext::make_shared>(sptLT, numSimulations, 1.e-6, 2863311530UL); theBskt->setLossModel(rdLlmT); std::cout << "Random Loss T Expected 10-Yr Losses: " << std::endl; std::cout << theBskt->expectedTrancheLoss(calcDate) << std::endl; // Base Correlation model set up to test coherence with base LHP model std::vector bcTenors = {{1, Years}, {5, Years}}; std::vector bcLossPercentages = {0.03, 0.12}; std::vector>> correls; // std::vector> corr1Y; // 3% corr1Y.emplace_back( ext::make_shared(fctrsWeights[0][0] * fctrsWeights[0][0])); // 12% corr1Y.emplace_back( ext::make_shared(fctrsWeights[0][0] * fctrsWeights[0][0])); correls.push_back(corr1Y); std::vector> corr2Y; // 3% corr2Y.emplace_back( ext::make_shared(fctrsWeights[0][0] * fctrsWeights[0][0])); // 12% corr2Y.emplace_back( ext::make_shared(fctrsWeights[0][0] * fctrsWeights[0][0])); correls.push_back(corr2Y); auto correlSurface = ext::make_shared>( // first one would do, all should be the same. defTS[0]->settlementDays(), defTS[0]->calendar(), Unadjusted, bcTenors, bcLossPercentages, correls, Actual365Fixed()); Handle> correlHandle(correlSurface); auto bcLMG_LHP_Bilin = ext::make_shared(correlHandle, recoveries, GaussianCopulaPolicy::initTraits()); theBskt->setLossModel(bcLMG_LHP_Bilin); std::cout << "Base Correlation GLHP Expected 10-Yr Losses: " << std::endl; std::cout << theBskt->expectedTrancheLoss(calcDate) << std::endl; #endif return 0; } catch (exception& e) { cerr << e.what() << endl; return 1; } catch (...) { cerr << "unknown error" << endl; return 1; } } QuantLib-1.41/Examples/BasketLosses/BasketLosses.vcxproj000066400000000000000000001053701513115055600233650ustar00rootroot00000000000000 Debug (static runtime) Win32 Debug (static runtime) x64 Debug Win32 Debug x64 Release (static runtime) Win32 Release (static runtime) x64 Release Win32 Release x64 BasketLosses {43A17E5B-EC94-4EB5-9D68-788BF234AE1F} Application false MultiByte Application false MultiByte Application false MultiByte Application false MultiByte Application false MultiByte Application false MultiByte Application false MultiByte Application false MultiByte <_ProjectFileVersion>11.0.1 .\bin\ .\bin\ .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ false false false false .\bin\ .\bin\ .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ false false false false .\bin\ .\bin\ .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ true true false false .\bin\ .\bin\ .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ true true false false BasketLosses-mt-sgd BasketLosses-x64-mt-sgd BasketLosses-mt-gd BasketLosses-x64-mt-gd BasketLosses-mt-s BasketLosses-x64-mt-s BasketLosses-mt BasketLosses-x64-mt .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\BasketLosses.tlb MaxSpeed stdcpp17 AnySuitable false Speed ..\..;%(AdditionalIncludeDirectories) NDEBUG;WIN32;_CONSOLE;_SCL_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS;%(PreprocessorDefinitions) true MultiThreadedDLL true false true true quantlib.hpp .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\BasketLosses.pch .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ true .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ Level3 true Default false NDEBUG;%(PreprocessorDefinitions) 0x0409 $(OutDir)$(TargetName)$(TargetExt) true ..\..\lib;%(AdditionalLibraryDirectories) .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\BasketLosses.pdb Console false MachineX86 .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\BasketLosses.tlb MaxSpeed stdcpp17 AnySuitable false Speed ..\..;%(AdditionalIncludeDirectories) NDEBUG;WIN32;_CONSOLE;_SCL_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS;%(PreprocessorDefinitions) true MultiThreadedDLL true false true true quantlib.hpp .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\BasketLosses.pch .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ true .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ Level3 true Default false NDEBUG;%(PreprocessorDefinitions) 0x0409 $(OutDir)$(TargetName)$(TargetExt) true ..\..\lib;%(AdditionalLibraryDirectories) .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\BasketLosses.pdb Console false .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\BasketLosses.tlb MaxSpeed stdcpp17 AnySuitable false Speed ..\..;%(AdditionalIncludeDirectories) NDEBUG;WIN32;_CONSOLE;_SCL_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS;%(PreprocessorDefinitions) true MultiThreaded true false true true quantlib.hpp .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\BasketLosses.pch .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ true .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ Level3 true Default false NDEBUG;%(PreprocessorDefinitions) 0x0409 $(OutDir)$(TargetName)$(TargetExt) true ..\..\lib;%(AdditionalLibraryDirectories) .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\BasketLosses.pdb Console false MachineX86 .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\BasketLosses.tlb MaxSpeed stdcpp17 AnySuitable false Speed ..\..;%(AdditionalIncludeDirectories) NDEBUG;WIN32;_CONSOLE;_SCL_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS;%(PreprocessorDefinitions) true MultiThreaded true false true true quantlib.hpp .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\BasketLosses.pch .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ true .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ Level3 true Default false NDEBUG;%(PreprocessorDefinitions) 0x0409 $(OutDir)$(TargetName)$(TargetExt) true ..\..\lib;%(AdditionalLibraryDirectories) .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\BasketLosses.pdb Console false .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\BasketLosses.tlb Disabled stdcpp17 false ..\..;%(AdditionalIncludeDirectories) _DEBUG;WIN32;_CONSOLE;_SCL_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebugDLL false true true quantlib.hpp .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\BasketLosses.pch .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ true .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ Level3 true EditAndContinue Default false _DEBUG;%(PreprocessorDefinitions) 0x0409 $(OutDir)$(TargetName)$(TargetExt) true ..\..\lib;%(AdditionalLibraryDirectories) true .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\BasketLosses.pdb Console false MachineX86 false .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\BasketLosses.tlb Disabled stdcpp17 false ..\..;%(AdditionalIncludeDirectories) _DEBUG;WIN32;_CONSOLE;_SCL_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebugDLL false true true quantlib.hpp .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\BasketLosses.pch .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ true .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ Level3 true ProgramDatabase Default false _DEBUG;%(PreprocessorDefinitions) 0x0409 $(OutDir)$(TargetName)$(TargetExt) true ..\..\lib;%(AdditionalLibraryDirectories) true .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\BasketLosses.pdb Console false .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\BasketLosses.tlb Disabled stdcpp17 false ..\..;%(AdditionalIncludeDirectories) _DEBUG;WIN32;_CONSOLE;_SCL_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebug false true true quantlib.hpp .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\BasketLosses.pch .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ true .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ Level3 true EditAndContinue Default false _DEBUG;%(PreprocessorDefinitions) 0x0409 $(OutDir)$(TargetName)$(TargetExt) true ..\..\lib;%(AdditionalLibraryDirectories) true .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\BasketLosses.pdb Console false MachineX86 false .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\BasketLosses.tlb Disabled stdcpp17 false ..\..;%(AdditionalIncludeDirectories) _DEBUG;WIN32;_CONSOLE;_SCL_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebug false true true quantlib.hpp .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\BasketLosses.pch .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ true .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\ Level3 true ProgramDatabase Default false _DEBUG;%(PreprocessorDefinitions) 0x0409 $(OutDir)$(TargetName)$(TargetExt) true ..\..\lib;%(AdditionalLibraryDirectories) true .\build\$(PlatformToolset)\$(Platform)\$(Configuration)\BasketLosses.pdb Console false {ad0a27da-91da-46a2-acbd-296c419ed3aa} false QuantLib-1.41/Examples/BasketLosses/BasketLosses.vcxproj.filters000066400000000000000000000016131513115055600250270ustar00rootroot00000000000000 {4FC737F1-C7A5-4376-A066-2A32D752A2FF} cpp;c;cxx;rc;def;r;odl;idl;hpj;bat {93995380-89BD-4b04-88EB-625FBE52EBFB} h;hpp;hxx;hm;inl {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe Source Files QuantLib-1.41/Examples/BasketLosses/CMakeLists.txt000066400000000000000000000003451513115055600221020ustar00rootroot00000000000000add_executable(BasketLosses BasketLosses.cpp) target_link_libraries(BasketLosses ql_library ${QL_THREAD_LIBRARIES}) if (QL_INSTALL_EXAMPLES) install(TARGETS BasketLosses RUNTIME DESTINATION ${QL_INSTALL_EXAMPLESDIR}) endif() QuantLib-1.41/Examples/BermudanSwaption/000077500000000000000000000000001513115055600202205ustar00rootroot00000000000000QuantLib-1.41/Examples/BermudanSwaption/BermudanSwaption.cpp000066400000000000000000000373041513115055600242150ustar00rootroot00000000000000/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /*! Copyright (C) 2002, 2003 Sadruddin Rejeb Copyright (C) 2004 Ferdinando Ametrano Copyright (C) 2005, 2006, 2007 StatPro Italia srl 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. */ #include #if !defined(BOOST_ALL_NO_LIB) && defined(BOOST_MSVC) # include #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace QuantLib; //Number of swaptions to be calibrated to... Size numRows = 5; Size numCols = 5; Integer swapLengths[] = { 1, 2, 3, 4, 5}; Volatility 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}; void calibrateModel( const ext::shared_ptr& model, const std::vector>& swaptions) { std::vector> helpers(swaptions.begin(), swaptions.end()); LevenbergMarquardt om; model->calibrate(helpers, om, EndCriteria(400, 100, 1.0e-8, 1.0e-8, 1.0e-8)); // Output the implied Black volatilities for (Size i=0; imodelValue(); Volatility implied = swaptions[i]->impliedVolatility(npv, 1e-4, 1000, 0.05, 0.50); Volatility diff = implied - swaptionVols[k]; std::cout << i+1 << "x" << swapLengths[j] << std::setprecision(5) << std::noshowpos << ": model " << std::setw(7) << io::volatility(implied) << ", market " << std::setw(7) << io::volatility(swaptionVols[k]) << " (" << std::setw(7) << std::showpos << io::volatility(diff) << std::noshowpos << ")\n"; } } int main(int, char* []) { try { std::cout << std::endl; Date todaysDate(15, February, 2002); Calendar calendar = TARGET(); Date settlementDate(19, February, 2002); Settings::instance().evaluationDate() = todaysDate; // flat yield term structure impling 1x5 swap at 5% auto flatRate = ext::make_shared(0.04875825); Handle rhTermStructure( ext::make_shared( settlementDate, Handle(flatRate), Actual365Fixed())); // Define the ATM/OTM/ITM swaps Frequency fixedLegFrequency = Annual; BusinessDayConvention fixedLegConvention = Unadjusted; BusinessDayConvention floatingLegConvention = ModifiedFollowing; DayCounter fixedLegDayCounter = Thirty360(Thirty360::European); Frequency floatingLegFrequency = Semiannual; Swap::Type type = Swap::Payer; Rate dummyFixedRate = 0.03; auto indexSixMonths = ext::make_shared(rhTermStructure); Date startDate = calendar.advance(settlementDate,1,Years, floatingLegConvention); Date maturity = calendar.advance(startDate,5,Years, floatingLegConvention); Schedule fixedSchedule(startDate,maturity,Period(fixedLegFrequency), calendar,fixedLegConvention,fixedLegConvention, DateGeneration::Forward,false); Schedule floatSchedule(startDate,maturity,Period(floatingLegFrequency), calendar,floatingLegConvention,floatingLegConvention, DateGeneration::Forward,false); auto swap = ext::make_shared( type, 1000.0, fixedSchedule, dummyFixedRate, fixedLegDayCounter, floatSchedule, indexSixMonths, 0.0, indexSixMonths->dayCounter()); swap->setPricingEngine(ext::make_shared(rhTermStructure)); Rate fixedATMRate = swap->fairRate(); Rate fixedOTMRate = fixedATMRate * 1.2; Rate fixedITMRate = fixedATMRate * 0.8; auto atmSwap = ext::make_shared( type, 1000.0, fixedSchedule, fixedATMRate, fixedLegDayCounter, floatSchedule, indexSixMonths, 0.0, indexSixMonths->dayCounter()); auto otmSwap = ext::make_shared( type, 1000.0, fixedSchedule, fixedOTMRate, fixedLegDayCounter, floatSchedule, indexSixMonths, 0.0, indexSixMonths->dayCounter()); auto itmSwap = ext::make_shared( type, 1000.0, fixedSchedule, fixedITMRate, fixedLegDayCounter, floatSchedule, indexSixMonths, 0.0, indexSixMonths->dayCounter()); // defining the swaptions to be used in model calibration std::vector swaptionMaturities; swaptionMaturities.emplace_back(1, Years); swaptionMaturities.emplace_back(2, Years); swaptionMaturities.emplace_back(3, Years); swaptionMaturities.emplace_back(4, Years); swaptionMaturities.emplace_back(5, Years); std::vector> swaptions; // List of times that have to be included in the timegrid std::list