pax_global_header00006660000000000000000000000064152251213640014513gustar00rootroot0000000000000052 comment=6b57206e04598f092efee66e3b367efc84771995 QuantLib-1.43/000077500000000000000000000000001522512136400131615ustar00rootroot00000000000000QuantLib-1.43/.appveyor.yml000066400000000000000000000003221522512136400156240ustar00rootroot00000000000000image: 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.43/.ci/000077500000000000000000000000001522512136400136325ustar00rootroot00000000000000QuantLib-1.43/.ci/Unity.props000066400000000000000000000002551522512136400160310ustar00rootroot00000000000000 true QuantLib-1.43/.ci/VS2017.props000066400000000000000000000014711522512136400155640ustar00rootroot00000000000000 false C:\Libraries\boost_1_69_0;%(AdditionalIncludeDirectories) /bigobj %(AdditionalOptions) Disabled C:\Libraries\boost_1_69_0\lib64-msvc-14.1;%(AdditionalLibraryDirectories) QuantLib-1.43/.ci/VS2019.alt.props000066400000000000000000000013561522512136400163470ustar00rootroot00000000000000 C:\local\boost;%(AdditionalIncludeDirectories) /bigobj %(AdditionalOptions) true stdcpp17 _SILENCE_ALL_CXX17_DEPRECATION_WARNINGS;%(PreprocessorDefinitions) QuantLib-1.43/.ci/VS2019.props000066400000000000000000000010741522512136400155650ustar00rootroot00000000000000 C:\local\boost;%(AdditionalIncludeDirectories) /bigobj %(AdditionalOptions) true QuantLib-1.43/.ci/VS2022.alt.props000066400000000000000000000013561522512136400163410ustar00rootroot00000000000000 C:\local\boost;%(AdditionalIncludeDirectories) /bigobj %(AdditionalOptions) true stdcpp17 _SILENCE_ALL_CXX17_DEPRECATION_WARNINGS;%(PreprocessorDefinitions) QuantLib-1.43/.ci/VS2022.props000066400000000000000000000010741522512136400155570ustar00rootroot00000000000000 C:\local\boost;%(AdditionalIncludeDirectories) /bigobj %(AdditionalOptions) true QuantLib-1.43/.ci/VS2026.alt.props000066400000000000000000000013561522512136400163450ustar00rootroot00000000000000 C:\local\boost;%(AdditionalIncludeDirectories) /bigobj %(AdditionalOptions) true stdcpp17 _SILENCE_ALL_CXX17_DEPRECATION_WARNINGS;%(PreprocessorDefinitions) QuantLib-1.43/.ci/VS2026.props000066400000000000000000000010741522512136400155630ustar00rootroot00000000000000 C:\local\boost;%(AdditionalIncludeDirectories) /bigobj %(AdditionalOptions) true QuantLib-1.43/.ci/userconfig2019.alt.hpp000066400000000000000000000102701522512136400176020ustar00rootroot00000000000000/* -*- 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.43/.ci/userconfig2022.alt.hpp000066400000000000000000000102661522512136400176010ustar00rootroot00000000000000/* -*- 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.43/.ci/userconfig2026.alt.hpp000066400000000000000000000102661522512136400176050ustar00rootroot00000000000000/* -*- 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.43/.clang-format000066400000000000000000000021431522512136400155340ustar00rootroot00000000000000--- 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-concat-nested-namespaces, -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.43/.codecov.yml000066400000000000000000000015411522512136400154050ustar00rootroot00000000000000coverage: 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.43/.github/000077500000000000000000000000001522512136400145215ustar00rootroot00000000000000QuantLib-1.43/.github/boring-cyborg.yml000066400000000000000000000011451522512136400200100ustar00rootroot00000000000000 # 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.43/.github/dependabot.yml000066400000000000000000000002611522512136400173500ustar00rootroot00000000000000version: 2 updates: - package-ecosystem: "github-actions" directory: "/" schedule: # Check for updates to GitHub Actions every weekday interval: "weekly" QuantLib-1.43/.github/workflows/000077500000000000000000000000001522512136400165565ustar00rootroot00000000000000QuantLib-1.43/.github/workflows/cmake-latest-runners.yml000066400000000000000000000104671522512136400233550ustar00rootroot00000000000000name: CMake build for the latest runners and C++ standards on: schedule: # At 02:35 on Monday - cron: '35 2 * * 1' workflow_dispatch: workflow_call: 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@v7 - 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.91.0/binaries/boost_1_91_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.91.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.43/.github/workflows/cmake.yml000066400000000000000000000173011522512136400203630ustar00rootroot00000000000000name: CMake build on: push: branches: - '**' pull_request: jobs: cmake-linux: runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 - 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@v7 - 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@v7 - 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.91.0/source/boost_1_91_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_91_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@v7 - 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.91.0/source/boost_1_91_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_91_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@v7 - 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@v7 - 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.43/.github/workflows/codeql-analysis.yml000066400000000000000000000027161522512136400223770ustar00rootroot00000000000000# 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@v7 # 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.43/.github/workflows/copyrights.yml000066400000000000000000000011661522512136400215000ustar00rootroot00000000000000name: Update copyright list on: push: branches-ignore: - 'dependabot/**' jobs: check-copyrights: runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 - 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.43/.github/workflows/coveralls.yml000066400000000000000000000026001522512136400212710ustar00rootroot00000000000000name: Coverage report on: push: branches: - master pull_request: workflow_dispatch: jobs: coverage: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v7 - 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.43/.github/workflows/devenv-images.yml000066400000000000000000000032761522512136400220430ustar00rootroot00000000000000name: 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@v7 - 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@v4 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.43/.github/workflows/doxygen.yml000066400000000000000000000012601522512136400207550ustar00rootroot00000000000000name: Check doc generation on: push: branches: - '**' pull_request: jobs: docs: runs-on: macos-latest steps: - uses: actions/checkout@v7 - 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@v7 - name: Check run: | ./tools/check_all_header_docs.sh QuantLib-1.43/.github/workflows/filelists.yml000066400000000000000000000007501522512136400213010ustar00rootroot00000000000000name: Check CMake file list and VC++ projects on: push: branches: - '**' pull_request: jobs: filelists: runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 - 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.43/.github/workflows/generated-headers.yml000066400000000000000000000017231522512136400226530ustar00rootroot00000000000000name: Update generated headers on: push: branches-ignore: - 'dependabot/**' jobs: generate-headers: runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 - 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.43/.github/workflows/headers.yml000066400000000000000000000012641522512136400207170ustar00rootroot00000000000000name: Compile single headers on: push: branches: - '**' pull_request: jobs: headers: runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 - 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.43/.github/workflows/includes.yml000066400000000000000000000014541522512136400211130ustar00rootroot00000000000000name: Fix inclusions of ql headers in double quotes on: push: branches-ignore: - 'dependabot/**' jobs: check-includes: runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 - 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.43/.github/workflows/increase-version-number.yml000066400000000000000000000036451522512136400240530ustar00rootroot00000000000000name: Increase version number on: release: types: [published] jobs: increase-version: runs-on: ubuntu-latest if: ${{ github.event.release.prerelease == false }} steps: - uses: actions/checkout@v7 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=${{ github.ref_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: increase-version delete-branch: true base: master title: 'Set version to 1.${{ env.NEXT_MINOR }}-dev' author: lballabio[bot] <224797326+lballabio-bot@users.noreply.github.com> QuantLib-1.43/.github/workflows/license-url.yml000066400000000000000000000013641522512136400215270ustar00rootroot00000000000000name: Update old license links on: push: branches-ignore: - 'dependabot/**' jobs: license-urls: runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 - 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.43/.github/workflows/linux-full-tests.yml000066400000000000000000000156351522512136400225520ustar00rootroot00000000000000name: Linux build with full test matrix on: schedule: - cron: '0 0 * * 0' workflow_dispatch: workflow_call: 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@v7 - 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.43/.github/workflows/linux-nondefault.yml000066400000000000000000000133331522512136400226000ustar00rootroot00000000000000name: Linux build with non-default configuration on: schedule: - cron: '0 0 * * 0' workflow_dispatch: workflow_call: 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: oracular 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@v7 - 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.43/.github/workflows/linux.yml000066400000000000000000000130761522512136400204470ustar00rootroot00000000000000name: 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@v7 - 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.43/.github/workflows/macos-nondefault.yml000066400000000000000000000025261522512136400225450ustar00rootroot00000000000000name: Mac OS build with non-default configuration on: schedule: - cron: '0 0 * * 0' workflow_dispatch: workflow_call: 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 steps: - uses: actions/checkout@v7 - 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.43/.github/workflows/macos.yml000066400000000000000000000023251522512136400204050ustar00rootroot00000000000000name: 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@v7 - 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.43/.github/workflows/misspell.yml000066400000000000000000000012021522512136400211240ustar00rootroot00000000000000name: Misspell fixer on: push: branches-ignore: - 'dependabot/**' jobs: check: runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 - 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.43/.github/workflows/msvc-all-configs.yml000066400000000000000000000044051522512136400224500ustar00rootroot00000000000000name: Windows build with all configurations on: schedule: - cron: '0 0 * * 0' workflow_dispatch: workflow_call: jobs: msbuild: strategy: fail-fast: false matrix: toolset: [v142, v143, v145] platform: [x64, Win32] configuration: ['Release', 'Debug', 'Release (static runtime)', 'Debug (static runtime)'] unity: [unity, singles] include: - toolset: v142 boost_version: 77 vsversion: 2019 image: windows-2022 - toolset: v143 boost_version: 90 vsversion: 2022 image: windows-2022 - toolset: v145 boost_version: 90 vsversion: 2026 image: windows-2025-vs2026 runs-on: ${{ matrix.image }} steps: - uses: actions/checkout@v7 - name: Setup MSVC++ environment uses: microsoft/setup-msbuild@v3 with: msbuild-architecture: 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.43/.github/workflows/msvc-analysis.yml000066400000000000000000000030521522512136400220720ustar00rootroot00000000000000name: 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@v7 - name: Setup run: | $Url = "https://archives.boost.io/release/1.91.0/source/boost_1_91_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_91_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@v7 with: name: sarif-file path: ${{ steps.run-analysis.outputs.sarif }} QuantLib-1.43/.github/workflows/msvc-nondefault.yml000066400000000000000000000041611522512136400224100ustar00rootroot00000000000000name: Windows build with non-default configuration on: schedule: - cron: '0 0 * * 0' workflow_dispatch: workflow_call: jobs: msbuild: strategy: fail-fast: false matrix: toolset: [v142, v143, v145] platform: [x64, Win32] unity: [unity, singles] include: - toolset: v142 boost_version: 77 vsversion: 2019 image: windows-2022 - toolset: v143 boost_version: 91 vsversion: 2022 image: windows-2022 - toolset: v145 boost_version: 91 vsversion: 2026 image: windows-2025-vs2026 runs-on: ${{ matrix.image }} steps: - uses: actions/checkout@v7 - name: Setup MSVC++ environment uses: microsoft/setup-msbuild@v3 with: msbuild-architecture: 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.43/.github/workflows/msvc.yml000066400000000000000000000036661522512136400202640ustar00rootroot00000000000000name: Windows build on: push: branches: - '**' pull_request: jobs: msbuild: strategy: fail-fast: false matrix: toolset: [v142, v143, v145] unity: [unity, singles] include: - toolset: v142 boost_version: 77 vsversion: 2019 image: windows-2022 - toolset: v143 boost_version: 90 vsversion: 2022 image: windows-2022 - toolset: v145 boost_version: 90 vsversion: 2026 image: windows-2025-vs2026 runs-on: ${{ matrix.image }} steps: - uses: actions/checkout@v7 - name: Setup MSVC++ environment uses: microsoft/setup-msbuild@v3 with: msbuild-architecture: 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.43/.github/workflows/namespaces.yml000066400000000000000000000023531522512136400214230ustar00rootroot00000000000000name: Fix deprecated uses of ext namespace on: push: branches-ignore: - 'dependabot/**' jobs: check-namespaces: runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 - 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.43/.github/workflows/prepare-patch-release.yml000066400000000000000000000042711522512136400234560ustar00rootroot00000000000000name: Prepare patch release on: workflow_dispatch: jobs: update-for-release: runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 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_TAG=v${LATEST_RELEASE} | tee -a $GITHUB_ENV echo ${LATEST_RELEASE} | awk -F '.' '{ print "LAST_MINOR=" $2 }' | tee -a $GITHUB_ENV echo ${LATEST_RELEASE} | awk -F '.' '{ print "NEXT_PATCH=" $3 + 1 }' | tee -a $GITHUB_ENV - name: Update version numbers run: | sed -i -e "s/^AC_INIT(\[QuantLib\].*$/AC_INIT([QuantLib], [1.${LAST_MINOR}.${NEXT_PATCH}],/g" configure.ac sed -i -e "s/^#define QL_VERSION.*$/#define QL_VERSION \"1.${LAST_MINOR}.${NEXT_PATCH}\"/g" ql/version.hpp sed -i -e "s/^#define QL_HEX_VERSION.*$/#define QL_HEX_VERSION 0x01${LAST_MINOR}0${NEXT_PATCH}f0/g" ql/version.hpp sed -i -e "s/^set(PACKAGE_VERSION .*$/set(PACKAGE_VERSION \"1.${LAST_MINOR}.${NEXT_PATCH}\"\)/g" CMakeLists.txt sed -i -e "s/^set(PACKAGE_VERSION_HEX.*$/set(PACKAGE_VERSION_HEX \"0x01${LAST_MINOR}0${NEXT_PATCH}f0\"\)/g" CMakeLists.txt git commit -a -m "Set version to 1.${LAST_MINOR}.${NEXT_PATCH}" - name: Update ChangeLog run: | git log --pretty=medium --date=rfc --stat --grep='Merge [^p]' --grep='[Mm]erged' --grep='[Pp]ull from' --invert-grep ${LATEST_TAG}.. > 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.LAST_MINOR }}.${{ env.NEXT_PATCH }} final' author: lballabio[bot] <224797326+lballabio-bot@users.noreply.github.com> QuantLib-1.43/.github/workflows/prepare-release-candidate.yml000066400000000000000000000037541522512136400243000ustar00rootroot00000000000000name: Prepare release candidate on: workflow_dispatch: jobs: update-for-rc: runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 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_TAG=v${LATEST_RELEASE} | 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 ${LATEST_TAG}.. > 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.43/.github/workflows/prepare-release.yml000066400000000000000000000037571522512136400223710ustar00rootroot00000000000000name: Prepare release on: workflow_dispatch: jobs: update-for-release: runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 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_TAG=v${LATEST_RELEASE} | 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 ${LATEST_TAG}.. > 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.43/.github/workflows/prerelease-checks.yml000066400000000000000000000007411522512136400226700ustar00rootroot00000000000000name: Pre-release checks on: workflow_dispatch: jobs: full-linux-tests: uses: ./.github/workflows/linux-full-tests.yml full-msvc-tests: uses: ./.github/workflows/msvc-all-configs.yml linux-alt-config: uses: ./.github/workflows/linux-nondefault.yml msvc-alt-config: uses: ./.github/workflows/msvc-nondefault.yml macos-alt-config: uses: ./.github/workflows/macos-nondefault.yml cmake-latest: uses: ./.github/workflows/cmake-latest-runners.yml QuantLib-1.43/.github/workflows/publish-release-candidate.yml000066400000000000000000000021711522512136400243000ustar00rootroot00000000000000name: Publish release candidate on: push: tags: - 'v1.*-rc' permissions: contents: write packages: write jobs: publish-rc: runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 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.43/.github/workflows/publish-release.yml000066400000000000000000000065101522512136400223670ustar00rootroot00000000000000name: Draft new release on: push: tags: - 'v1.[0-9]+' - 'v1.[0-9]+.[0-9]+' permissions: contents: write packages: write jobs: draft-release: runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 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: Remove prerelease continue-on-error: true env: GH_TOKEN: ${{ github.token }} run: | gh release delete ${{ github.ref_name }}-rc --cleanup-tag --yes - 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@v7 - 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@v7 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.43/.github/workflows/sanitizer.yml000066400000000000000000000026461522512136400213210ustar00rootroot00000000000000name: 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@v7 - 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@v7 - 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.43/.github/workflows/stale.yml000066400000000000000000000022241522512136400204110ustar00rootroot00000000000000name: 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.43/.github/workflows/sync-org-repo.yml000066400000000000000000000014511522512136400220060ustar00rootroot00000000000000name: Sync quantlib organization repository on: release: types: [published] permissions: contents: write jobs: sync-org-repo: runs-on: ubuntu-latest if: ${{ github.event.release.prerelease == false }} steps: - uses: actions/checkout@v7 with: repository: quantlib/QuantLib token: ${{ secrets.ORG_PUSH_PAT }} ref: master path: quantlib - name: Setup second remote run: | cd quantlib git remote add src https://github.com/lballabio/QuantLib.git git fetch src - name: Push new commits env: GITHUB_TOKEN: ${{ secrets.ORG_PUSH_PAT }} run: | cd quantlib git push origin ${{ github.ref_name }} git merge --ff-only ${{ github.ref_name }} git push origin master QuantLib-1.43/.github/workflows/sync-qldefines.yml000066400000000000000000000017351522512136400222330ustar00rootroot00000000000000name: 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@v7 - 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.43/.github/workflows/test-macros.yml000066400000000000000000000017321522512136400215450ustar00rootroot00000000000000name: Replace Boost macros that might not work with AAD types on: push: branches-ignore: - 'dependabot/**' jobs: check-namespaces: runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 - name: Check run: | sed -i -e 's/BOOST_CHECK_SMALL\b/QL_CHECK_SMALL/g' test-suite/*.cpp sed -i -e 's/BOOST_CHECK_CLOSE\b/QL_CHECK_CLOSE/g' test-suite/*.cpp sed -i -e 's/BOOST_CHECK_CLOSE_FRACTION\b/QL_CHECK_CLOSE_FRACTION/g' test-suite/*.cpp - uses: peter-evans/create-pull-request@v8 with: token: ${{ secrets.MACHINE_ACCOUNT_PAT }} push-to-fork: ${{ vars.MACHINE_ACCOUNT }}/QuantLib branch: fix-boost-test-macros-${{ github.ref_name }} delete-branch: true commit-message: 'Replace Boost macros that might not work with AAD types' title: 'Replace Boost macros that might not work with AAD types' author: lballabio[bot] <224797326+lballabio-bot@users.noreply.github.com> QuantLib-1.43/.github/workflows/test-times.yml000066400000000000000000000021551522512136400214020ustar00rootroot00000000000000name: Check test times on: push: branches: - '**' pull_request: jobs: check-test-times: runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 - 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 all tests run: | ./test-suite/quantlib-test-suite --logger=JUNIT,warning,all.xml:HRF,message - name: Save test times uses: actions/upload-artifact@v7 with: name: test-reports path: ./*.xml - name: Check test times run: | python ./tools/check_test_times.py QuantLib-1.43/.github/workflows/tidy.yml000066400000000000000000000021461522512136400202550ustar00rootroot00000000000000name: Apply clang-tidy fixes on: schedule: - cron: '0 0 * * 0' workflow_dispatch: jobs: check: runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v7 - 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.43/.gitignore000066400000000000000000000036611522512136400151570ustar00rootroot00000000000000# 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.43/.lgtm.yml000066400000000000000000000002461522512136400147270ustar00rootroot00000000000000 path_classifiers: docs: - Docs - Examples test: - test-suite library: - tools queries: - exclude: cpp/fixme-comment QuantLib-1.43/.lsan.txt000066400000000000000000000000011522512136400147240ustar00rootroot00000000000000 QuantLib-1.43/.misspell-fixer.ignore000066400000000000000000000000221522512136400174010ustar00rootroot00000000000000^./ChangeLog.txt QuantLib-1.43/.msvc-analysis.ruleset000066400000000000000000000010041522512136400174300ustar00rootroot00000000000000 QuantLib-1.43/CITATION.cff000066400000000000000000000005551522512136400150600ustar00rootroot00000000000000cff-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.43/CMakeLists.txt000066400000000000000000000252621522512136400157300ustar00rootroot00000000000000cmake_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 43) 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.43") set(PACKAGE_VERSION_HEX "0x014300f0") 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.43/CMakePresets.json000066400000000000000000000176001522512136400164060ustar00rootroot00000000000000{ "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.43/CONTRIBUTING.md000066400000000000000000000036311522512136400154150ustar00rootroot00000000000000 # 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.43/ChangeLog.txt000066400000000000000000004075471522512136400155720ustar00rootroot00000000000000commit e7bd700dfd6416b4bb6749f018f3c2dc4ed19474 Author: lballabio[bot] <224797326+lballabio-bot@users.noreply.github.com> Date: Mon, 13 Jul 2026 07:09:26 +0000 Set version to 1.43 CMakeLists.txt | 4 ++-- configure.ac | 2 +- ql/version.hpp | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) commit 4567efac4393f56eb52bd4ca5e63a6b1829e0a81 Merge: 489847af9 2073a7089 Author: Luigi Ballabio Date: Mon, 6 Jul 2026 08:58:03 +0200 Make L-BFGS-B compatible with expression-template Real types (#2647) commit 2073a7089aa1364a6f72d9c94c39fc3327d17db3 Author: auto-differentiation-dev <107129969+auto-differentiation-dev@users.noreply.github.com> Date: Sat, 4 Jul 2026 20:49:49 +0100 Make L-BFGS-B compatible with expression-template Real types Wrap mixed-type ternary and std::max operands in Real(...); no-op for the default Real = double. ql/math/optimization/lbfgsb.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 489847af9fd4a36236fd877795c60b326bb4676b Author: lballabio[bot] <224797326+lballabio-bot@users.noreply.github.com> Date: Wed, 1 Jul 2026 15:55:00 +0000 Update changelog ChangeLog.txt | 3397 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 3370 insertions(+), 27 deletions(-) commit 91c4ef46024b640427e3e43dbd8b4a5669664cf0 Author: lballabio[bot] <224797326+lballabio-bot@users.noreply.github.com> Date: Wed, 1 Jul 2026 15:55:00 +0000 Set version to 1.43-rc CMakeLists.txt | 4 ++-- configure.ac | 2 +- ql/version.hpp | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) commit 0e5b4e0f531cc8d3749bdcb2f202b8d615a97697 Author: Luigi Ballabio Date: Wed, 1 Jul 2026 12:18:15 +0200 Fix link to PR News.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7c776524bc22fe777e1857a0d7d6a1d2b61e0b67 Author: Luigi Ballabio Date: Wed, 1 Jul 2026 12:15:32 +0200 Update news News.md | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 0ee883bbe7716b34d1a913b6e5d2538fe7658a91 Author: lballabio[bot] <224797326+lballabio-bot@users.noreply.github.com> Date: Wed, 1 Jul 2026 08:55:23 +0000 Automated fixes by clang-tidy ql/math/optimization/lbfgsb.cpp | 1 - 1 file changed, 1 deletion(-) commit d4aedd08b38784374f977d4f054ce4e791b3a0df Author: Luigi Ballabio Date: Wed, 1 Jul 2026 11:07:44 +0200 Update list of contributors Contributors.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 92e247a1443f8ecf56b65b53b63a88779370695f Author: Luigi Ballabio Date: Wed, 1 Jul 2026 11:07:30 +0200 Edit a few test messages test-suite/constnotionalcrosscurrencybasisswap.cpp | 4 ++-- test-suite/constnotionalcrosscurrencyfixedvsfloatingswap.cpp | 2 +- test-suite/constnotionalcrosscurrencyswap.cpp | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) commit 37afeaa399bf29f9003259a2e2d4880fea989347 Author: lballabio[bot] <224797326+lballabio-bot@users.noreply.github.com> Date: Sun, 28 Jun 2026 02:25:34 +0000 Automated fixes by clang-tidy ql/math/optimization/lbfgsb.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d99d5dff9b96051b803ac365bfd7e8dcfdf15be2 Author: lballabio[bot] <224797326+lballabio-bot@users.noreply.github.com> Date: Wed, 24 Jun 2026 09:47:30 +0000 Update copyright list in license LICENSE.TXT | 1 + 1 file changed, 1 insertion(+) commit 3b921d4170834f6b96d8e93081fbc67a4db6a0f0 Merge: 9863b578a 777a46dd1 Author: Luigi Ballabio Date: Wed, 24 Jun 2026 11:40:48 +0200 Add L-BFGS-B Limited-Memory Bound-Constrained Optimizer (#2635) commit 777a46dd1c1213e82bee6595c39df3f900e05b78 Author: Colin <34983726+colalb1@users.noreply.github.com> Date: Tue, 23 Jun 2026 15:32:19 -0500 Adding context for algorithmic tradeoffs + fTol corrections. ql/math/optimization/lbfgsb.hpp | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit baf7fdb789dcd70dba77d5ac926133432461757d Author: Colin <34983726+colalb1@users.noreply.github.com> Date: Tue, 23 Jun 2026 15:28:42 -0500 Updating tests to use proper fTol instead of factr. test-suite/optimizers.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 9cd5964f96a6acb9eac040d3a810b66de9e51de8 Author: Colin <34983726+colalb1@users.noreply.github.com> Date: Tue, 23 Jun 2026 15:28:08 -0500 Update LBFGSB to use fTol instead of factr, similar to other optimization methods. ql/math/optimization/lbfgsb.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 9863b578af0caa4cecabf697196533e84a8308b6 Merge: 7f697de95 42486f796 Author: Luigi Ballabio Date: Tue, 23 Jun 2026 11:03:29 +0200 introduce CashFlow::isCoupon() to replace dynamic casts (#2638) commit 7f697de95e4f32ffb46929ff2e9d4405ed94d5cd Merge: 37ef07e19 de0f71df4 Author: Luigi Ballabio Date: Tue, 23 Jun 2026 10:59:53 +0200 Pricing Bonds with face values other than $100 (#2637) commit a14bcdceb9cbe51e51acbe431a6c807ab74d26aa Author: Colin Alberts Date: Mon, 22 Jun 2026 12:46:29 -0500 Adding l-bfgs-b files to other compilation files (cicd checks failed). QuantLib.vcxproj | 2 ++ QuantLib.vcxproj.filters | 6 ++++++ 2 files changed, 8 insertions(+) commit 42486f796fff424093c781771901ee69424dbf80 Author: Peter Caspers Date: Mon, 22 Jun 2026 18:47:36 +0200 replace dnyamic casts to Coupon Examples/BermudanSwaption/BermudanSwaption.cpp | 2 +- ql/cashflows/cashflows.cpp | 30 +++++++++++----------- ql/cashflows/conundrumpricer.cpp | 4 +-- ql/cashflows/lineartsrpricer.cpp | 2 +- ql/experimental/basismodels/swaptioncfs.cpp | 14 +++++----- ql/experimental/callablebonds/callablebond.cpp | 2 +- ql/experimental/credit/integralcdoengine.cpp | 6 ++--- ql/experimental/credit/midpointcdoengine.cpp | 6 ++--- ql/instruments/assetswap.cpp | 2 +- ql/instruments/bond.cpp | 2 +- ql/instruments/creditdefaultswap.cpp | 2 +- .../utilities/fdmaffinemodelswapinnervalue.hpp | 2 +- ql/pricingengines/bond/riskybondengine.cpp | 2 +- test-suite/bermudanswaption.cpp | 10 ++++---- test-suite/cashflows.cpp | 18 ++++++------- test-suite/creditdefaultswap.cpp | 14 +++++----- 16 files changed, 59 insertions(+), 59 deletions(-) commit ed3b0ae805823064f085c5b5a8ebefb401b29091 Author: Peter Caspers Date: Mon, 22 Jun 2026 18:47:29 +0200 fix ql/cashflow.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4fb260b134c88a6d54cc6c30ea6059e85b556cca Author: Peter Caspers Date: Mon, 22 Jun 2026 18:41:01 +0200 Revert "introduce CashFlow::isCoupon() to replace dynamic casts" This reverts commit 057720f26b838e4b4bad7fd48d3adf83dce73185. ql/cashflows/cashflows.cpp | 75 +++++++++++++--------- ql/cashflows/conundrumpricer.cpp | 8 +-- ql/cashflows/lineartsrpricer.cpp | 3 +- ql/experimental/basismodels/swaptioncfs.cpp | 28 ++++---- ql/experimental/callablebonds/callablebond.cpp | 3 +- ql/experimental/credit/integralcdoengine.cpp | 17 ++--- ql/experimental/credit/midpointcdoengine.cpp | 12 ++-- ql/instruments/assetswap.cpp | 7 +- ql/instruments/bond.cpp | 4 +- ql/instruments/creditdefaultswap.cpp | 4 +- .../utilities/fdmaffinemodelswapinnervalue.hpp | 3 +- ql/pricingengines/bond/riskybondengine.cpp | 4 +- 12 files changed, 83 insertions(+), 85 deletions(-) commit 1f3c4c5f1a10615edfa88b891b89d9e68bdd0dad Author: Peter Caspers Date: Mon, 22 Jun 2026 18:40:33 +0200 Revert "fix scope" This reverts commit cbbb119b5456b766b753d15abf24faa5043d8d06. ql/experimental/credit/midpointcdoengine.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit f6767709c528f549c24f48e53d30c990368f49ef Author: Peter Caspers Date: Mon, 22 Jun 2026 18:40:33 +0200 Revert "typo" This reverts commit 8dab2eb701b691eec97fe6fce031801daadbddef. ql/experimental/credit/midpointcdoengine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 63caf8389c8709e428f55f5a8c6ac48365ba2bbd Author: Peter Caspers Date: Mon, 22 Jun 2026 18:40:32 +0200 Revert "typos" This reverts commit d27af59b3addfe6e6c60317934f63f89eb3a3ee2. ql/instruments/creditdefaultswap.cpp | 2 +- ql/pricingengines/bond/riskybondengine.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit ac020c660b1498434da2d02a5c726c82eaa1042b Author: Peter Caspers Date: Mon, 22 Jun 2026 18:40:29 +0200 Revert "do not require a coupon" This reverts commit 0563fa85551b900dc6afd924fd2b41e33ffeb83e. ql/experimental/callablebonds/callablebond.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 3a7d6cf0747fbf83ee341074a1a745d2c5f53c86 Author: Peter Caspers Date: Mon, 22 Jun 2026 18:39:56 +0200 drop in replacement for dynamic cast to Coupon ql/cashflow.hpp | 9 ++++++--- ql/cashflows/coupon.cpp | 3 +++ ql/cashflows/coupon.hpp | 4 +++- 3 files changed, 12 insertions(+), 4 deletions(-) commit 37ef07e19eb9df4d742aeb508eac586ab1c89e82 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Jun 2026 11:22:30 +0000 Bump actions/checkout from 6 to 7 Bumps [actions/checkout](https://github.com/actions/checkout) from 6 to 7. - [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/v6...v7) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '7' 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-patch-release.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 | 6 +++--- .github/workflows/sanitizer.yml | 4 ++-- .github/workflows/sync-org-repo.yml | 2 +- .github/workflows/sync-qldefines.yml | 2 +- .github/workflows/test-macros.yml | 2 +- .github/workflows/test-times.yml | 2 +- .github/workflows/tidy.yml | 2 +- 35 files changed, 44 insertions(+), 44 deletions(-) commit de0f71df438d3d56d8509d4cd6bfe3d8a80ef91f Author: Hetal Sharma Date: Mon, 22 Jun 2026 15:10:21 +0530 Pricing Bonds with face values other than ql/instruments/bond.hpp | 6 ++++++ ql/pricingengines/bond/bondfunctions.hpp | 5 +++++ 2 files changed, 11 insertions(+) commit 0563fa85551b900dc6afd924fd2b41e33ffeb83e Author: Peter Caspers Date: Mon, 22 Jun 2026 08:47:12 +0200 do not require a coupon ql/experimental/callablebonds/callablebond.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit d27af59b3addfe6e6c60317934f63f89eb3a3ee2 Author: Peter Caspers Date: Sun, 21 Jun 2026 22:04:01 +0200 typos ql/instruments/creditdefaultswap.cpp | 2 +- ql/pricingengines/bond/riskybondengine.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 8dab2eb701b691eec97fe6fce031801daadbddef Author: Peter Caspers Date: Sun, 21 Jun 2026 21:55:18 +0200 typo ql/experimental/credit/midpointcdoengine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cbbb119b5456b766b753d15abf24faa5043d8d06 Author: Peter Caspers Date: Sun, 21 Jun 2026 21:52:33 +0200 fix scope ql/experimental/credit/midpointcdoengine.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 057720f26b838e4b4bad7fd48d3adf83dce73185 Author: Peter Caspers Date: Sun, 21 Jun 2026 19:38:21 +0200 introduce CashFlow::isCoupon() to replace dynamic casts ql/cashflow.hpp | 2 + ql/cashflows/cashflows.cpp | 75 +++++++++------------- ql/cashflows/conundrumpricer.cpp | 8 +-- ql/cashflows/coupon.hpp | 1 + ql/cashflows/lineartsrpricer.cpp | 3 +- ql/experimental/basismodels/swaptioncfs.cpp | 28 ++++---- ql/experimental/callablebonds/callablebond.cpp | 3 +- ql/experimental/credit/integralcdoengine.cpp | 17 +++-- ql/experimental/credit/midpointcdoengine.cpp | 12 ++-- ql/instruments/assetswap.cpp | 7 +- ql/instruments/bond.cpp | 4 +- ql/instruments/creditdefaultswap.cpp | 4 +- .../utilities/fdmaffinemodelswapinnervalue.hpp | 3 +- ql/pricingengines/bond/riskybondengine.cpp | 4 +- 14 files changed, 88 insertions(+), 83 deletions(-) commit 1616e3ce16138686874b50724546aaf9bfddc5b8 Author: Colin <34983726+colalb1@users.noreply.github.com> Date: Sun, 21 Jun 2026 10:07:50 -0500 Shortening explanations. test-suite/optimizers.cpp | 65 +++++++++++++++++++++++------------------------ 1 file changed, 32 insertions(+), 33 deletions(-) commit 5c9f2b130f5cd0b57fc962d9c77c011265bcff54 Author: Colin <34983726+colalb1@users.noreply.github.com> Date: Sun, 21 Jun 2026 08:33:59 -0500 Formatting cleanup. ql/math/optimization/lbfgsb.cpp | 88 ++++++++++++++++++++++++++++++++++------- 1 file changed, 74 insertions(+), 14 deletions(-) commit 6976545c85a2efccfbc80deabcbaba1d56a3b55e Author: Colin <34983726+colalb1@users.noreply.github.com> Date: Sun, 21 Jun 2026 08:29:39 -0500 Fixing Problem type. ql/math/optimization/lbfgsb.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 044461cd372bdd99d8405e6d00b36cc12d1e04cc Author: Colin <34983726+colalb1@users.noreply.github.com> Date: Sat, 20 Jun 2026 19:16:30 -0500 Removing testing classes from header. ql/math/optimization/lbfgsb.hpp | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) commit f44cccdb30f58e585d2260fbacd89a932d664570 Author: Colin <34983726+colalb1@users.noreply.github.com> Date: Sat, 20 Jun 2026 19:13:42 -0500 Removing comparison test against desnse BFGS to reduce bloat. ql/math/optimization/lbfgsb.cpp | 22 ---------------------- 1 file changed, 22 deletions(-) commit 1c51bb006571bda4b36f279d8a67a697d08ce2ca Author: Colin <34983726+colalb1@users.noreply.github.com> Date: Sat, 20 Jun 2026 19:11:48 -0500 Adding compact hessian for unit testing. ql/math/optimization/lbfgsb.cpp | 22 ++++++++++++++++++++++ ql/math/optimization/lbfgsb.hpp | 19 +++++++++++++++++-- 2 files changed, 39 insertions(+), 2 deletions(-) commit 29383fbfcf0c279388593017a69a0499f3aaf077 Author: Colin <34983726+colalb1@users.noreply.github.com> Date: Sat, 20 Jun 2026 16:10:53 -0500 Active bound, limited memory tests. test-suite/optimizers.cpp | 204 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 203 insertions(+), 1 deletion(-) commit 69e06b8e4003c88e7d46a4a6e782f9393b930138 Author: Colin <34983726+colalb1@users.noreply.github.com> Date: Sat, 20 Jun 2026 15:36:51 -0500 min, max template deduction concerns. ql/math/optimization/lbfgsb.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 9bf8a9d2fbdece2f1ba6fc020a901216f4353a53 Author: Colin <34983726+colalb1@users.noreply.github.com> Date: Sat, 20 Jun 2026 15:32:49 -0500 Formatting. ql/math/optimization/lbfgsb.cpp | 54 ++++++------- ql/math/optimization/lbfgsb.hpp | 3 +- test-suite/optimizers.cpp | 172 +++++++++++++++++++++++++++++++++++++++- 3 files changed, 198 insertions(+), 31 deletions(-) commit 8761ad715772cf0912c72b7f8ca70bfe0f61a269 Author: Colin <34983726+colalb1@users.noreply.github.com> Date: Sat, 20 Jun 2026 15:29:36 -0500 Reducing docustrings. ql/math/optimization/lbfgsb.hpp | 50 ++++++++++------------------------------- 1 file changed, 12 insertions(+), 38 deletions(-) commit 792352d40d505b9a55e1b2580eef738d6c6c2414 Author: Colin <34983726+colalb1@users.noreply.github.com> Date: Sat, 20 Jun 2026 15:28:51 -0500 Update hilo conditions. ql/math/optimization/lbfgsb.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 3dcc50ff3c8a387e51193577d1e2a9c1cedd99ae Author: Colin <34983726+colalb1@users.noreply.github.com> Date: Sat, 20 Jun 2026 15:27:59 -0500 Adding l-BFGS header. ql/math/optimization/all.hpp | 1 + 1 file changed, 1 insertion(+) commit a852a21bb27249ef4bc2aef41774d633848a3386 Author: Colin <34983726+colalb1@users.noreply.github.com> Date: Sat, 20 Jun 2026 15:27:32 -0500 Adding L-BFGSB files. ql/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) commit 85728054da0751b5ae1cdd58152f890005790ec8 Author: Colin <34983726+colalb1@users.noreply.github.com> Date: Sat, 20 Jun 2026 15:26:48 -0500 Adding LBFGSB header. ql/math/optimization/Makefile.am | 2 ++ 1 file changed, 2 insertions(+) commit 4ed229914d9bfd6849ce569f0728221a105d3f5a Author: Colin <34983726+colalb1@users.noreply.github.com> Date: Sat, 20 Jun 2026 15:24:13 -0500 Initial lbfgs implementation. ql/math/optimization/lbfgsb.cpp | 591 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 591 insertions(+) commit 4542aebaa92c941ac0361ea7c1cb972de5b28c3e Author: Colin <34983726+colalb1@users.noreply.github.com> Date: Sat, 20 Jun 2026 15:20:39 -0500 Initial L-BFGS header. ql/math/optimization/lbfgsb.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 859a3065c2659501b4ce79b35a376c7e947dbef9 Author: Colin <34983726+colalb1@users.noreply.github.com> Date: Sat, 20 Jun 2026 15:19:49 -0500 Initial L-BFGS header. ql/math/optimization/lbfgsb.hpp | 102 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) commit 3961a8a509522bd99ae1bdb0ecca5dde5576dbd1 Merge: 53c6db6c1 af6caa28a Author: Luigi Ballabio Date: Thu, 18 Jun 2026 12:51:24 +0200 Make a few inspectors public in `GeneralizedHullWhite` (#2634) commit af6caa28a6b5dcf15142cf0412dc77578c2eef46 Author: Luigi Ballabio Date: Thu, 18 Jun 2026 09:58:43 +0200 Make a few inspectors public in GeneralizedHullWhite ql/experimental/shortrate/generalizedhullwhite.cpp | 8 -------- ql/experimental/shortrate/generalizedhullwhite.hpp | 11 ++++++----- 2 files changed, 6 insertions(+), 13 deletions(-) commit 53c6db6c1e51bd361fec3a8799b199ab3738ac1e Author: lballabio[bot] <224797326+lballabio-bot@users.noreply.github.com> Date: Tue, 16 Jun 2026 12:59:12 +0000 Update copyright list in license LICENSE.TXT | 1 + 1 file changed, 1 insertion(+) commit bc4b3a651e1c0e05640fc4c8a5b18d23a6ea97d3 Merge: e842bbe36 5d7d29d33 Author: Luigi Ballabio Date: Tue, 16 Jun 2026 14:29:25 +0200 Add Shir overnight index for ILS (#2628) commit e842bbe369598596ffe015511f2b9f3b408675b7 Author: lballabio[bot] <224797326+lballabio-bot@users.noreply.github.com> Date: Tue, 16 Jun 2026 08:35:09 +0000 Replace Boost macros that might not work with AAD types test-suite/overnightindexedcoupon.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5d7d29d33afcd3c64e7ce38f0869a36152fed849 Author: Pratzz1202 Date: Mon, 15 Jun 2026 23:42:08 +0530 Add Shir overnight index for ILS QuantLib.vcxproj | 2 ++ QuantLib.vcxproj.filters | 6 ++++++ ql/CMakeLists.txt | 2 ++ ql/indexes/ibor/Makefile.am | 2 ++ ql/indexes/ibor/all.hpp | 1 + ql/indexes/ibor/shir.cpp | 30 ++++++++++++++++++++++++++++++ ql/indexes/ibor/shir.hpp | 45 +++++++++++++++++++++++++++++++++++++++++++++ test-suite/indexes.cpp | 20 ++++++++++++++++++-- 8 files changed, 106 insertions(+), 2 deletions(-) commit 3b1e28ec8a34db2772dacbdf8a724c387493ad49 Merge: 9eac92aff d61d3f9fe Author: Luigi Ballabio Date: Tue, 16 Jun 2026 10:08:36 +0200 Use make_shared in volatility-related code (#2619) commit 9eac92aff5acde9fcee28293d3c9bc2f543004c5 Merge: c06232d06 e413dadb8 Author: Luigi Ballabio Date: Tue, 16 Jun 2026 10:07:05 +0200 Add optional rounding precision to OvernightIndexedCoupon and OvernightLeg (#2624) commit e413dadb8e87a663df446e2a36876299f2497120 Author: Disha Dugad Date: Mon, 15 Jun 2026 23:38:11 +0530 Fix initializer order for rounding precision ql/cashflows/overnightindexedcoupon.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit d61d3f9fee6c22d9fac0c6d0c98c6c1d0e52277e Author: JewonJeon Date: Mon, 15 Jun 2026 21:33:47 +0900 add auto when rhs and lhs types are identical ql/experimental/variancegamma/fftengine.cpp | 3 +-- ql/termstructures/volatility/optionlet/optionletstripper1.cpp | 4 ++-- ql/termstructures/volatility/optionlet/optionletstripper2.cpp | 4 ++-- ql/termstructures/volatility/optionlet/strippedoptionletadapter.cpp | 2 +- ql/termstructures/volatility/sabrinterpolatedsmilesection.cpp | 2 +- ql/termstructures/volatility/zabr.cpp | 2 +- 6 files changed, 8 insertions(+), 9 deletions(-) commit c06232d06b6efa7dac581db27f93ab5f86c39eda Merge: ccd42d4ad 664084b6e Author: Luigi Ballabio Date: Mon, 15 Jun 2026 12:30:15 +0200 Reorder Israel calendar enumeration for backward compatibility (#2627) commit ccd42d4ad84c126e7ae3640466f74d26ed2ffd4d Merge: 433576448 97372b005 Author: Luigi Ballabio Date: Mon, 15 Jun 2026 12:29:23 +0200 Added virtual inheritance and fixed consequent performance issue for DefaultLossModel class. (#2625) commit 43357644881d4c22c28cbc72d38fa4e1420567d1 Merge: 694762953 abfe572ca Author: Luigi Ballabio Date: Mon, 15 Jun 2026 11:06:40 +0200 Fix issue #1817: allow coupon pricers in SwapRateHelper (#2626) commit 664084b6e851aa8d16846f930fcb43e69c84807d Author: Luigi Ballabio Date: Mon, 15 Jun 2026 09:11:20 +0200 Reorder Israel calendar enumeration for backward compatibility ql/time/calendars/israel.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit abfe572ca97980cfcb64da19b893309c82145ada Author: prathmesh-sananse Date: Mon, 15 Jun 2026 04:02:50 +0530 Allow passing coupon pricer to SwapRateHelper ql/termstructures/yield/ratehelpers.cpp | 21 ++++++--- ql/termstructures/yield/ratehelpers.hpp | 11 +++-- test-suite/piecewiseyieldcurve.cpp | 78 ++++++++++++++++++++++++++++++++- 3 files changed, 100 insertions(+), 10 deletions(-) commit 1bde19dcf900f1ebf37dcd1762e3be8fff0f7732 Author: Disha Dugad Date: Sat, 13 Jun 2026 14:44:51 +0530 Remove invalid OvernightLeg rounding test test-suite/overnightindexedcoupon.cpp | 12 ------------ 1 file changed, 12 deletions(-) commit 4d2b64b30d7e510c5cfba69a5c21b6e9c94c152a Author: Disha Dugad Date: Fri, 12 Jun 2026 22:59:03 +0530 Add optional rounding precision to overnight indexed coupons ql/cashflows/overnightindexedcoupon.cpp | 21 ++++++++++-- ql/cashflows/overnightindexedcoupon.hpp | 9 +++-- test-suite/overnightindexedcoupon.cpp | 60 +++++++++++++++++++++++++++++++++ 3 files changed, 86 insertions(+), 4 deletions(-) commit 69476295385ba4e4791279db821247c89fe485a4 Merge: 954894429 16de99c1f Author: Luigi Ballabio Date: Thu, 11 Jun 2026 17:03:20 +0200 Fix AAD build of GaussianCopulaSpreadEngine (#2623) commit 97372b005a2fc48b46720059afafb5472e778d0f Author: Marco <27030240+MrC-D3@users.noreply.github.com> Date: Thu, 11 Jun 2026 15:36:59 +0200 Added virtual inheritance and fixed consequent performance issue when setting the same Basket on DefaultLossModel. ql/experimental/credit/defaultlossmodel.hpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 16de99c1f9a4c9f46f9c1287306ae9404ed271c2 Author: auto-differentiation-dev <107129969+auto-differentiation-dev@users.noreply.github.com> Date: Thu, 11 Jun 2026 09:23:27 +0100 Use Real-compatible bounds in std::clamp for AAD in GaussianCopulaSpreadEngine ql/pricingengines/basket/gaussiancopulaspreadengine.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 95489442901a52425ed96463e33c2a626051fe21 Merge: 020372396 f115c2985 Author: Luigi Ballabio Date: Wed, 10 Jun 2026 11:21:48 +0200 Add `GaussianCopulaSpreadEngine` for spread option pricing (#2621) commit f115c29852e4b2b2718d953065b60f7b82c92518 Author: Yassine Idyiahia Date: Tue, 26 May 2026 21:34:13 +0100 Add `GaussianCopulaSpreadEngine` for spread option pricing QuantLib.vcxproj | 2 + QuantLib.vcxproj.filters | 6 + ql/CMakeLists.txt | 2 + ql/pricingengines/basket/Makefile.am | 2 + ql/pricingengines/basket/all.hpp | 1 + .../basket/gaussiancopulaspreadengine.cpp | 129 +++++++++++++ .../basket/gaussiancopulaspreadengine.hpp | 59 ++++++ test-suite/basketoption.cpp | 201 ++++++++++++++++++++- 8 files changed, 397 insertions(+), 5 deletions(-) commit 0203723960ed822a878e52b029376d973ca1eec7 Merge: 9f650475a 571cd478f Author: Luigi Ballabio Date: Tue, 9 Jun 2026 10:29:21 +0200 Avoid constexpr Real in TrinomialTree so AAD builds compile (#2620) commit 9f650475ae5c319cc1e9be2176e3058ae8b8a2a0 Merge: e4c146c3d 398bf2cf4 Author: Luigi Ballabio Date: Tue, 9 Jun 2026 10:24:03 +0200 Israel Calendar update - New TASE and TELBOR (#2613) commit e4c146c3d4c9d890b0ca2f4b752da3a93a0d349e Author: Luigi Ballabio Date: Mon, 8 Jun 2026 14:46:52 +0200 Avoid unnecessary inclusions test-suite/constnotionalcrosscurrencybasisswap.cpp | 2 +- test-suite/constnotionalcrosscurrencyfixedvsfloatingswap.cpp | 4 +++- test-suite/constnotionalcrosscurrencyswap.cpp | 4 +++- 3 files changed, 7 insertions(+), 3 deletions(-) commit f9855e42b84e08ab91b4f323331cf395813219e6 Merge: 3e784717f 2affee9df Author: Luigi Ballabio Date: Mon, 8 Jun 2026 17:37:33 +0200 Remove redundant calls to interpolation.update() (#2618) commit 398bf2cf43b82b37d1043153078248f109773252 Author: Luigi Ballabio Date: Mon, 8 Jun 2026 17:33:46 +0200 Add test for Telbor calendar test-suite/calendars.cpp | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit 3e784717f7721e468fbeb0479ec9f35f6309dfeb Author: Luigi Ballabio Date: Mon, 8 Jun 2026 14:43:51 +0200 Update documentation ql/indexes/inflationindex.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 67726f4add55a37c626b3d4f597611a14f537506 Author: Luigi Ballabio Date: Mon, 8 Jun 2026 13:20:58 +0200 Deprecate generic Israel::Settlement ql/time/calendars/israel.cpp | 2 ++ ql/time/calendars/israel.hpp | 11 ++++++----- 2 files changed, 8 insertions(+), 5 deletions(-) commit c4e8f3e119800c4a401f9c383752c03379011ae3 Author: Luigi Ballabio Date: Mon, 8 Jun 2026 13:15:17 +0200 Let TASE isWeekend() return the current Sat/Sun ql/time/calendars/israel.cpp | 2 +- test-suite/calendars.cpp | 21 ++++++++++++++++++--- 2 files changed, 19 insertions(+), 4 deletions(-) commit d9298539f7e53134508a1da8ff84491af74e034a Author: Luigi Ballabio Date: Mon, 8 Jun 2026 12:36:00 +0200 Update calendar docs ql/time/calendars/israel.cpp | 4 ++-- ql/time/calendars/israel.hpp | 52 ++++++++++++++++++++++++++++++++++++++------ 2 files changed, 47 insertions(+), 9 deletions(-) commit 571cd478fbadd34f5261706332d020b284e50078 Author: auto-differentiation-dev <107129969+auto-differentiation-dev@users.noreply.github.com> Date: Mon, 8 Jun 2026 10:34:09 +0100 Use double instead of constexpr Real in TrinomialTree for AAD builds ql/methods/lattices/trinomialtree.cpp | 2 +- test-suite/trinomialtree.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit d8f820f5b273571cada079587ed66761b9873d17 Author: JewonJeon Date: Sun, 7 Jun 2026 12:06:23 +0900 Use make_shared in volatility-related code .../callablebonds/callablebondconstantvol.cpp | 10 +--- ql/experimental/variancegamma/fftengine.cpp | 4 +- ql/experimental/variancegamma/fftvanillaengine.cpp | 2 +- .../variancegamma/fftvariancegammaengine.cpp | 2 +- .../variancegamma/variancegammaprocess.cpp | 2 +- ql/termstructures/volatility/abcdcalibration.cpp | 7 +-- .../equityfx/andreasenhugevolatilityinterpl.hpp | 2 +- .../volatility/equityfx/blackconstantvol.hpp | 4 +- .../volatility/equityfx/localconstantvol.hpp | 4 +- .../volatility/equityfx/localvolsurface.cpp | 3 +- .../volatility/interpolatedsmilesection.hpp | 12 ++-- .../volatility/optionlet/constantoptionletvol.cpp | 11 ++-- .../volatility/optionlet/optionletstripper1.cpp | 9 ++- .../volatility/optionlet/optionletstripper2.cpp | 22 +++---- .../volatility/optionlet/spreadedoptionletvol.cpp | 6 +- .../optionlet/strippedoptionletadapter.cpp | 10 ++-- .../volatility/sabrinterpolatedsmilesection.cpp | 18 +++--- .../interpolatedswaptionvolatilitycube.cpp | 12 +--- .../volatility/swaption/spreadedswaptionvol.cpp | 6 +- .../volatility/swaption/swaptionconstantvol.cpp | 15 +++-- .../volatility/swaption/swaptionvolmatrix.cpp | 20 +++---- ql/termstructures/volatility/zabr.cpp | 67 ++++++++++++---------- .../volatility/zabrinterpolatedsmilesection.hpp | 7 +-- ql/termstructures/volatility/zabrsmilesection.hpp | 8 +-- 24 files changed, 121 insertions(+), 142 deletions(-) commit 2affee9df57f170e4af677bbc2255198a31f3a11 Author: Eugene Toder Date: Fri, 5 Jun 2026 14:01:02 -0400 Remove redundant calls to interpolation.update() .../volatility/interpolatedsmilesection.hpp | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) commit a924b400a138894c69a8df97c6b80dcdfdc9cd69 Author: Sébastien Bouvard <71438320+sebastienbou@users.noreply.github.com> Date: Fri, 5 Jun 2026 10:02:20 +0100 Fix week end logic + comment ql/time/calendars/israel.cpp | 5 ++++- ql/time/calendars/israel.hpp | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) commit 5111c3a1442a29b73ab8ec1fdce3e55d14cddf02 Author: Luigi Ballabio Date: Fri, 5 Jun 2026 09:28:01 +0200 Update copyright attributions Contributors.txt | 2 +- LICENSE.TXT | 2 +- ql/termstructures/volatility/equityfx/piecewiseblackvariancesurface.cpp | 2 +- ql/termstructures/volatility/equityfx/piecewiseblackvariancesurface.hpp | 2 +- test-suite/piecewiseblackvariancesurface.cpp | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) commit 3408d5ae32ed62d6e3d3f13e52a1df6d9aabe46a Merge: 01e4d4df7 cd9a15124 Author: Luigi Ballabio Date: Fri, 5 Jun 2026 09:17:58 +0200 Use Real-compatible types so AAD builds compile (FX forward engine, variance surface test) (#2616) commit 01e4d4df7c472f72eb6b1a72bc96206ff8aea3c6 Merge: 0b9aca861 80b0f1f3f Author: Luigi Ballabio Date: Fri, 5 Jun 2026 09:17:23 +0200 Fix trinomial tree excessive branching with gated dx floor (#364) (#2615) commit e61454700b03dae25440fe4d68826bcb411a2c5e Author: Sébastien Bouvard <71438320+sebastienbou@users.noreply.github.com> Date: Fri, 5 Jun 2026 08:04:06 +0100 Switch date check within isBusinessDay ql/time/calendars/israel.cpp | 49 +++++--------------------------------------- ql/time/calendars/israel.hpp | 2 +- 2 files changed, 6 insertions(+), 45 deletions(-) commit 0b9aca8619f59c772e39064e2870af2aa4bca8c1 Merge: e71bc3db8 4469508ca Author: Luigi Ballabio Date: Thu, 4 Jun 2026 18:56:36 +0200 Add warning to `RelativeDateBootstrapHelper` documentation (#2614) commit cd9a1512481b5ab0f0af24fa138e701683c9cd9b Author: auto-differentiation-dev <107129969+auto-differentiation-dev@users.noreply.github.com> Date: Thu, 4 Jun 2026 10:25:47 +0100 Use Real-compatible types for AAD in FX forward engine and variance surface test ql/pricingengines/forward/discountingfxforwardengine.cpp | 4 ++-- test-suite/piecewiseblackvariancesurface.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit e71bc3db890dd8feefe3a3dffc81887023137ea9 Merge: ff1b15f6f b3468ef4b Author: Luigi Ballabio Date: Thu, 4 Jun 2026 10:07:55 +0200 Derive MakeVanillaSwap spot date on the index fixing calendar (#2611) commit 80b0f1f3fa02e19bffd06ee8767b4fc1f8abf6e9 Author: pandashark Date: Thu, 4 Jun 2026 00:21:58 -0500 Register trinomialtree.cpp in autotools and MSBuild file lists The CMakeLists.txt registration was sufficient for the local CMake build but the upstream filelists check requires the new test source in Makefile.am, testsuite.vcxproj, and testsuite.vcxproj.filters. test-suite/Makefile.am | 1 + test-suite/testsuite.vcxproj | 1 + test-suite/testsuite.vcxproj.filters | 3 +++ 3 files changed, 5 insertions(+) commit ff1b15f6f8ef9ffaeab94a21687623bb8e4aa472 Merge: 55d2c60f5 a01bad90c Author: Luigi Ballabio Date: Wed, 3 Jun 2026 14:32:35 +0200 Discount FX forward NPV to reference date (#2606) commit 4469508ca517e97933b2f6dacc4cc5eb83f3a605 Author: MrC-D3 <27030240+MrC-D3@users.noreply.github.com> Date: Mon, 1 Jun 2026 11:31:24 +0000 Warning in RelativeDateBootstrapHelper. ql/termstructures/bootstraphelper.hpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 67b09d01141bfc415741a167e4ad703bd7797fc7 Author: Sébastien Bouvard <71438320+sebastienbou@users.noreply.github.com> Date: Tue, 2 Jun 2026 21:17:32 +0100 Add TelAvivNationalImpl and TelborImpl classes ql/time/calendars/israel.hpp | 2 ++ 1 file changed, 2 insertions(+) commit a479b2c715fdcbe695f246733f2893ce66289106 Merge: 5f0be3016 7ca043cdd Author: Sébastien Bouvard <71438320+sebastienbou@users.noreply.github.com> Date: Tue, 2 Jun 2026 17:40:37 +0100 Merge pull request #1 from sebastienbou/sebastienboufix-ILS-Calendar Update israel.hpp commit 5f0be30168d8acf06c009306aa53b22d1e2bddd0 Author: Sébastien Bouvard <71438320+sebastienbou@users.noreply.github.com> Date: Tue, 2 Jun 2026 17:40:05 +0100 Update israel.cpp Add New TASE calendar and TELBOR ql/time/calendars/israel.cpp | 107 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 107 insertions(+) commit 7ca043cdd69dd210084de8c71ddecd6e20a50d78 Author: Sébastien Bouvard <71438320+sebastienbou@users.noreply.github.com> Date: Tue, 2 Jun 2026 17:36:10 +0100 Update israel.hpp https://www.tase.co.il/en/content/about/tradingdays_change The TASE calendar switched to Monday-Friday working day on the 5th January 2026. In addition, adding the telbor calendar that is different that TASE or SHIR ql/time/calendars/israel.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit b3468ef4be73e5e0601fcf50c6105cf4e411b76e Author: Lawson Darrow Date: Mon, 1 Jun 2026 22:14:19 -0400 Derive MakeVanillaSwap spot date on the index fixing calendar Contributors.txt | 1 + ql/instruments/makevanillaswap.cpp | 16 +++++++--- test-suite/swap.cpp | 62 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 74 insertions(+), 5 deletions(-) commit 55d2c60f58748d60a45a0f869b5ee5f79ba1e31c Merge: 6e2d54f66 4a3f2c52e Author: Luigi Ballabio Date: Mon, 1 Jun 2026 09:48:38 +0200 Use make_shared in cap/floor volatilities and null calendar (#2610) commit 6e2d54f66e88d447c5dda10ef1b0d77a3b21ccaa Author: lballabio[bot] <224797326+lballabio-bot@users.noreply.github.com> Date: Sun, 31 May 2026 02:10:53 +0000 Automated fixes by clang-tidy .../constnotionalcrosscurrencybasisswap.cpp | 17 ++++++++------- .../constnotionalcrosscurrencybasisswap.hpp | 6 +++--- ...nstnotionalcrosscurrencyfixedvsfloatingswap.cpp | 25 +++++++++++----------- ...nstnotionalcrosscurrencyfixedvsfloatingswap.hpp | 14 ++++++------ ql/instruments/constnotionalcrosscurrencyswap.cpp | 4 ++-- ql/instruments/constnotionalcrosscurrencyswap.hpp | 4 ++-- ...ountingconstnotionalcrosscurrencyswapengine.cpp | 7 +++--- ...ountingconstnotionalcrosscurrencyswapengine.hpp | 4 ++-- test-suite/constnotionalcrosscurrencyswap.cpp | 3 ++- test-suite/fastfouriertransform.cpp | 4 ++-- test-suite/piecewiseblackvariancesurface.cpp | 16 +++++++------- 11 files changed, 54 insertions(+), 50 deletions(-) commit 4a3f2c52e31d750f8fa31d0dfe02ec15b046d431 Author: JewonJeon Date: Sat, 30 May 2026 14:00:26 +0900 Use make_shared in cap/floor volatilities and null calendar ql/termstructures/volatility/capfloor/capfloortermvolcurve.cpp | 6 ++---- ql/termstructures/volatility/capfloor/capfloortermvolsurface.cpp | 8 ++++---- ql/termstructures/volatility/capfloor/constantcapfloortermvol.cpp | 4 ++-- ql/time/calendars/nullcalendar.hpp | 2 +- 4 files changed, 9 insertions(+), 11 deletions(-) commit ba2df29d81e2e719c27e249839694b14fbbb0a8d Merge: 6c6e76e49 cc6fa4b16 Author: Luigi Ballabio Date: Fri, 29 May 2026 13:33:33 +0200 Added asymmetric payment frequency support for cross-currency basis swap rate helpers (#2528) commit 6c6e76e49f60355c740a350bfb4651c05664b7d4 Merge: 4a05ede07 a6e957050 Author: Luigi Ballabio Date: Fri, 29 May 2026 10:30:44 +0200 Fix out-of-bounds read in mixed interpolation switch point (#2605) commit cc6fa4b169f3c861500173bad3deb5104550dcb6 Author: Justin Li Date: Thu, 28 May 2026 16:08:58 -0400 Document payment-frequency parameters in cross-currency helpers Add \param documentation for the cross-currency basis-swap rate helpers describing the index-tenor default and the quote-to-base fallback, and rename the quoteCcyPaymentFrequency constructor parameter to quoteCurrencyPaymentFrequency to match the sibling baseCurrencyIndex and quoteCurrencyIndex parameters. Add a test pinning the quote-to-base fallback behavior. .../termstructures/crosscurrencyratehelpers.cpp | 15 ++++--- .../termstructures/crosscurrencyratehelpers.hpp | 32 ++++++++++++-- test-suite/crosscurrencyratehelpers.cpp | 51 ++++++++++++++++++++++ 3 files changed, 89 insertions(+), 9 deletions(-) commit 1e83cb5731c8f1e7c9ed60a07c51a0a7bbdcf39d Author: Justin Li Date: Thu, 28 May 2026 15:44:13 -0400 Treat NoFrequency as unset in cross-currency basis swap helpers A NoFrequency passed to the payment-frequency parameters now normalizes to nullopt, preserving the pre-optional behavior (derive the schedule from the index tenor) instead of building a zero-length Period(NoFrequency) schedule, which Schedule silently maps to the Zero date-generation rule. .../termstructures/crosscurrencyratehelpers.cpp | 17 ++++++- test-suite/crosscurrencyratehelpers.cpp | 54 ++++++++++++++++++++++ 2 files changed, 69 insertions(+), 2 deletions(-) commit 4a05ede07c4841e00f5f403db2f79b90dc58c2e2 Merge: 4d6697188 8a2a845d5 Author: Luigi Ballabio Date: Thu, 28 May 2026 10:41:18 +0200 Replace Boost macros that might not work with AAD types (#2609) commit 8a2a845d50231e74dfd6a872235ac9464d841d55 Author: lballabio[bot] <224797326+lballabio-bot@users.noreply.github.com> Date: Wed, 27 May 2026 12:59:14 +0000 Replace Boost macros that might not work with AAD types test-suite/interpolations.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4d669718878c1aedfad459b576df1af8044ff535 Merge: c6aacfc24 29874e780 Author: Luigi Ballabio Date: Wed, 27 May 2026 14:58:38 +0200 Fix out-of-bounds read in Akima cubic interpolation with 3 points (#2603) commit c6aacfc24430df94bd443175101e040e65b8b04a Merge: 8a825ea16 5f13cd8b9 Author: Luigi Ballabio Date: Wed, 27 May 2026 11:07:12 +0200 Use make_shared in day counters (#2607) commit a6e9570501d381a08772996b20ef9c9d34f1627d Author: metsw24-max Date: Tue, 26 May 2026 21:04:52 +0530 updated test-suite/interpolations.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 29874e78057238d44a110d4a456142674dc15bbf Author: metsw24-max Date: Tue, 26 May 2026 21:00:24 +0530 updated test-suite/interpolations.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 5f13cd8b97b8304a3a6ff4833d4fb922077ce272 Author: JewonJeon Date: Tue, 26 May 2026 20:15:17 +0900 Use make_shared in day counters ql/time/daycounters/actual360.hpp | 3 +-- ql/time/daycounters/actual364.hpp | 2 +- ql/time/daycounters/actual36525.hpp | 3 +-- ql/time/daycounters/actual365fixed.cpp | 6 +++--- ql/time/daycounters/actual366.hpp | 3 +-- ql/time/daycounters/actualactual.cpp | 8 ++++---- ql/time/daycounters/business252.hpp | 2 +- ql/time/daycounters/one.hpp | 3 +-- ql/time/daycounters/simpledaycounter.hpp | 3 +-- ql/time/daycounters/thirty360.cpp | 12 ++++++------ ql/time/daycounters/thirty365.cpp | 2 +- 11 files changed, 21 insertions(+), 26 deletions(-) commit a01bad90c907b5ba03f2de887904c9210dd484c8 Author: JewonJeon Date: Tue, 26 May 2026 19:56:51 +0900 Add const qualifiers to FX forward calculations .../forward/discountingfxforwardengine.cpp | 42 +++++++++++----------- 1 file changed, 21 insertions(+), 21 deletions(-) commit d9f8b08edcdcace1d6fb70ac713c3f2765664617 Author: JewonJeon Date: Tue, 26 May 2026 19:53:47 +0900 Discount FX forward NPV to reference date .../forward/discountingfxforwardengine.cpp | 25 ++++++++++++++++------ .../forward/discountingfxforwardengine.hpp | 18 +++++++++++----- 2 files changed, 32 insertions(+), 11 deletions(-) commit 8a825ea16c6fc6ebe0add954f17139865b6624de Merge: a40d0c9c9 4af06f196 Author: Luigi Ballabio Date: Tue, 26 May 2026 12:35:15 +0200 Fix FX forward fair rate calculation (#2601) commit a40d0c9c97ae708235a02df4207f0b290f22ccf7 Merge: c085121cf 5b0bf4250 Author: Luigi Ballabio Date: Tue, 26 May 2026 11:44:49 +0200 Fix out-of-bounds read in discrete integrals on degenerate grids (#2604) commit f95ac1746442fc1c470a80a60a318d0e0918c558 Author: metsw24-max Date: Mon, 25 May 2026 23:33:35 +0530 fix out-of-bounds read in mixed interpolation switch point ql/math/interpolations/mixedinterpolation.hpp | 9 ++++----- test-suite/interpolations.cpp | 25 +++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 5 deletions(-) commit 5b0bf4250bafe4708e6962b54c1ac7d942053ec8 Author: metsw24-max Date: Mon, 25 May 2026 21:59:55 +0530 Fix out-of-bounds read in discrete integrals on degenerate grids ql/math/integrals/discreteintegrals.cpp | 6 ++++++ test-suite/integrals.cpp | 17 +++++++++++++++++ 2 files changed, 23 insertions(+) commit 70b509fecd15d54794ff92c2ac6052e80ec378ec Author: metsw24-max Date: Mon, 25 May 2026 20:14:33 +0530 Fix out-of-bounds read in Akima cubic interpolation with 3 points ql/math/interpolations/cubicinterpolation.hpp | 7 ++++++- test-suite/interpolations.cpp | 22 ++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) commit c085121cf454be438f2838a992e816c38c51ddc4 Merge: ffc72c07f d6dd745c6 Author: Luigi Ballabio Date: Mon, 25 May 2026 10:12:28 +0200 Fix IrrFinder::derivative() returning modified duration instead of dP/dy (#2589) commit ffc72c07f81f90dc2795a3c3a97d811395dcb089 Merge: e9600cd74 ee16ca97a Author: Luigi Ballabio Date: Mon, 25 May 2026 10:10:18 +0200 Add india nse 2026 holidays (#2586) commit e9600cd742e6a830c114e4a80ae0b2337e36b4c0 Merge: b90289bd5 4d1c18672 Author: Luigi Ballabio Date: Mon, 25 May 2026 09:55:11 +0200 Fix out-of-bounds write in FastFourierTransform ctor for order=0 (#2597) commit b90289bd5e26ebaa4d5f1c1fdf92254fdc41f655 Author: Luigi Ballabio Date: Mon, 25 May 2026 08:58:44 +0200 Disable clang-tidy warning .clang-tidy | 1 + 1 file changed, 1 insertion(+) commit 4af06f19636491fc436a14ac4527dfec0e315985 Author: JewonJeon Date: Sat, 23 May 2026 16:25:23 +0900 Update FX forward fair rate documentation ql/pricingengines/forward/discountingfxforwardengine.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8063355da60e56af6a7890d850e55ca45f7eee8a Author: JewonJeon Date: Sat, 23 May 2026 16:17:20 +0900 Fix FX forward fair rate calculation ql/pricingengines/forward/discountingfxforwardengine.cpp | 4 ++-- test-suite/fxforward.cpp | 12 +++++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) commit 60f02879261fe9a34d0023299da1ed46bf32646e Author: Justin Li Date: Fri, 22 May 2026 17:26:12 -0400 Use ext::optional for payment frequency in cross-currency helpers Standardizes the cross-currency basis swap rate helpers on the ext::optional pattern (with ext::nullopt default) that other rate helpers in the codebase use, instead of the NoFrequency sentinel value. Covers both paymentFrequency and quoteCcyPaymentFrequency to keep the file internally consistent. .../termstructures/crosscurrencyratehelpers.cpp | 22 +++++++++++----------- .../termstructures/crosscurrencyratehelpers.hpp | 17 +++++++++-------- test-suite/crosscurrencyratehelpers.cpp | 17 +++++++++-------- 3 files changed, 29 insertions(+), 27 deletions(-) commit d6dd745c68acaacace80de02c5e97080db9be63c Author: Benjamin Croud <98527451+Croudxd@users.noreply.github.com> Date: Fri, 22 May 2026 20:50:30 +0000 Fix sign of derivative calculation in IrrFinder ql/cashflows/cashflows.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ee16ca97a80023faccc291f87b89acda8767cac4 Author: Pratzz1202 Date: Fri, 22 May 2026 14:17:34 -0400 Use initializer list for expectedHol in testIndia test-suite/calendars.cpp | 88 ++++++++++++++++++++++++------------------------ 1 file changed, 44 insertions(+), 44 deletions(-) commit 2eb86846efc496bf6ea0312fad2d31fec8c4ea13 Merge: b0d5fc181 be5067e01 Author: Luigi Ballabio Date: Fri, 22 May 2026 17:35:16 +0200 Fix Vasicek zero-reversion limit (#2599) commit b0d5fc181300fc00c2247eeb3c78743efe4a6132 Merge: 7e7fccd78 266454b24 Author: Luigi Ballabio Date: Fri, 22 May 2026 17:34:26 +0200 Add 2025 South Korea temporary holiday (#2598) commit 4d1c1867254d4c5bfede9194932d5a70d5cc8841 Author: metsw24-max Date: Fri, 22 May 2026 19:45:27 +0530 updated test-suite/fastfouriertransform.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit be5067e01fb17d9d07bef46d8b1f019e7bb9018f Author: JewonJeon Date: Fri, 22 May 2026 20:46:16 +0900 Fix Vasicek zero-reversion limit ql/models/shortrate/onefactormodels/vasicek.cpp | 6 +++-- test-suite/shortratemodels.cpp | 29 +++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 2 deletions(-) commit 266454b246bbad1c0d2c300bab094a85fa9b8363 Author: JewonJeon Date: Fri, 22 May 2026 20:09:35 +0900 Add 2025 South Korea temporary holiday ql/time/calendars/southkorea.cpp | 1 + test-suite/calendars.cpp | 2 ++ 2 files changed, 3 insertions(+) commit 7e7fccd784bc0bbdec6538156e02d9397870d190 Merge: af13604dc cf5657758 Author: Luigi Ballabio Date: Fri, 22 May 2026 13:14:07 +0200 Use Real instead of auto and constexpr for AD type compatibility (#2596) commit af13604dc7a054bd1e19da805e515f6e8e40d890 Merge: bed4bbfa9 99a43a7cc Author: Luigi Ballabio Date: Fri, 22 May 2026 13:12:53 +0200 Update HullWhite r0 when termstructure relinks (#2592) commit b604cd28347d706c01beac2dce81996baaa6c752 Author: metsw24-max Date: Fri, 22 May 2026 15:24:03 +0530 Fix out-of-bounds write in FastFourierTransform ctor for order=0 The constructor allocated cs_ and sn_ with size 'order' and then unconditionally wrote to cs_[order-1] and sn_[order-1]. When 'order' is 0 (e.g. when callers chain FastFourierTransform::min_order(1), which returns 0), both vectors are empty and the indexing wraps to size_t(-1), producing an out-of-bounds write that segfaults under debug-iterator-checked standard libraries. A transform of size 1 == 1<<0 reduces to a copy and needs no twiddle factors, so skip the setup when order is 0. The transform loop body 'for (s = 1; s <= order; ++s)' already handles the order==0 case correctly. ql/math/fastfouriertransform.hpp | 6 ++++++ 1 file changed, 6 insertions(+) commit bed4bbfa90972a67d58795a1a94f915e5620b715 Merge: 3e676cd71 a81da9201 Author: Luigi Ballabio Date: Fri, 22 May 2026 10:25:09 +0200 Fix yield term structure time error message (#2593) commit cf56577582edd3d078198727ef1db9f78f92f39f Author: auto-differentiation-dev <107129969+auto-differentiation-dev@users.noreply.github.com> Date: Thu, 21 May 2026 17:18:22 +0100 Use Real-compatible types in SmileSectionRNDCalculator .../finitedifferences/utilities/smilesectionrndcalculator.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 78acb70908db3c19581e3e20abc741c357cf6e94 Author: auto-differentiation-dev <107129969+auto-differentiation-dev@users.noreply.github.com> Date: Thu, 21 May 2026 17:18:18 +0100 Use Real instead of auto in IntegralHestonVarianceOptionEngine .../integralhestonvarianceoptionengine.cpp | 40 +++++++++++----------- 1 file changed, 20 insertions(+), 20 deletions(-) commit 3e676cd71398f95cc933cee60917298b22c1b706 Merge: d6abf67ea 19015b501 Author: Luigi Ballabio Date: Thu, 21 May 2026 16:50:04 +0200 Rename a couple of inspectors in the cross-currency swap engine (#2595) commit 99a43a7cc1301b7172d683340c59d6c5a83524b6 Author: JewonJeon Date: Thu, 21 May 2026 22:18:07 +0900 comment applied ql/models/shortrate/onefactormodels/hullwhite.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 19015b501c1268d9825d77bd6666bb81af332a03 Author: Luigi Ballabio Date: Thu, 21 May 2026 12:59:07 +0200 Rename inspectors .../swap/discountingconstnotionalcrosscurrencyswapengine.hpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit d6abf67ea595886fff8ba75ef64754155d401966 Merge: c788f8e6d 71121aea8 Author: Luigi Ballabio Date: Thu, 21 May 2026 11:55:40 +0200 Use make_shared in indexes (#2590) commit e1d7603a859f431156d00a6bee1d44b7c0c83d24 Author: Benjamin Croud <98527451+Croudxd@users.noreply.github.com> Date: Wed, 20 May 2026 16:36:48 +0000 Fix NPV calculation order in cashflows.cpp ql/cashflows/cashflows.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c788f8e6dcccb3b5afd91867d6b2d19399a4298b Author: lballabio[bot] <224797326+lballabio-bot@users.noreply.github.com> Date: Wed, 20 May 2026 10:07:16 +0000 Fix inclusions of ql headers in double quotes ql/instruments/makecapfloor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a81da92010e6af8090ab1c09aa5aa6e05c090c1a Author: JewonJeon Date: Wed, 20 May 2026 19:57:40 +0900 Restore existing formatting ql/termstructures/yieldtermstructure.cpp | 100 ++++++++++++++++++------------- 1 file changed, 60 insertions(+), 40 deletions(-) commit 64ef5a54407a7c98fad3cfc4f7f43930caf79a68 Author: JewonJeon Date: Wed, 20 May 2026 19:55:11 +0900 Comment applied ql/termstructures/yieldtermstructure.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 50dc966b1f3abfecf3bc36af752ece7ca2017458 Author: JewonJeon Date: Wed, 20 May 2026 19:46:35 +0900 comment applied ql/termstructures/yieldtermstructure.cpp | 100 +++++++++++++------------------ 1 file changed, 40 insertions(+), 60 deletions(-) commit 219e2ae6561f7c782ff4522f7091e1575e76bf44 Author: Benjamin Croud <98527451+Croudxd@users.noreply.github.com> Date: Wed, 20 May 2026 09:40:10 +0000 Fix sign of modified duration calculation ql/cashflows/cashflows.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8d60143038870a002b8f5498d227d3951d20c757 Merge: f5ba35d91 dbfd60ffd Author: Luigi Ballabio Date: Wed, 20 May 2026 11:37:45 +0200 Fix incorrect 10-year label in BasketLosses example (#2584) commit f5ba35d91c657054f6aef5a4dcf4f4f48fd2d93d Merge: e7ba4f701 ce39ee391 Author: Luigi Ballabio Date: Wed, 20 May 2026 11:36:39 +0200 Allow `MakeCapFloor` to calculate ATM level when using the Bachelier engine (#2582) commit b32e9bab9bdbb12f9be268c8f630dea83284c26f Author: Justin Li Date: Wed, 1 Apr 2026 10:34:22 -0400 Added separate payment frequency for quote currency leg in cross-currency helpers .../termstructures/crosscurrencyratehelpers.cpp | 22 +++++++++++----- .../termstructures/crosscurrencyratehelpers.hpp | 10 +++++--- test-suite/crosscurrencyratehelpers.cpp | 30 +++++++++++++++++----- 3 files changed, 46 insertions(+), 16 deletions(-) commit 9cfb1b38ae4e6c61ae7178b706e6dcf75ee56fd2 Author: JewonJeon Date: Tue, 19 May 2026 22:52:32 +0900 Fix yield term structure time error message ql/termstructures/yieldtermstructure.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b720ffe85cf7b93bb6bc33fc7e7d9ab898696d59 Author: JewonJeon Date: Tue, 19 May 2026 22:42:53 +0900 Update HullWhite r0 when term structure relinks ql/models/shortrate/onefactormodels/hullwhite.cpp | 2 +- ql/models/shortrate/onefactormodels/hullwhite.hpp | 4 ---- test-suite/shortratemodels.cpp | 24 +++++++++++++++++++++++ 3 files changed, 25 insertions(+), 5 deletions(-) commit 71121aea8ec3ca9417266955df113f2233236858 Author: JewonJeon Date: Tue, 19 May 2026 21:19:33 +0900 Use make_shared in indexes ql/indexes/ibor/shibor.cpp | 2 +- ql/indexes/iborindex.cpp | 13 ++++++------- ql/indexes/region.cpp | 13 ++++++------- ql/indexes/swap/chfliborswap.cpp | 8 ++++---- ql/indexes/swap/euriborswap.cpp | 24 ++++++++++++------------ ql/indexes/swap/eurliborswap.cpp | 24 ++++++++++++------------ ql/indexes/swap/gbpliborswap.cpp | 8 ++++---- ql/indexes/swap/jpyliborswap.cpp | 8 ++++---- ql/indexes/swap/usdliborswap.cpp | 8 ++++---- 9 files changed, 53 insertions(+), 55 deletions(-) commit e7ba4f701aa42c6f8374d17227e04f9eb9ee115c Merge: d4b2732e1 5bf39d92b Author: Luigi Ballabio Date: Tue, 19 May 2026 10:08:26 +0200 Use make_unique for unique_ptr construction (#2579) commit d4b2732e1c5d1927cac3cea11f008682cdc05d81 Merge: f1fee5511 6406602fb Author: Luigi Ballabio Date: Tue, 19 May 2026 10:05:44 +0200 Override `atmLevel(Time)` on Heston and Andreasen-Huge vol surfaces (#2581) commit f1fee55110e799dea80ea4d2fd97864cdac25d0a Merge: 42125df9c 73e75f0e3 Author: Luigi Ballabio Date: Tue, 19 May 2026 10:04:28 +0200 Add `SmileSectionRNDCalculator` for smile-implied marginals (#2580) commit cc6c18a7e2119cd812196d33065d00d8c7981cf6 Author: croudxd Date: Mon, 18 May 2026 22:12:24 +0000 Fix IrrFinder::derivative() returning modified duration instead of dP/dy ql/cashflows/cashflows.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit ce39ee3916c8e02d309467964be73fdd0743eb6e Author: croudxd Date: Mon, 18 May 2026 21:47:58 +0000 Fix shadowed Handle declarations inside if-statement scopes ql/instruments/makecapfloor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 42125df9c3ea445c718eb3d533337f7081bd8a6f Merge: ae25d2846 1472b39ab Author: Luigi Ballabio Date: Mon, 18 May 2026 18:18:19 +0200 Review default arguments in cross-currency swap constructors (#2588) commit 1472b39ab2f2b804756da8e8ae45455f9d3dcd2f Author: Luigi Ballabio Date: Mon, 18 May 2026 11:13:20 +0200 Uniform type and number of arguments in cross-currency swap constructors .../constnotionalcrosscurrencybasisswap.cpp | 42 +++++++++------- .../constnotionalcrosscurrencybasisswap.hpp | 58 ++++++++++++---------- ...nstnotionalcrosscurrencyfixedvsfloatingswap.cpp | 18 ++++--- ...nstnotionalcrosscurrencyfixedvsfloatingswap.hpp | 41 ++++++++------- test-suite/constnotionalcrosscurrencybasisswap.cpp | 16 +++--- ...nstnotionalcrosscurrencyfixedvsfloatingswap.cpp | 2 +- 6 files changed, 98 insertions(+), 79 deletions(-) commit d6b90051a85d7c73c1328bddd159fc8794b3727c Author: Pratzz1202 Date: Sun, 17 May 2026 18:19:31 -0400 Added India (NSE) clearing holidays for 2026 test-suite/calendars.cpp | 118 +++++++++++++++++++++++------------------------ 1 file changed, 59 insertions(+), 59 deletions(-) commit 5e0b803f47779ee8327ec746d2671e9e2242afaa Author: Pratzz1202 Date: Sun, 17 May 2026 18:04:15 -0400 Added India (NSE) clearing holidays for 2026 ql/time/calendars/india.cpp | 217 +++++++++++++++++-------------- ql/time/calendars/india.hpp | 2 +- test-suite/calendars.cpp | 307 ++++++++++++++++++-------------------------- 3 files changed, 245 insertions(+), 281 deletions(-) commit dbfd60ffdf9513718a72d235f22330469dca2a15 Author: croudxd Date: Sat, 16 May 2026 19:53:46 +0000 Fix incorrect 10-year label in BasketLosses example (60 months = 5 years) Examples/BasketLosses/BasketLosses.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 98fda2fce017b404ed63c7d04f62b7e71402b3b5 Author: croudxd Date: Fri, 15 May 2026 21:15:03 +0000 Added check to check if engine_ is either bacheliercapfloorengine or blackcapfloorengine, then uses correct discountCurve in atmrate call. ql/instruments/makecapfloor.cpp | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) commit 5bf39d92b6bcebee633fc36a2133d7c000e25454 Author: JewonJeon Date: Fri, 15 May 2026 23:36:06 +0900 use auto for declaration .../integralhestonvarianceoptionengine.cpp | 81 +++++++++++----------- ql/math/matrixutilities/qrdecomposition.cpp | 12 ++-- ql/math/optimization/levenbergmarquardt.cpp | 18 ++--- .../vanilla/analyticgjrgarchengine.cpp | 6 +- 4 files changed, 57 insertions(+), 60 deletions(-) commit ae25d2846d61c0db38bc701a3475ca5678812554 Merge: 0c204a72e 0934f9100 Author: Luigi Ballabio Date: Fri, 15 May 2026 13:29:58 +0200 Const Notional Cross Currency Swaps (#2248) commit 0934f910072f32912cdffaffe2c5cceb2cca7b89 Author: Luigi Ballabio Date: Fri, 15 May 2026 12:04:13 +0200 Uniform EOL .../constnotionalcrosscurrencybasisswap.cpp | 368 ++++----- .../constnotionalcrosscurrencybasisswap.hpp | 362 ++++----- ...nstnotionalcrosscurrencyfixedvsfloatingswap.cpp | 346 ++++----- ...nstnotionalcrosscurrencyfixedvsfloatingswap.hpp | 382 +++++----- test-suite/constnotionalcrosscurrencybasisswap.cpp | 842 ++++++++++----------- ...nstnotionalcrosscurrencyfixedvsfloatingswap.cpp | 600 +++++++-------- 6 files changed, 1450 insertions(+), 1450 deletions(-) commit f61263103a58e55e7527587927ac0faa0f99b829 Author: Luigi Ballabio Date: Fri, 15 May 2026 12:01:08 +0200 More pedantic names QuantLib.vcxproj | 16 ++++---- QuantLib.vcxproj.filters | 16 ++++---- ql/CMakeLists.txt | 16 ++++---- .../termstructures/crosscurrencyratehelpers.cpp | 8 ++-- .../termstructures/crosscurrencyratehelpers.hpp | 4 +- ql/instruments/Makefile.am | 12 +++--- ql/instruments/all.hpp | 6 +-- ...cpp => constnotionalcrosscurrencybasisswap.cpp} | 46 ++++++++++----------- ...hpp => constnotionalcrosscurrencybasisswap.hpp} | 43 ++++++++++--------- ...stnotionalcrosscurrencyfixedvsfloatingswap.cpp} | 39 +++++++++--------- ...stnotionalcrosscurrencyfixedvsfloatingswap.hpp} | 38 ++++++++--------- ...swap.cpp => constnotionalcrosscurrencyswap.cpp} | 32 +++++++-------- ...swap.hpp => constnotionalcrosscurrencyswap.hpp} | 48 +++++++++++----------- ql/pricingengines/swap/Makefile.am | 4 +- ql/pricingengines/swap/all.hpp | 2 +- ...untingconstnotionalcrosscurrencyswapengine.cpp} | 10 ++--- ...untingconstnotionalcrosscurrencyswapengine.hpp} | 25 +++++------ test-suite/CMakeLists.txt | 6 +-- test-suite/Makefile.am | 6 +-- ...cpp => constnotionalcrosscurrencybasisswap.cpp} | 23 +++++------ ...stnotionalcrosscurrencyfixedvsfloatingswap.cpp} | 17 ++++---- ...swap.cpp => constnotionalcrosscurrencyswap.cpp} | 32 +++++++-------- test-suite/testsuite.vcxproj | 6 +-- test-suite/testsuite.vcxproj.filters | 6 +-- 24 files changed, 224 insertions(+), 237 deletions(-) commit 73e75f0e3aaa60bc7f0148c2820b7179a55e527a Author: Yassine Idyiahia Date: Wed, 13 May 2026 10:16:02 +0100 Add SmileSectionRNDCalculator for smile-implied marginals QuantLib.vcxproj | 2 + QuantLib.vcxproj.filters | 6 + ql/CMakeLists.txt | 2 + ql/methods/finitedifferences/utilities/Makefile.am | 2 + ql/methods/finitedifferences/utilities/all.hpp | 1 + .../utilities/smilesectionrndcalculator.cpp | 132 +++++++++++++++++ .../utilities/smilesectionrndcalculator.hpp | 69 +++++++++ test-suite/riskneutraldensitycalculator.cpp | 158 +++++++++++++++++++++ 8 files changed, 372 insertions(+) commit a255d1c49f2e467a09d688d2d928e02cdbba9661 Author: JewonJeon Date: Thu, 14 May 2026 21:53:26 +0900 Use make_unique for unique_ptr construction .../integralhestonvarianceoptionengine.cpp | 10 +++++----- ql/math/matrixutilities/qrdecomposition.cpp | 12 ++++++------ ql/math/optimization/levenbergmarquardt.cpp | 18 +++++++++--------- .../callability/bermudanswaptionexercisevalue.cpp | 2 +- ql/models/marketmodels/callability/lsstrategy.cpp | 2 +- .../marketmodels/callability/nothingexercisevalue.cpp | 2 +- .../callability/parametricexerciseadapter.cpp | 2 +- ql/models/marketmodels/callability/swapbasissystem.cpp | 2 +- .../callability/swapforwardbasissystem.cpp | 2 +- ql/models/marketmodels/callability/swapratetrigger.cpp | 2 +- .../marketmodels/callability/triggeredswapexercise.cpp | 2 +- .../marketmodels/callability/upperboundengine.cpp | 2 +- .../marketmodels/curvestates/cmswapcurvestate.cpp | 2 +- .../curvestates/coterminalswapcurvestate.cpp | 2 +- ql/models/marketmodels/curvestates/lmmcurvestate.cpp | 2 +- .../marketmodels/products/multiproductcomposite.cpp | 2 +- .../products/multistep/callspecifiedmultiproduct.cpp | 2 +- .../marketmodels/products/multistep/cashrebate.cpp | 2 +- .../products/multistep/exerciseadapter.cpp | 2 +- .../products/multistep/multistepcoinitialswaps.cpp | 2 +- .../products/multistep/multistepcoterminalswaps.cpp | 2 +- .../multistep/multistepcoterminalswaptions.cpp | 2 +- .../products/multistep/multistepforwards.cpp | 2 +- .../products/multistep/multistepinversefloater.cpp | 2 +- .../products/multistep/multistepnothing.cpp | 2 +- .../products/multistep/multistepoptionlets.cpp | 2 +- .../products/multistep/multisteppathwisewrapper.cpp | 2 +- .../multistep/multistepperiodcapletswaptions.cpp | 2 +- .../products/multistep/multistepratchet.cpp | 2 +- .../marketmodels/products/multistep/multistepswap.cpp | 2 +- .../products/multistep/multistepswaption.cpp | 2 +- .../marketmodels/products/multistep/multisteptarn.cpp | 2 +- .../products/onestep/onestepcoinitialswaps.cpp | 2 +- .../products/onestep/onestepcoterminalswaps.cpp | 2 +- .../marketmodels/products/onestep/onestepforwards.cpp | 2 +- .../products/onestep/onestepoptionlets.cpp | 2 +- .../products/pathwise/pathwiseproductcallspecified.cpp | 2 +- .../products/pathwise/pathwiseproductcaplet.cpp | 6 +++--- .../products/pathwise/pathwiseproductcashrebate.cpp | 2 +- .../pathwise/pathwiseproductinversefloater.cpp | 2 +- .../products/pathwise/pathwiseproductswap.cpp | 2 +- .../products/pathwise/pathwiseproductswaption.cpp | 5 ++--- .../marketmodels/products/singleproductcomposite.cpp | 2 +- ql/patterns/observable.hpp | 6 +++--- ql/pricingengines/vanilla/analyticgjrgarchengine.cpp | 6 +++--- 45 files changed, 69 insertions(+), 70 deletions(-) commit 6406602fbc886730e178622fe03199d93f817fa2 Author: Yassine Idyiahia Date: Wed, 13 May 2026 23:20:19 +0100 Override atmLevel(Time) on Heston and Andreasen-Huge vol surfaces .../equityfx/andreasenhugevolatilityadapter.cpp | 3 ++ .../equityfx/andreasenhugevolatilityadapter.hpp | 1 + .../volatility/equityfx/hestonblackvolsurface.cpp | 7 ++++ .../volatility/equityfx/hestonblackvolsurface.hpp | 1 + test-suite/andreasenhugevolatilityinterpl.cpp | 43 ++++++++++++++++++++++ test-suite/hestonmodel.cpp | 34 +++++++++++++++++ 6 files changed, 89 insertions(+) commit 0c204a72ecd680f4b23afb1192dcce8af4d8da09 Merge: 8e61faee4 ced8b90fc Author: Luigi Ballabio Date: Wed, 13 May 2026 15:02:20 +0200 Use Real instead of double in CompoundingOvernightIndexedCouponPricer lambda (#2577) commit 8e61faee43ff620f7ee8a83d879e1414f0e328da Merge: 464cca7bf 80a5b2d05 Author: Luigi Ballabio Date: Wed, 13 May 2026 10:35:30 +0200 Add `smileSection(...)` methods to `BlackVolTermStructure` (#2487) commit ced8b90fc32483853ed7df2ad6939acd76885ac8 Author: auto-differentiation-dev <107129969+auto-differentiation-dev@users.noreply.github.com> Date: Wed, 13 May 2026 09:31:10 +0100 Use Real instead of double in CompoundingOvernightIndexedCouponPricer lambda ql/cashflows/overnightindexedcouponpricer.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 464cca7bfcefde77dce50b62f1abf8d0f9da5257 Merge: 572571b54 f45d0dcd7 Author: Luigi Ballabio Date: Wed, 13 May 2026 10:29:17 +0200 Add `PearsonSpreadEngine` for spread option pricing (#2569) commit 80a5b2d05859756012fcbc3218f5d4fa364cc6ae Author: Yassine Idyiahia Date: Sun, 15 Mar 2026 11:55:30 +0000 Add smileSection() to BlackVolTermStructure with default adapter ql/shared_ptr.hpp | 2 + .../volatility/equityfx/blackvolsurfacedelta.cpp | 5 +- .../volatility/equityfx/blackvolsurfacedelta.hpp | 9 +- .../volatility/equityfx/blackvoltermstructure.cpp | 42 ++++++++ .../volatility/equityfx/blackvoltermstructure.hpp | 46 +++++++- .../equityfx/piecewiseblackvariancesurface.cpp | 10 ++ .../equityfx/piecewiseblackvariancesurface.hpp | 2 + test-suite/blackvolsurfacedelta.cpp | 62 ++++++++++- test-suite/piecewiseblackvariancesurface.cpp | 119 +++++++++++++++++++++ 9 files changed, 290 insertions(+), 7 deletions(-) commit 572571b5452a7c8d6c49a3f0c716f25c08f744e1 Author: lballabio[bot] <224797326+lballabio-bot@users.noreply.github.com> Date: Tue, 12 May 2026 08:18:44 +0000 Update old license links ql/time/calendars/uzbekistan.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3eb4dd0fe2350023614966c7bab3d434760ede75 Author: lballabio[bot] <224797326+lballabio-bot@users.noreply.github.com> Date: Tue, 12 May 2026 08:18:53 +0000 Update copyright list in license LICENSE.TXT | 1 + 1 file changed, 1 insertion(+) commit 28c2d66e1f6010501b8f804920e893d52394cff4 Author: lballabio[bot] <224797326+lballabio-bot@users.noreply.github.com> Date: Tue, 12 May 2026 08:20:45 +0000 Update generated headers ql/time/calendars/all.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8e3e07040f218ffe02434b5331a9c7ce68eecf10 Merge: bb831ef1a 074d38fe1 Author: Luigi Ballabio Date: Tue, 12 May 2026 10:18:30 +0200 Add some calendars, currencies, and the NOK NIBOR index (#2564) commit 074d38fe19ba4aa26179b0e2daad418760f81a51 Author: Luigi Ballabio Date: Tue, 12 May 2026 09:05:29 +0200 Follow Codacy suggestions about explicit constructors ql/indexes/ibor/nibor.hpp | 8 ++++---- ql/time/calendars/croatia.hpp | 4 ++-- ql/time/calendars/malta.hpp | 4 ++-- ql/time/calendars/montenegro.hpp | 4 ++-- ql/time/calendars/northmacedonia.hpp | 4 ++-- ql/time/calendars/serbia.hpp | 4 ++-- ql/time/calendars/slovenia.hpp | 2 +- ql/time/calendars/uzbekistan.hpp | 4 ++-- 8 files changed, 17 insertions(+), 17 deletions(-) commit 0aedf93745c038b62285fa1ca65cc189d1186c07 Author: ArsenP0doba Date: Mon, 11 May 2026 15:33:59 +0200 Fix type in nibor.hpp ql/indexes/ibor/nibor.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a5f6c57b1e5370e15cfeb65a50077ac94d7567aa Author: ArsenP0doba Date: Mon, 11 May 2026 15:23:16 +0200 Fix typo ql/currencies/asia.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7f49b94d64d9f43f8bab22b7c099d56dec0ef803 Author: ArsenP0doba Date: Mon, 11 May 2026 14:52:36 +0200 Update visual studio project files QuantLib.vcxproj | 5828 +++++++++--------- QuantLib.vcxproj.filters | 14818 ++++++++++++++++++++++----------------------- 2 files changed, 10323 insertions(+), 10323 deletions(-) commit 6f35f6a87bd29a4061d893c661703b21d7b6d691 Author: ArsenP0doba Date: Mon, 11 May 2026 14:49:00 +0200 add nibor.hpp to all.hpp ql/indexes/ibor/all.hpp | 1 + 1 file changed, 1 insertion(+) commit 862086f709e52dff8eac5315144264f3761e02b0 Author: ArsenP0doba Date: Mon, 11 May 2026 14:43:44 +0200 Fix typo in asia.hpp, rename NOKNibor to Nibor, change file attribution in calendar files ql/CMakeLists.txt | 2 +- ql/currencies/asia.hpp | 2 +- ql/indexes/ibor/Makefile.am | 2 +- ql/indexes/ibor/{noknibor.hpp => nibor.hpp} | 15 ++++++--------- ql/time/calendars/croatia.cpp | 2 +- ql/time/calendars/croatia.hpp | 2 +- ql/time/calendars/islamicholidays.cpp | 2 +- ql/time/calendars/islamicholidays.hpp | 2 +- ql/time/calendars/malta.cpp | 2 +- ql/time/calendars/malta.hpp | 2 +- ql/time/calendars/montenegro.cpp | 2 +- ql/time/calendars/montenegro.hpp | 2 +- ql/time/calendars/northmacedonia.cpp | 2 +- ql/time/calendars/northmacedonia.hpp | 2 +- ql/time/calendars/serbia.cpp | 2 +- ql/time/calendars/serbia.hpp | 2 +- ql/time/calendars/slovenia.cpp | 2 +- ql/time/calendars/slovenia.hpp | 2 +- ql/time/calendars/uzbekistan.cpp | 3 +-- ql/time/calendars/uzbekistan.hpp | 2 +- 20 files changed, 25 insertions(+), 29 deletions(-) commit bb831ef1a2d267864e30f9b1aa2257b4f02e85a3 Merge: 2d8ef3c72 244deda40 Author: Luigi Ballabio Date: Mon, 11 May 2026 12:58:33 +0200 Avoid dangling references in `FdmCEVOp` and `TrBDF2Scheme` classes (#2568) commit 2d8ef3c7241049c6e5edbbe1fdf9bcdff9eb63b4 Author: lballabio[bot] <224797326+lballabio-bot@users.noreply.github.com> Date: Sun, 10 May 2026 02:08:18 +0000 Automated fixes by clang-tidy test-suite/overnightindexedcoupon.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 4ef70a2d67e10bf37de7486d4f55daf39f1567a0 Author: pandashark Date: Sun, 10 May 2026 16:41:05 -0500 Fix trinomial tree excessive branching with gated dx floor Closes #364. When a TimeGrid contains mandatory time points separated by very short intervals (e.g. millisecond gaps inside an annual schedule), the trinomial tree's per-step dx = v*sqrt(3) shrinks to a tiny value at the short step. Because subsequent steps still need to cover the full state range, the integer-rounded `temp` index for each parent node lands far from j=0, causing the j-range to explode (Mandal observed several hundred nodes on a 50-step grid). Apply a Clewlow-Strickland (1998) global dx floor based on the largest natural dx in the grid, but only on grid steps that are at least two orders of magnitude shorter than dtMax (kFloorThreshold = 0.01). This preserves classical per-step dx = v*sqrt(3) on uniform and typical non-uniform grids (weekend rolls, 1-day mismatches) while bounding node count on the pathological small-mandatory-gap case. Probability formulas (dual branch on dxIsFloored): Unfloored regime (dxIsFloored == false): keep upstream's classical Hull-White / Clewlow form character-identical: e3 = e*sqrt(3) p1 = (1 + e^2/v^2 - e3/v) / 6 p2 = (2 - e^2/v^2) / 3 p3 = (1 + e^2/v^2 + e3/v) / 6 This is the hot path covering every current cached-value pricing test (bermudanswaption.cpp testCachedG2Values, callablebonds.cpp), so cached values are bit-for-bit identical to upstream master by code structure -- not by IEEE-754 coincidence as in the prior single-formula approach. Floored regime (dxIsFloored == true): use the general dx-based moment-matching form, which redistributes mass toward the middle node when dx is floored: p1 = (v^2 + e^2 - e*dx) / (2*dx^2) p2 = 1 - (v^2 + e^2) / dx^2 p3 = (v^2 + e^2 + e*dx) / (2*dx^2) These reduce to (1/6, 2/3, 1/6) when dx = v*sqrt(3). Non-negativity requires v^2 >= |e|*(dx - |e|), which always holds in the unfloored regime with naturally-rounded temp; in the floored regime when v << v_max the weights can go slightly negative. Documented in code as the accepted cost of the pathology fix; first two moments are matched exactly, so signed weights remain arithmetically consistent for linear payoff propagation. Hull-White-style alternative branching does not solve this regime (it solves the orthogonal boundary-drift problem). Branch flag semantics: dxIsFloored = (dxNext > dxNatural), defined post-computation, tracks whether the floor was *effective* at this step rather than whether the gate fired. For Hull-White with constant sigma the two definitions agree, but for time-dependent diffusions a short step can have its natural dx already exceed dxFloor -- the gate fires but dx is unchanged, and we should use the classical formulas plus the safety assertion. Floor diagnostics: - Floor activation threshold lifted to a file-scope constexpr kFloorThreshold inside namespace QuantLib for clarity. - Defensive QL_ENSURE on probability non-negativity in the unfloored regime, gated on !dxIsFloored && !tempBumped. The tempBumped flag tracks the isPositive while-loop that bumps `temp` upward to keep the underlying positive (CIR family); in that bumped state |e| can exceed dx/2 and probabilities can legitimately go negative, exactly as upstream allowed before this change. The guard still protects the most common path (no floor, no bump) against future drift. - dxFloor is computed via direct iteration over actual step variances (dxFloor = sqrt(3 * max_i variance(t_i, 0, dt(i)))), keeping the integration strictly within the declared grid horizon by construction. For Hull-White with constant sigma this is identical to a dtMax-windowed form, so cached test values are unchanged; for time-dependent diffusions it avoids floating-point fragility from any `terminal - t_i` subtraction and yields a slightly tighter bound. - The preflight pass that derives dtMax and dxFloor also caches per-step variances into std::vector; the main loop reads v2 from the cache rather than re-invoking process->variance(). Halves the variance() call count, measurable for processes with non-trivial variance evaluation cost. Test coverage (test-suite/trinomialtree.cpp): - testSmallMandatoryGapDoesNotExplode exercises the small- mandatory-gap pathology (1ms gap inside an annual grid) and asserts bounded node count via the derived 2*nSteps+1 bound. - testFloorThresholdBoundary probes immediately on either side of kFloorThreshold (gapRatio = 0.0099 floored, 0.0101 unfloored). The probe scans the constructed TimeGrid for the minimum-dt step (rather than hard-coding an index that depends on TimeGrid's prepend-t=0 behaviour) and reports both tree.dx(shortIdx+1) and the natural reference computed in the same operation order as production (sqrt(v2)*sqrt(3.0), not sqrt(3.0*v2)) so BOOST_CHECK_EQUAL is bit-stable across compilers. The below-side asserts shortStepDx > shortStepNaturalDx (floor positively active); the above-side asserts strict equality (floor positively inactive). This catches drift of kFloorThreshold in either direction -- a one-sided check would only detect upward drift. A pricing-level regression test for the floored regime (Bermudan swaption / callable bond on a small-mandatory-gap grid) is deliberately deferred: it would require modifying the engine's internal TimeGrid construction to inject a mandatory time outside any exercise date, which is outside the scope of this trinomial-tree fix. The unfloored hot path covering every current cached-value pricing test is bit-for-bit identical to upstream by construction; the floored regime's negative- probability invariants are covered by static analysis in code comments and the existing trinomial-tree unit tests. 1293/1293 tests pass. ql/methods/lattices/trinomialtree.cpp | 111 ++++++++++++++++++-- test-suite/CMakeLists.txt | 1 + test-suite/trinomialtree.cpp | 185 ++++++++++++++++++++++++++++++++++ 3 files changed, 291 insertions(+), 6 deletions(-) commit f45d0dcd788a765016aa6222306aea5069738ea7 Author: Yassine Idyiahia Date: Wed, 11 Mar 2026 15:51:42 +0000 Add PearsonSpreadEngine for spread option pricing QuantLib.vcxproj | 2 + QuantLib.vcxproj.filters | 6 ++ ql/CMakeLists.txt | 2 + ql/pricingengines/basket/Makefile.am | 2 + ql/pricingengines/basket/all.hpp | 1 + ql/pricingengines/basket/pearsonspreadengine.cpp | 93 +++++++++++++++++++ ql/pricingengines/basket/pearsonspreadengine.hpp | 60 +++++++++++++ test-suite/basketoption.cpp | 108 ++++++++++++++++++++++- 8 files changed, 273 insertions(+), 1 deletion(-) commit 751b0fde1a8185ce1db014314a9f0dad5258b275 Merge: af42ac4d5 00ea330f9 Author: Luigi Ballabio Date: Fri, 8 May 2026 18:42:57 +0200 Add term structure to G2 processes (#2555) commit af42ac4d5f96fd83429d3c61188acff5bc72af50 Merge: 024be57a2 f662e6b2a Author: Luigi Ballabio Date: Fri, 8 May 2026 11:55:29 +0200 Modernize small C++ constructs in selected files (#2561) commit 00ea330f915ed43b07ad7014111746b1597df600 Author: Luigi Ballabio Date: Fri, 8 May 2026 11:31:01 +0200 Syntax fix ql/processes/g2process.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 778c18badd5b51b073c9d3aa4454c509a34e3dd2 Author: Luigi Ballabio Date: Fri, 8 May 2026 11:30:00 +0200 Shorter syntax for empty handle ql/processes/g2process.hpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 024be57a20c70fe2218347108da8ee8bed5afd2f Merge: 714fed1e2 396cd15e5 Author: Luigi Ballabio Date: Fri, 8 May 2026 11:26:00 +0200 fuzz: add additional harnesses to be consumed by OSS-Fuzz (#2562) commit f662e6b2a3b1df710a66c78af5bf3653c2388774 Author: Luigi Ballabio Date: Fri, 8 May 2026 10:48:32 +0200 Use `push_back` instead of `emplace_back` when both have the same effect. test-suite/cashflows.cpp | 2 +- test-suite/optimizers.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 73286132914665bc0256fc2ec556e41d71f6b97a Author: gjunjie Date: Thu, 7 May 2026 14:36:11 -0400 Make term-structure handle a trailing default arg in G2 processes Moves the Handle parameter introduced in a6d68458c to the end of the G2Process and G2ForwardProcess constructor signatures and defaults it to an empty handle, so existing code using the original G2Process(a, sigma, b, eta, rho) / G2ForwardProcess(a, sigma, b, eta, rho) calls keeps compiling. Test-suite call sites updated to match. No behavioural change: an empty handle still means "no curve", which the existing implementation already handles in drift, expectation, initialValues, and phi. Made-with: Cursor ql/processes/g2process.cpp | 8 ++++---- ql/processes/g2process.hpp | 10 ++++++---- test-suite/g2process.cpp | 20 ++++++++++---------- 3 files changed, 20 insertions(+), 18 deletions(-) commit 1a91f551b7fd5469043c54dce853a342d75e7f94 Author: ArsenP0doba Date: Thu, 7 May 2026 16:06:35 +0200 Typo in montenegro.hpp/cpp ql/time/calendars/montenegro.cpp | 2 +- ql/time/calendars/montenegro.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit c1db9d9422e91b4bc5d0acda3ab3020f6315838d Author: ArsenP0doba Date: Thu, 7 May 2026 14:47:48 +0200 Add calendars (Croatia, Malta, Montenegro, North Macedonia, Serbia, Slovenia, Uzbekistan), currencies (MKD, UZS), and NOK-NIBOR index QuantLib.vcxproj | 5809 ++++++------- QuantLib.vcxproj.filters | 14761 ++++++++++++++++---------------- ql/CMakeLists.txt | 17 + ql/currencies/asia.cpp | 6 + ql/currencies/asia.hpp | 10 + ql/currencies/europe.cpp | 9 + ql/currencies/europe.hpp | 11 + ql/indexes/ibor/Makefile.am | 1 + ql/indexes/ibor/noknibor.hpp | 54 + ql/time/calendars/Makefile.am | 16 + ql/time/calendars/all.hpp | 8 + ql/time/calendars/croatia.cpp | 73 + ql/time/calendars/croatia.hpp | 72 + ql/time/calendars/islamicholidays.cpp | 75 + ql/time/calendars/islamicholidays.hpp | 44 + ql/time/calendars/malta.cpp | 82 + ql/time/calendars/malta.hpp | 83 + ql/time/calendars/montenegro.cpp | 59 + ql/time/calendars/montenegro.hpp | 65 + ql/time/calendars/northmacedonia.cpp | 64 + ql/time/calendars/northmacedonia.hpp | 68 + ql/time/calendars/serbia.cpp | 66 + ql/time/calendars/serbia.hpp | 65 + ql/time/calendars/slovenia.cpp | 68 + ql/time/calendars/slovenia.hpp | 71 + ql/time/calendars/uzbekistan.cpp | 58 + ql/time/calendars/uzbekistan.hpp | 66 + test-suite/calendars.cpp | 312 + 28 files changed, 11842 insertions(+), 10251 deletions(-) commit 3b11416b97fb9a30dad244a54077bfe858515280 Author: Yassine Idyiahia Date: Sun, 8 Mar 2026 13:00:21 +0000 Fix dangling references in FdmCEVOp and TrBDF2Scheme ql/methods/finitedifferences/operators/fdmcevop.hpp | 2 +- ql/methods/finitedifferences/schemes/trbdf2scheme.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 714fed1e254fdbcd536e6d1e5478bec75d325489 Merge: fedf402ab 3d3a44f47 Author: Luigi Ballabio Date: Wed, 6 May 2026 18:14:51 +0200 Improve `CompoundingOvernightIndexedCouponPricer::compute` calculation (#2556) commit 3d3a44f47367baa3dbce8cb66d4cd2ff2eee1392 Author: Steve Dacek <2327718+sdacek@users.noreply.github.com> Date: Wed, 6 May 2026 11:16:17 -0400 add test covering exCouponDate set after accrualEndDate test-suite/overnightindexedcoupon.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit 43ea1b46577eb6936208eade6db99c3b5803ff2a Author: Luigi Ballabio Date: Wed, 6 May 2026 14:45:59 +0200 Avoid incorrect parsing on Windows test-suite/overnightindexedcoupon.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 153179b48a8020ef4a8313258c4cfd549cde6a39 Author: Luigi Ballabio Date: Wed, 6 May 2026 13:29:26 +0200 More test dates for ex-coupon accrued amount test-suite/overnightindexedcoupon.cpp | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit 396cd15e53ee5aaeac0292297e12b01662bf9435 Author: David Korczynski Date: Wed, 6 May 2026 03:49:21 -0700 fuzz: add additional harnesses to be consumed by OSS-Fuzz Adds additional fuzzingh harnesses that will be run on OSS-Fuzz. The main goal is to increase code coverage, for which a recent code coverage report is available at https://storage.googleapis.com/oss-fuzz-coverage/quantlib/reports/20260504/linux/report.html The recent added harnesses has shown an increase, although there is still much room to go: https://introspector.oss-fuzz.com/project-profile?project=quantlib The harnesses added here roughly doubles the coverage on a short local run. Signed-off-by: David Korczynski fuzz-test-suite/CMakeLists.txt | 51 ++++++++++- fuzz-test-suite/fuzz_asianoption.cpp | 99 ++++++++++++++++++++++ fuzz-test-suite/fuzz_barrieroption.cpp | 93 ++++++++++++++++++++ fuzz-test-suite/fuzz_basketoption.cpp | 121 +++++++++++++++++++++++++++ fuzz-test-suite/fuzz_cashflows.cpp | 74 ++++++++++++++++ fuzz-test-suite/fuzz_exchangeratemanager.cpp | 57 +++++++++++++ fuzz-test-suite/fuzz_indexmanager.cpp | 45 ++++++++++ fuzz-test-suite/fuzz_vanilla_option.cpp | 110 ++++++++++++++++++++++++ 8 files changed, 649 insertions(+), 1 deletion(-) commit 68f59568e88483e37a5e697055126dbcead533fb Author: JewonJeon Date: Tue, 5 May 2026 11:56:17 +0900 commit to use modernized cpp for small parts ql/math/array.hpp | 14 +++++++------- ql/methods/finitedifferences/utilities/fdmquantohelper.cpp | 9 +++++---- ql/time/date.hpp | 2 +- test-suite/cashflows.cpp | 2 +- test-suite/optimizers.cpp | 11 +++++------ test-suite/quantlibbenchmark.cpp | 2 +- 6 files changed, 20 insertions(+), 20 deletions(-) commit e7c77f39e8c4f7ef3d7d4603eaec09ddff65dc0a Author: gjunjie Date: Fri, 1 May 2026 10:23:11 -0400 Shift G2Process state so PathGenerator paths are curve-consistent (#1904) Following review on PR #2555, the simulated state of G2Process and G2ForwardProcess is now (x + phi(t), y) instead of the raw zero-mean OU pair, so that state[0] + state[1] = r(t) directly. This mirrors HullWhiteProcess and means a MultiPathGenerator built on G2Process produces short-rate paths whose expectation matches the initial curve. Concretely: - drift gains a*phi(t) + phi'(t) on the first component - expectation gains phi(t0+dt) - phi(t0)*exp(-a*dt) on the first component - initialValues returns (phi(0), 0); x0() returns phi(0) - shortRate(t, z1, z2) now returns z1 + z2 diffusion, stdDeviation, and covariance are unchanged because the shift is deterministic. phi(t) is unchanged and still exposes the curve-implied offset. Empty-handle behaviour reduces to the old zero-mean OU pair. Tests in test-suite/g2process.cpp updated to reflect the new semantics, and a new MultiPathGenerator test verifies the empirical mean of state[0] + state[1] matches phi(t). Made-with: Cursor ql/processes/g2process.cpp | 79 +++++++++++++------ ql/processes/g2process.hpp | 24 +++++- test-suite/g2process.cpp | 191 +++++++++++++++++++++++++++++++++++---------- 3 files changed, 228 insertions(+), 66 deletions(-) commit 3298a86041cbab6354b64588f59485e3711d6b6a Author: Steve Dacek <2327718+sdacek@users.noreply.github.com> Date: Thu, 30 Apr 2026 13:25:20 -0400 remove unnecessary min/max ql/cashflows/overnightindexedcoupon.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit fedf402ab8423d027468757c110259e2d7a9c8cd Merge: 4c3594c7d 1e31d663b Author: Luigi Ballabio Date: Tue, 28 Apr 2026 09:12:59 +0200 Remove unused `yearFractionGuess` (#2559) commit 4c3594c7d1c9b952b315e2860f0f43694711c328 Merge: f3b639427 0a544a477 Author: Luigi Ballabio Date: Tue, 28 Apr 2026 09:12:29 +0200 Add missing `` include in `blackvoltimeextrapolation.hpp` (#2558) commit b7c471871d2e3e1deb1bf72905016a62ae25c739 Author: paolodelia99 Date: Mon, 27 Apr 2026 19:28:58 +0200 Renamed crossccy classes adding the prefix as suggested, cleaning up the code as suggested QuantLib.vcxproj | 16 ++++---- QuantLib.vcxproj.filters | 16 ++++---- ql/CMakeLists.txt | 16 ++++---- .../termstructures/crosscurrencyratehelpers.cpp | 18 +++------ .../termstructures/crosscurrencyratehelpers.hpp | 4 +- ql/instruments/Makefile.am | 12 +++--- ql/instruments/all.hpp | 6 +-- ...swap.cpp => constnotionalcrossccybasisswap.cpp} | 44 +++++++++++----------- ...swap.hpp => constnotionalcrossccybasisswap.hpp} | 12 +++--- ...p.cpp => constnotionalcrossccyfixfloatswap.cpp} | 38 +++++++++---------- ...p.hpp => constnotionalcrossccyfixfloatswap.hpp} | 15 ++++---- ...ssccyswap.cpp => constnotionalcrossccyswap.cpp} | 24 ++++++------ ...ssccyswap.hpp => constnotionalcrossccyswap.hpp} | 24 ++++++------ ql/pricingengines/swap/Makefile.am | 4 +- ql/pricingengines/swap/all.hpp | 2 +- ...ine.cpp => constnotionalcrossccyswapengine.cpp} | 8 ++-- ...ine.hpp => constnotionalcrossccyswapengine.hpp} | 12 +++--- test-suite/CMakeLists.txt | 6 +-- test-suite/Makefile.am | 6 +-- ...swap.cpp => constnotionalcrossccybasisswap.cpp} | 18 ++++----- ...p.cpp => constnotionalcrossccyfixfloatswap.cpp} | 16 ++++---- ...ssccyswap.cpp => constnotionalcrossccyswap.cpp} | 24 ++++++------ test-suite/testsuite.vcxproj | 6 +-- test-suite/testsuite.vcxproj.filters | 6 +-- 24 files changed, 173 insertions(+), 180 deletions(-) commit f3b63942792aa721a97146b7400cf434645e257c Merge: 1ae7615dc c9c286e9a Author: Luigi Ballabio Date: Mon, 27 Apr 2026 16:21:21 +0200 Make performCalculations methods on some curves protected (#2554) commit 1ae7615dc322aa8aac1b2e73156c5e7739de1b6f Merge: 5639d4962 d1bcc6706 Author: Luigi Ballabio Date: Mon, 27 Apr 2026 10:28:18 +0200 Prevent using non-default `boost::optional` with Boost 1.91 or later (#2560) commit 1e31d663b0dd412154a31d20c50e3f1758d1df9b Author: Eugene Toder Date: Fri, 24 Apr 2026 19:36:05 -0400 Remove unused yearFractionGuess ql/time/daycounters/actualactual.cpp | 11 ----------- 1 file changed, 11 deletions(-) commit f8d9ac069c49ac2f11fa90e86bbe17ab1b8356e1 Author: Steve Dacek <2327718+sdacek@users.noreply.github.com> Date: Fri, 24 Apr 2026 12:05:44 -0400 update testOvernightLegWeekendStub to use CashFlows::accruedAmount test-suite/overnightindexedcoupon.cpp | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) commit d1bcc6706b5f6a35959f857a531d8f7720aeb4be Author: Luigi Ballabio Date: Thu, 23 Apr 2026 09:37:56 +0200 Use Boost 1.91.0 in CI builds when possible .ci/userconfig2022.alt.hpp | 2 +- .ci/userconfig2026.alt.hpp | 2 +- .github/workflows/cmake-latest-runners.yml | 4 ++-- .github/workflows/cmake.yml | 8 ++++---- .github/workflows/linux-nondefault.yml | 2 +- .github/workflows/macos-nondefault.yml | 2 +- .github/workflows/msvc-analysis.yml | 4 ++-- .github/workflows/msvc-nondefault.yml | 4 ++-- 8 files changed, 14 insertions(+), 14 deletions(-) commit 3e443c13c465169cd05cbc74731dafd5b097eae7 Author: Steve Dacek <2327718+sdacek@users.noreply.github.com> Date: Fri, 24 Apr 2026 10:36:08 -0400 add test case covering weekend stub periods test-suite/overnightindexedcoupon.cpp | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit 0a544a47757dfd41a60ef0717b0de0f96e28e39a Author: Krish0909 Date: Fri, 24 Apr 2026 13:26:30 +0100 Add missing include in blackvoltimeextrapolation.hpp ql/termstructures/volatility/equityfx/blackvoltimeextrapolation.hpp | 1 + 1 file changed, 1 insertion(+) commit fcfc16f617105f2e19290e5481b91e70e7f1b0b7 Author: Luigi Ballabio Date: Fri, 24 Apr 2026 08:58:51 +0200 Forbid Boost >= 1.91 when using boost::optional instead of std::optional Docs/pages/config.docs | 8 +++++--- configure.ac | 9 +++++++-- ql/optional.hpp | 3 +++ ql/userconfig.hpp | 7 +++++-- 4 files changed, 20 insertions(+), 7 deletions(-) commit 5348d7a01e527e2434346de9e1f96143c34c9f99 Author: Steve Dacek <2327718+sdacek@users.noreply.github.com> Date: Wed, 15 Apr 2026 21:17:37 -0400 Improve `CompoundingOvernightIndexedCouponPricer::compute` calculation - Fix valueDate schedule generation when accrualStartDate falls on a fixing holiday (possible for SOFR swaps as they have different calendars for fixings and schedule generation). - interestDates are no longer adjusted for lookback when applyObservationShift is enabled (we can use valueDates in this case). This is needed to determine how far through rate calculation period we are for the purposes of accruals. - fix lockout date handling, so that lockouts only apply at the end of the period. - expose exCouponDate on OvernightIndexedCoupon. ql/cashflows/overnightindexedcoupon.cpp | 83 +-- ql/cashflows/overnightindexedcoupon.hpp | 3 +- ql/cashflows/overnightindexedcouponpricer.cpp | 160 ++--- test-suite/overnightindexedcoupon.cpp | 852 +++++++++++++++++++++++++- 4 files changed, 934 insertions(+), 164 deletions(-) commit 3607425692ccdd9ae8df31d458cec2eb98a7fe43 Author: gjunjie Date: Tue, 21 Apr 2026 20:00:33 -0400 Update copyright holder in test-suite/g2process.cpp Made-with: Cursor test-suite/g2process.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a6d68458c4571ff878bbe071b4e5dc84c0093ed7 Author: gjunjie Date: Tue, 21 Apr 2026 19:54:38 -0400 Add term structure, phi, and shortRate to G2 processes Extends G2Process and G2ForwardProcess with a yield term structure handle, deterministic drift phi(t), and a shortRate(t, x, y) helper so the processes can be used for short-rate simulation consistent with an initial curve. Also adds a corresponding g2process test. Made-with: Cursor ql/processes/g2process.cpp | 50 +++++++- ql/processes/g2process.hpp | 15 ++- test-suite/CMakeLists.txt | 1 + test-suite/Makefile.am | 1 + test-suite/g2process.cpp | 240 +++++++++++++++++++++++++++++++++++ test-suite/testsuite.vcxproj | 1 + test-suite/testsuite.vcxproj.filters | 3 + 7 files changed, 305 insertions(+), 6 deletions(-) commit c9c286e9a21f89f42d22b4bbfc7fd4c3857e6a75 Author: Eugene Toder Date: Tue, 21 Apr 2026 10:54:21 -0400 Make performCalculations methods on some curves protected Having them private does not actually prevent subclasses from overriding them, but it prevents subclasses from calling parent classes' implementations. ql/termstructures/inflation/piecewiseyoyinflationcurve.hpp | 3 ++- ql/termstructures/inflation/piecewisezeroinflationcurve.hpp | 3 ++- ql/termstructures/yield/piecewiseyieldcurve.hpp | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) commit 5639d4962357e15efda7538f46d611b68407dbdf Merge: cf2a42c98 ff678f64a Author: Luigi Ballabio Date: Tue, 21 Apr 2026 12:06:10 +0200 Deprecate selection of test cases via speed (#2552) commit cf2a42c982da78e3649f1ebc1f30c0e4a6684b98 Merge: ed4f694c5 f9a2ff5e9 Author: Luigi Ballabio Date: Tue, 21 Apr 2026 12:04:45 +0200 Pass allowExtrapolation=true to derivative() (#2550) commit ed4f694c58e779ec7366c88ca781ff9a34f32a40 Merge: 98afd0b22 1eb19a3d1 Author: Luigi Ballabio Date: Mon, 20 Apr 2026 15:21:52 +0200 Avoid repeated calls to `Interpolation::update()` (#2513) commit ff678f64ae1142840a7f99bab7ebfefb9e928270 Author: Luigi Ballabio Date: Mon, 20 Apr 2026 10:46:38 +0200 Deprecate selection of test cases via speed group .github/workflows/test-times.yml | 6 --- test-suite/americanoption.cpp | 3 +- test-suite/andreasenhugevolatilityinterpl.cpp | 11 +++--- test-suite/asianoptions.cpp | 7 ++-- test-suite/basketoption.cpp | 5 +-- test-suite/bermudanswaption.cpp | 3 +- test-suite/cdo.cpp | 3 +- test-suite/dividendoption.cpp | 3 +- test-suite/doublebarrieroption.cpp | 3 +- test-suite/fdheston.cpp | 5 +-- test-suite/fdmlinearop.cpp | 3 +- test-suite/fdsabr.cpp | 3 +- test-suite/forwardoption.cpp | 3 +- test-suite/gjrgarchmodel.cpp | 5 +-- test-suite/hestonmodel.cpp | 7 ++-- test-suite/hestonslvmodel.cpp | 13 +++---- test-suite/hybridhestonhullwhiteprocess.cpp | 7 ++-- test-suite/interpolations.cpp | 3 +- test-suite/libormarketmodel.cpp | 3 +- test-suite/libormarketmodelprocess.cpp | 3 +- test-suite/lookbackoptions.cpp | 3 +- test-suite/lowdiscrepancysequences.cpp | 3 +- test-suite/marketmodel.cpp | 13 +++---- test-suite/marketmodel_cms.cpp | 3 +- test-suite/marketmodel_smm.cpp | 3 +- test-suite/markovfunctional.cpp | 7 ++-- test-suite/mclongstaffschwartzengine.cpp | 3 +- test-suite/normalclvmodel.cpp | 3 +- test-suite/nthorderderivativeop.cpp | 3 +- test-suite/nthtodefault.cpp | 5 +-- test-suite/optionletstripper.cpp | 3 +- test-suite/preconditions.cpp | 4 ++ test-suite/preconditions.hpp | 11 +++++- test-suite/quantlibglobalfixture.cpp | 36 +++++++----------- test-suite/quantlibglobalfixture.hpp | 9 ++++- test-suite/riskneutraldensitycalculator.cpp | 3 +- test-suite/swaption.cpp | 5 +-- test-suite/swingoption.cpp | 5 +-- test-suite/vpp.cpp | 3 +- test-suite/zabr.cpp | 3 +- tools/check_test_times.py | 53 ++++++++++----------------- 41 files changed, 116 insertions(+), 164 deletions(-) commit 98afd0b224365aa48586b9d80c0e6d3c50bf7ea0 Author: lballabio[bot] <224797326+lballabio-bot@users.noreply.github.com> Date: Sun, 19 Apr 2026 01:50:37 +0000 Automated fixes by clang-tidy ql/experimental/inflation/interpolatedyoyoptionletstripper.hpp | 4 ++-- ql/indexes/inflationindex.hpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit f9a2ff5e9d46e6bad60c1622ce0f32952e265dd1 Author: Eugene Toder Date: Fri, 17 Apr 2026 20:00:46 -0400 Pass allowExtrapolation=true to derivative() For consistency with other calls. ql/math/interpolations/mixedinterpolation.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2c087e479776d99e88f156163158913f032ab819 Author: Luigi Ballabio Date: Fri, 17 Apr 2026 18:52:58 +0200 Move a few tests in the Fast section test-suite/cdo.cpp | 2 +- test-suite/nthtodefault.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 42223d17a55d11af20ba74f78457b5c9c112ac1d Author: lballabio[bot] <224797326+lballabio-bot@users.noreply.github.com> Date: Fri, 17 Apr 2026 15:01:42 +0000 Update copyright list in license LICENSE.TXT | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 87bbee58dc1522e69a29923fab3586987143c58d Author: lballabio[bot] <224797326+lballabio-bot@users.noreply.github.com> Date: Fri, 17 Apr 2026 14:05:15 +0000 Update old license links ql/indexes/ibor/zaronia.cpp | 2 +- ql/indexes/ibor/zaronia.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit a1494b1a6bf76b61f9dd0f747ee4186e7e5bd4c7 Merge: fc9cdf997 bf2309275 Author: Luigi Ballabio Date: Fri, 17 Apr 2026 16:05:02 +0200 Add FlatExtrapolator wrapper for 1-D interpolations (#2540) commit fc9cdf997f36ccfba61c0c60194c84c99750a845 Author: lballabio[bot] <224797326+lballabio-bot@users.noreply.github.com> Date: Fri, 17 Apr 2026 11:07:28 +0000 Update generated headers ql/indexes/ibor/all.hpp | 1 + 1 file changed, 1 insertion(+) commit 7e2969ebbd7d71ed1ab64959f59226d38663d666 Merge: e9c089627 f310a3598 Author: Luigi Ballabio Date: Fri, 17 Apr 2026 12:31:21 +0200 Cache invariants in ImpliedTermStructure (#2533) commit e9c089627bc39682fedcf28310aceda8213043e4 Merge: 89e215693 9305c2af6 Author: Luigi Ballabio Date: Fri, 17 Apr 2026 12:30:47 +0200 Add ZARONIA (South African Rand Overnight Index Average) (#2537) commit bf2309275ce90b380598f511bdf37559220451e3 Author: gjunjie Date: Thu, 16 Apr 2026 10:01:26 -0400 Add coverage tests for FlatExtrapolator Test primitive (below/above/in-range), in-range second derivative, xValues/yValues accessors, isInRange, and update. Made-with: Cursor test-suite/interpolations.cpp | 94 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) commit 983936f087a406eb93334c19f3cde94750048375 Author: gjunjie Date: Thu, 16 Apr 2026 09:57:56 -0400 Add flatextrapolation.hpp to VS project files The header was missing from QuantLib.vcxproj and QuantLib.vcxproj.filters since it was first added. Made-with: Cursor QuantLib.vcxproj | 1 + QuantLib.vcxproj.filters | 3 +++ 2 files changed, 4 insertions(+) commit 75a908a413585d924086b5936c7b1ebfaff68ee3 Author: Luigi Ballabio Date: Thu, 16 Apr 2026 14:59:01 +0200 Add action to prepare patch release .github/workflows/prepare-patch-release.yml | 44 +++++++++++++++++++++++++ .github/workflows/prepare-release-candidate.yml | 4 +-- .github/workflows/prepare-release.yml | 4 +-- 3 files changed, 48 insertions(+), 4 deletions(-) commit bf1f38ac4243026a94e74d4636e11c247fa411b0 Author: gjunjie Date: Thu, 16 Apr 2026 07:48:14 -0400 Use std::clamp in FlatExtrapolatorImpl::bind Made-with: Cursor ql/math/interpolations/flatextrapolation.hpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 2adc8bb8d92f3cb698d6c7e970aaa4a4a43bd4d9 Merge: fe7bf138f 415899521 Author: Luigi Ballabio Date: Thu, 16 Apr 2026 13:00:37 +0200 Add support and CI build for Visual Studio 2026 (#2542) commit fe7bf138febef104da5cf2c39a0c012c6a6b6f0d Merge: 8aef029c0 6a643c2aa Author: Luigi Ballabio Date: Thu, 16 Apr 2026 12:59:34 +0200 Deprecated obsolete bits of interpolation code in year-on-year inflation indexes (#2541) commit f310a35987a9f9cf159caed2472e0d5f719e0889 Author: Eugene Toder Date: Fri, 10 Apr 2026 07:14:37 -0400 Cache invariants in ImpliedTermStructure Also, auto-enable extrapolation based on the original curve for consistency with other derived curves. ql/termstructures/yield/impliedtermstructure.hpp | 31 ++++++++++++++++++------ test-suite/termstructures.cpp | 24 +++++++++++------- 2 files changed, 38 insertions(+), 17 deletions(-) commit 415899521f4a105e549d779ab71a02ebf3c0249d Author: Luigi Ballabio Date: Wed, 15 Apr 2026 09:27:55 +0200 Add support and CI build for Visual Studio 2026 .ci/VS2026.alt.props | 15 ++++ .ci/VS2026.props | 13 ++++ .ci/userconfig2026.alt.hpp | 126 +++++++++++++++++++++++++++++++++ .github/workflows/msvc-all-configs.yml | 10 ++- .github/workflows/msvc-nondefault.yml | 10 ++- .github/workflows/msvc.yml | 10 ++- QuantLib.props | 3 +- 7 files changed, 180 insertions(+), 7 deletions(-) commit 8cc1b81de8934c3424064460e5f86efbd5d59802 Author: gjunjie Date: Wed, 15 Apr 2026 07:34:15 -0400 Mark FlatExtrapolatorImpl as final Made-with: Cursor ql/math/interpolations/flatextrapolation.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8aef029c02935baf52c93391eb70dcdbd9ab88aa Merge: 41fff5ea0 1f761627f Author: Luigi Ballabio Date: Wed, 15 Apr 2026 10:06:09 +0200 Fix const-correctness of element access in `Matrix` class (#2527) commit 41fff5ea0f2e22d72cfbe2a8b565982ae09fb219 Merge: da1704f8f 24448916b Author: Luigi Ballabio Date: Wed, 15 Apr 2026 10:04:54 +0200 Add fuzzing harness for Black formula (#2523) commit d8f321cc863db68c611cd2b580019366383df6a3 Author: gjunjie Date: Tue, 14 Apr 2026 20:22:42 -0400 Add xValues() and yValues() accessors to Interpolation Made-with: Cursor ql/math/interpolation.hpp | 6 ++++++ 1 file changed, 6 insertions(+) commit 2f1f45efe616920cd3eb4991092ab5bdeb17ca4c Author: gjunjie Date: Tue, 14 Apr 2026 17:33:53 -0400 Add FlatExtrapolator wrapper for 1-D interpolations Use it in MarkovFunctional to replace manual clamping logic, resolving the existing FIXME about incorporating flat extrapolation into the interpolation object. Made-with: Cursor ql/CMakeLists.txt | 1 + ql/math/interpolations/Makefile.am | 1 + ql/math/interpolations/all.hpp | 1 + ql/math/interpolations/flatextrapolation.hpp | 105 ++++++++++++++++++ .../shortrate/onefactormodels/markovfunctional.cpp | 19 ++-- test-suite/interpolations.cpp | 117 +++++++++++++++++++++ 6 files changed, 232 insertions(+), 12 deletions(-) commit 6a643c2aaa420f5e91e34f6709293d3f6fab195d Author: Luigi Ballabio Date: Tue, 14 Apr 2026 18:45:33 +0200 Deprecate CPI::AsIndex ql/cashflows/cpicoupon.hpp | 2 +- ql/experimental/inflation/cpicapfloorengines.cpp | 2 ++ .../inflation/interpolatedyoyoptionletstripper.hpp | 2 +- ql/indexes/inflationindex.cpp | 10 +++++++-- ql/indexes/inflationindex.hpp | 9 +++++--- ql/instruments/cpicapfloor.hpp | 2 +- ql/instruments/cpiswap.hpp | 2 +- test-suite/inflation.cpp | 26 +++++++++++++--------- test-suite/inflationcpibond.cpp | 2 +- test-suite/inflationcpicapfloor.cpp | 4 ++-- test-suite/inflationcpiswap.cpp | 14 ++++++------ 11 files changed, 46 insertions(+), 29 deletions(-) commit e53cd8ab624779c2509950a52e23947b4bf6e87c Author: Luigi Ballabio Date: Tue, 14 Apr 2026 15:24:08 +0200 Deprecate YoYInflationIndex::interpolated() .../inflation/interpolatedyoyoptionletstripper.hpp | 2 +- .../kinterpolatedyoyoptionletvolatilitysurface.hpp | 2 +- ql/indexes/inflationindex.cpp | 23 ++++++++++++++++++---- ql/indexes/inflationindex.hpp | 16 ++++++++++++++- test-suite/inflation.cpp | 5 ++++- test-suite/inflationcapfloor.cpp | 2 +- test-suite/inflationcapflooredcoupon.cpp | 4 ++-- 7 files changed, 43 insertions(+), 11 deletions(-) commit da1704f8fbce6343007aa0d3fdfab9de9c56dfcb Author: Luigi Ballabio Date: Wed, 1 Apr 2026 16:44:27 +0200 Avoid deprecated instruction in Dockerfile dockerfiles/ci.Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 982e18a799c14fb8b01f3940e6f07eddddeb1826 Author: Luigi Ballabio Date: Wed, 1 Apr 2026 16:13:48 +0200 Use action from Microsoft to setup msbuild where possible .github/workflows/msvc-all-configs.yml | 4 ++-- .github/workflows/msvc-nondefault.yml | 4 ++-- .github/workflows/msvc.yml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) commit 0af0ec4c8fdc1789900a9901777135da1b4b3176 Author: Luigi Ballabio Date: Mon, 13 Apr 2026 09:22:47 +0200 Add convenience workflow for pre-release checks .github/workflows/cmake-latest-runners.yml | 1 + .github/workflows/linux-full-tests.yml | 1 + .github/workflows/linux-nondefault.yml | 1 + .github/workflows/macos-nondefault.yml | 1 + .github/workflows/msvc-all-configs.yml | 1 + .github/workflows/msvc-nondefault.yml | 1 + .github/workflows/prerelease-checks.yml | 18 ++++++++++++++++++ 7 files changed, 24 insertions(+) commit fce61e4b3753c01240b387f7c9f4a44d5035bdb1 Author: Luigi Ballabio Date: Tue, 14 Apr 2026 10:30:58 +0200 Increase version number automatically after release .github/workflows/increase-version-number.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit c810b509495acee8faa1fd8ce23344ff10ca5f11 Merge: 82bd3acfd 4ba489d24 Author: Luigi Ballabio Date: Tue, 14 Apr 2026 13:11:00 +0200 Remove features deprecated in version 1.38 (#2539) commit 82bd3acfdd3b391695f4a1de73a406cc7e246d74 Author: lballabio[bot] <224797326+lballabio-bot@users.noreply.github.com> Date: Tue, 14 Apr 2026 07:59:53 +0000 Set version to 1.43-dev CMakeLists.txt | 6 +++--- configure.ac | 2 +- ql/version.hpp | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) commit 9305c2af64072904d82a8d769e5557b3cd24cfe9 Author: Francois Botha Date: Wed, 24 Jul 2024 18:28:08 +0200 Add ZARONIA (South African Rand Overnight Index Average) QuantLib.vcxproj | 2 ++ QuantLib.vcxproj.filters | 6 ++++++ ql/CMakeLists.txt | 2 ++ ql/indexes/ibor/Makefile.am | 4 +++- ql/indexes/ibor/zaronia.cpp | 30 ++++++++++++++++++++++++++++++ ql/indexes/ibor/zaronia.hpp | 39 +++++++++++++++++++++++++++++++++++++++ 6 files changed, 82 insertions(+), 1 deletion(-) commit 1f761627f201689b5419c80184a3d11e670d6e93 Author: JewonJeon Date: Wed, 1 Apr 2026 20:10:19 +0900 fix const-correctness in Matrix class ql/math/matrix.hpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 24448916b5edf9c96c3ce6d7112ece0449c37059 Author: David Korczynski Date: Tue, 31 Mar 2026 08:59:48 -0700 fuzz: add fuzzing harness for Black Formula The goal is to improve code coverage of quantlib by way of OSS-Fuzz. Signed-off-by: David Korczynski fuzz-test-suite/CMakeLists.txt | 9 ++- fuzz-test-suite/fuzzblackformula.cpp | 124 +++++++++++++++++++++++++++++++++++ 2 files changed, 132 insertions(+), 1 deletion(-) commit 1eb19a3d11b173064b518cbaad2f5674dcf5af4e Author: Eugene Toder Date: Wed, 25 Mar 2026 19:53:15 -0400 Avoid repeated calls to Interpolation::update() Add a flag (defaulting to true) for whether to run update when the interpolation is constructed. This matches the current behavior of most interpolations. Pass update=false when we don't need this, because we will call update later. In particular, do this in composite interpolations (log and mixed) and bootstrappers where we currently call update multiple times unnecessarily (usually all but the last call are before the data for the interpolation is set). Note that: 1. Interpolations that do not support the new update argument are called without it. 2. Interpolations are assumed to call update during construction when not passed update=false. This is true for most current interpolations except XABR. Since XABR is not used in interpolated curves, this is out of scope for this PR. 3. Interpolation2D implementations used a different convention and never called update in constructors, so they are also out of scope for the change. 4. GlobalBootstrap currently has an issue where for rates-based traits it calls methods that use interpolation (zeroRate and forwardRate) without updating it first. This will be addressed in a separate PR. Fixes #2447 .../credit/interpolatedaffinehazardratecurve.hpp | 1 - ql/math/interpolation.hpp | 20 +++- ql/math/interpolations/abcdinterpolation.hpp | 10 +- .../interpolations/backwardflatinterpolation.hpp | 9 +- .../interpolations/convexmonotoneinterpolation.hpp | 15 +-- ql/math/interpolations/cubicinterpolation.hpp | 11 ++- .../interpolations/forwardflatinterpolation.hpp | 9 +- ql/math/interpolations/linearinterpolation.hpp | 9 +- ql/math/interpolations/loginterpolation.hpp | 35 ++++--- ql/math/interpolations/mixedinterpolation.hpp | 31 +++--- .../credit/interpolateddefaultdensitycurve.hpp | 1 - .../credit/interpolatedhazardratecurve.hpp | 1 - .../interpolatedsurvivalprobabilitycurve.hpp | 1 - .../inflation/interpolatedyoyinflationcurve.hpp | 1 - .../inflation/interpolatedzeroinflationcurve.hpp | 1 - ql/termstructures/iterativebootstrap.hpp | 9 +- .../volatility/capfloor/capfloortermvolcurve.cpp | 3 +- .../volatility/equityfx/blackvariancecurve.hpp | 1 - ql/termstructures/yield/discountcurve.hpp | 1 - ql/termstructures/yield/forwardcurve.hpp | 1 - .../yield/interpolatedsimplezerocurve.hpp | 1 - .../piecewiseforwardspreadedtermstructure.hpp | 18 ++-- .../yield/piecewisezerospreadedtermstructure.hpp | 10 +- ql/termstructures/yield/spreaddiscountcurve.hpp | 4 +- ql/termstructures/yield/zerocurve.hpp | 1 - test-suite/interpolations.cpp | 104 ++++++++++++++------- 26 files changed, 186 insertions(+), 122 deletions(-) commit 4ba489d2421285c6b1d21bc6b57d28450c7b0cc9 Author: Luigi Ballabio Date: Fri, 20 Mar 2026 17:10:55 +0100 Remove features deprecated in version 1.38 QuantLib.vcxproj | 13 -- QuantLib.vcxproj.filters | 39 ---- cmake/GenerateHeaders.cmake | 13 -- ql/CMakeLists.txt | 13 -- ql/experimental/exoticoptions/Makefile.am | 28 +-- .../analyticholderextensibleoptionengine.hpp | 28 --- .../analyticpartialtimebarrieroptionengine.hpp | 28 --- .../exoticoptions/analyticpdfhestonengine.hpp | 29 --- .../analytictwoassetbarrierengine.hpp | 28 --- .../analytictwoassetcorrelationengine.hpp | 28 --- .../analyticwriterextensibleoptionengine.hpp | 28 --- .../continuousarithmeticasianlevyengine.hpp | 28 --- .../exoticoptions/holderextensibleoption.hpp | 28 --- .../exoticoptions/partialtimebarrieroption.hpp | 28 --- .../exoticoptions/twoassetbarrieroption.hpp | 29 --- .../exoticoptions/twoassetcorrelationoption.hpp | 28 --- .../exoticoptions/writerextensibleoption.hpp | 28 --- ql/experimental/inflation/genericindexes.hpp | 23 -- ql/indexes/ibor/Makefile.am | 3 +- ql/indexes/ibor/tona.hpp | 28 --- ql/indexes/inflation/aucpi.hpp | 21 -- ql/indexes/inflation/euhicp.hpp | 40 ---- ql/indexes/inflation/frhicp.hpp | 20 -- ql/indexes/inflation/ukrpi.hpp | 20 -- ql/indexes/inflation/uscpi.hpp | 20 -- ql/indexes/inflation/zacpi.hpp | 20 -- ql/indexes/inflationindex.cpp | 33 +-- ql/indexes/inflationindex.hpp | 24 -- test-suite/inflation.cpp | 258 ++++----------------- 29 files changed, 52 insertions(+), 902 deletions(-) commit 3527ecb5f44ee24d5c247b0a38b3a0dc7218e8f7 Author: paolodelia99 Date: Sun, 15 Mar 2026 19:06:51 +0100 Add util static function for notional exchanges adjs ql/instruments/crossccybasisswap.cpp | 30 ++++++++++++++---------------- ql/instruments/crossccyfixfloatswap.cpp | 26 +++++++------------------- ql/instruments/crossccyswap.cpp | 16 ++++++++++++++++ ql/instruments/crossccyswap.hpp | 6 ++++++ test-suite/crossccyfixfloatswap.cpp | 2 +- 5 files changed, 44 insertions(+), 36 deletions(-) commit b3f44c65572bf2e5cd63126c44b45179ec5c1660 Author: paolodelia99 Date: Sat, 7 Feb 2026 20:44:29 +0100 remove old code in xccyratehelper .../termstructures/crosscurrencyratehelpers.cpp | 35 ++-------------------- .../termstructures/crosscurrencyratehelpers.hpp | 2 -- 2 files changed, 2 insertions(+), 35 deletions(-) commit c1e96da22ff6b1747dda40510a5f85043f6087aa Author: paolodelia99 Date: Sat, 7 Feb 2026 20:37:03 +0100 using crossccyswap for impliedQuote calc in constnotionalxccyhelper, add paymentLag adj for notional exchanges .../termstructures/crosscurrencyratehelpers.cpp | 56 ++++++++++++++++++++-- .../termstructures/crosscurrencyratehelpers.hpp | 2 + ql/instruments/crossccyfixfloatswap.cpp | 33 +++++++------ test-suite/crosscurrencyratehelpers.cpp | 26 ++++++---- 4 files changed, 90 insertions(+), 27 deletions(-) commit f3466f676d956845eacf2ddab31e1de2d88b0bc5 Author: lballabio[bot] <224797326+lballabio-bot@users.noreply.github.com> Date: Fri, 26 Dec 2025 11:29:06 +0000 Update old license links ql/instruments/crossccybasisswap.cpp | 2 +- ql/instruments/crossccybasisswap.hpp | 2 +- ql/instruments/crossccyfixfloatswap.cpp | 2 +- ql/instruments/crossccyfixfloatswap.hpp | 2 +- ql/instruments/crossccyswap.cpp | 2 +- ql/instruments/crossccyswap.hpp | 2 +- ql/pricingengines/swap/crossccyswapengine.cpp | 2 +- ql/pricingengines/swap/crossccyswapengine.hpp | 2 +- test-suite/crossccybasisswap.cpp | 2 +- test-suite/crossccyfixfloatswap.cpp | 2 +- test-suite/crossccyswap.cpp | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) commit d82c3c933990228675bbf31fae7be125e46d558d Author: lballabio[bot] <224797326+lballabio-bot@users.noreply.github.com> Date: Fri, 26 Dec 2025 11:29:06 +0000 Update copyright list in license LICENSE.TXT | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 2edbcd37c53931155a5575e19de5d6ecc5f4eaa7 Author: paolodelia99 Date: Fri, 26 Dec 2025 12:30:31 +0100 Fix doc string and add ONXccy test ql/instruments/crossccyswap.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f5a7cf82b1357ef4bec5b79ccc19a28c5685caec Author: paolodelia99 Date: Fri, 26 Dec 2025 12:28:54 +0100 Fix doc string and add ONXccy test ql/instruments/crossccybasisswap.cpp | 17 +++++--- ql/instruments/crossccybasisswap.hpp | 17 +++++--- ql/instruments/crossccyfixfloatswap.cpp | 4 +- ql/instruments/crossccyfixfloatswap.hpp | 1 + ql/instruments/crossccyswap.cpp | 1 + ql/instruments/crossccyswap.hpp | 1 + test-suite/crossccybasisswap.cpp | 70 ++++++++++++++++++++++++++++++++- 7 files changed, 96 insertions(+), 15 deletions(-) commit 68e1ddab3cd4fe719bb021ac9ad07bd373d539b9 Author: paolodelia99 Date: Fri, 26 Dec 2025 11:22:22 +0100 Adjusted code to new ON coupon alignment QuantLib.vcxproj | 1 - ql/CMakeLists.txt | 1 - ql/cashflows/overnightindexedcoupon.hpp | 1 - ql/instruments/Makefile.am | 1 - ql/instruments/crossccybasisswap.cpp | 17 +++++++++++------ ql/instruments/crossccybasisswap.hpp | 16 +++++++++++----- ql/instruments/crossccyfixfloatswap.cpp | 26 +++++++++++++++++++++++--- ql/instruments/crossccyfixfloatswap.hpp | 21 ++++++++++++++++++++- test-suite/CMakeLists.txt | 1 - test-suite/Makefile.am | 1 - test-suite/testsuite.vcxproj | 1 - 11 files changed, 65 insertions(+), 22 deletions(-) commit 68c83530bbcf3414f7bae0cf937f97cd80ff2f2d Author: paolodelia99 Date: Fri, 1 Aug 2025 15:18:54 +0200 Rename xccyswapengine constructor params ql/pricingengines/swap/crossccyswapengine.cpp | 44 +++++++++++++-------------- ql/pricingengines/swap/crossccyswapengine.hpp | 38 +++++++++++------------ 2 files changed, 41 insertions(+), 41 deletions(-) commit 9c82a36e02280f4a95cc99ba20e23350ebbdad33 Author: Paolo D'Elia Date: Thu, 19 Jun 2025 15:15:13 +0200 Add constructor docstring in crossccyfixfloatswap.hpp ql/instruments/crossccyfixfloatswap.hpp | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) commit 496d95d6226bb2dcf699dca689799a55fe4f9f55 Author: Paolo D'Elia Date: Thu, 19 Jun 2025 15:13:14 +0200 Add constructor docstring in crossccybasisswap.hpp ql/instruments/crossccybasisswap.hpp | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) commit e35c609ae3e94c4a7313dde75ad7ccaae53f6810 Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 17 Jun 2025 17:25:20 +0000 Update generated headers ql/instruments/all.hpp | 1 + 1 file changed, 1 insertion(+) commit 77e673f17c998282af66294a7498846a663c1901 Author: paolodelia99 Date: Tue, 17 Jun 2025 19:23:11 +0200 Fix typo in crossccybasisswap filename in Makefile.am test-suite/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cecf12414b77f03f5d7f92355825ceb2ecbc7165 Author: paolodelia99 Date: Tue, 17 Jun 2025 19:17:14 +0200 Added crossccybasisswap and related tests QuantLib.vcxproj | 2 + QuantLib.vcxproj.filters | 6 + ql/CMakeLists.txt | 2 + ql/instruments/Makefile.am | 2 + ql/instruments/crossccybasisswap.cpp | 176 +++++++++++++++++ ql/instruments/crossccybasisswap.hpp | 149 +++++++++++++++ test-suite/CMakeLists.txt | 1 + test-suite/Makefile.am | 1 + test-suite/crossccybasisswap.cpp | 356 +++++++++++++++++++++++++++++++++++ test-suite/testsuite.vcxproj | 1 + test-suite/testsuite.vcxproj.filters | 3 + 11 files changed, 699 insertions(+) commit ecdda37e9edd6116d3268749c7690bda2a58cf60 Author: Paolo D'Elia Date: Tue, 17 Jun 2025 10:30:02 +0200 Add missing import in crossccyfixfloatswap tests test-suite/crossccyfixfloatswap.cpp | 1 + 1 file changed, 1 insertion(+) commit a65859e7d9a00f8ed9fef0309ce2d21891314368 Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 17 Jun 2025 08:11:58 +0000 Update copyright list in license LICENSE.TXT | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9b62fab040c1521577a8bad55ab438c7107259bc Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 16 Jun 2025 17:15:30 +0000 Update generated headers ql/instruments/all.hpp | 1 + 1 file changed, 1 insertion(+) commit 59df14c7748282d7021ae226e129ad725128807b Author: Paolo D'Elia Date: Tue, 17 Jun 2025 10:11:44 +0200 add usingAtParCoupons, and fix code format in crossccyfixfloatswap.cpp test-suite/crossccyfixfloatswap.cpp | 54 ++++++++++++++++++------------------- 1 file changed, 27 insertions(+), 27 deletions(-) commit 960ab1552e011809f197bd3b822be06346cd29b2 Author: paolodelia99 Date: Mon, 16 Jun 2025 19:13:08 +0200 Fixed typo in comments ql/instruments/crossccyfixfloatswap.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 63f267fff09df93f4f737ccf393f92fcfb28fdaa Author: paolodelia99 Date: Mon, 16 Jun 2025 19:07:18 +0200 Add crossccyfixfloatswap QuantLib.vcxproj | 2 + QuantLib.vcxproj.filters | 6 + ql/CMakeLists.txt | 2 + ql/instruments/Makefile.am | 2 + ql/instruments/crossccyfixfloatswap.cpp | 159 +++++++++++++++++ ql/instruments/crossccyfixfloatswap.hpp | 151 ++++++++++++++++ test-suite/CMakeLists.txt | 1 + test-suite/Makefile.am | 1 + test-suite/crossccyfixfloatswap.cpp | 300 ++++++++++++++++++++++++++++++++ test-suite/testsuite.vcxproj | 1 + test-suite/testsuite.vcxproj.filters | 3 + 11 files changed, 628 insertions(+) commit 2d8185cad835f601847b960ce76f153ba90ee88f Author: paolodelia99 Date: Mon, 16 Jun 2025 18:55:50 +0200 Refactor xccy tests file test-suite/crossccyswap.cpp | 122 +++++++++++++++++++++----------------------- 1 file changed, 59 insertions(+), 63 deletions(-) commit 5884906557a37af881a8a650c1b87a7e5772b4b1 Author: Paolo D'Elia Date: Mon, 16 Jun 2025 14:37:24 +0200 Fix tag typo in QuantLib.vcxproj QuantLib.vcxproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a88020166ec75e5f65d514364cc9ed42059517ce Author: Paolo D'Elia Date: Mon, 16 Jun 2025 14:00:06 +0200 Added missing imports in crossccyswapengine.hpp ql/pricingengines/swap/crossccyswapengine.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 373255666bd4a156d67940a6432e80988fe38f7b Author: paolodelia99 Date: Sat, 14 Jun 2025 12:17:42 +0200 Update CrossCcySwap tests to account for usingAtParCoupons setting test-suite/crossccyswap.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 48e48aacf212c780c9cca7d96924584af2a24599 Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 13 Jun 2025 14:17:31 +0000 Update generated headers ql/instruments/all.hpp | 1 + ql/pricingengines/swap/all.hpp | 1 + 2 files changed, 2 insertions(+) commit af4d04446a3313501132ad696639b57bb71a7fc3 Author: paolodelia99 Date: Fri, 13 Jun 2025 16:15:16 +0200 Added base CrossCcySwap, CrossCcySwapEngine and related tests QuantLib.vcxproj | 4 + QuantLib.vcxproj.filters | 12 + ql/CMakeLists.txt | 4 + ql/instruments/Makefile.am | 2 + ql/instruments/crossccyswap.cpp | 107 ++++ ql/instruments/crossccyswap.hpp | 147 ++++++ ql/pricingengines/swap/Makefile.am | 2 + ql/pricingengines/swap/crossccyswapengine.cpp | 165 ++++++ ql/pricingengines/swap/crossccyswapengine.hpp | 107 ++++ test-suite/CMakeLists.txt | 1 + test-suite/Makefile.am | 1 + test-suite/crossccyswap.cpp | 698 ++++++++++++++++++++++++++ test-suite/testsuite.vcxproj | 1 + test-suite/testsuite.vcxproj.filters | 3 + 14 files changed, 1254 insertions(+) QuantLib-1.43/Contributors.txt000066400000000000000000000133451522512136400164250ustar00rootroot00000000000000We gratefully acknowledge contributions from (in alphabetical order): Nathan Abbott, Samad Abdessadki, Kakhkhor Abdijalilov, Xavier Abulker, Toyin Akin, Marius Akre, Colin Alberts, Mario Aleppo, Richard Amaya, 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, Sébastien Bouvard, 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, Benjamin Croud, Paolo D'Elia, Stephen Dacek, Lawson Darrow, Jon Davidson, William Day, Daniele De Francesco, Frédéric Degraeve, Piero Del Boca, Mike DelMedico, Chirag Desai, Barry Devlin, Nicolas Di Césaré, Lucas Dias, Piter Dias, Binrui Dong, Jacques du Toit, François du Vignaud, Francis Duffy, Disha Dugad, 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, Shubham Gaur, 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, Brett Graves, 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, Yassine Idyiahia, Alexey Indiryakov, Norbert Irmer, Mike Jake, Nicola Jean, Joseph Jeisman, Jewon Jeon, 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, David Korczynski, 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, Zain Mughal, 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, Aaditya Panikath, Sotirios Papathanasopoulos, Krishn Parasar, Mike Parker, Guillermo F. Parra, Pratyush Patel, Giorgio Pazmandi, Guillaume Pealat, Gilbert Peffer, Andrea Pellegatta, Ignacio Peña, Walter Penschke, Francesco Perissin, Robert Philipp, Marcello Pietrobon, Adrien Pinatton, Gianni Piolanti, Arsen Podoba, 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, Prathmesh Sananse, 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, Hetal Sharma, 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, Krishnan Vignesh, 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.43/Docs/000077500000000000000000000000001522512136400140515ustar00rootroot00000000000000QuantLib-1.43/Docs/Makefile.am000066400000000000000000000020631522512136400161060ustar00rootroot00000000000000 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.43/Docs/images/000077500000000000000000000000001522512136400153165ustar00rootroot00000000000000QuantLib-1.43/Docs/images/QL-title.jpg000066400000000000000000000277711522512136400174710ustar00rootroot00000000000000JFIFHH 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.43/Docs/images/favicon.ico000066400000000000000000000020661522512136400174430ustar00rootroot00000000000000BM66(   FFFTTTLLL qqq)))fff!!!;;;~~~111444(((mmmBBB AAAwwwQuantLib-1.43/Docs/pages/000077500000000000000000000000001522512136400151505ustar00rootroot00000000000000QuantLib-1.43/Docs/pages/authors.docs000066400000000000000000000015131522512136400175070ustar00rootroot00000000000000 /* 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.43/Docs/pages/config.docs000066400000000000000000000136131522512136400172730ustar00rootroot00000000000000 /* 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; however, be aware that Boost 1.91 introduced changes in boost::optional that silently changed the behavior of our code and would cause it to work incorrectly. \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 will cause a segmentation fault if you access a null pointer. \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.43/Docs/pages/coreclasses.docs000066400000000000000000000015621522512136400203340ustar00rootroot00000000000000 /* 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.43/Docs/pages/currencies.docs000066400000000000000000000014241522512136400201650ustar00rootroot00000000000000 /* 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.43/Docs/pages/datetime.docs000066400000000000000000000040641522512136400176220ustar00rootroot00000000000000 /* 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.43/Docs/pages/engines.docs000066400000000000000000000026631522512136400174610ustar00rootroot00000000000000 /* 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.43/Docs/pages/examples.docs000066400000000000000000000123101522512136400176350ustar00rootroot00000000000000 /* 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.43/Docs/pages/findiff.docs000066400000000000000000000017631522512136400174360ustar00rootroot00000000000000 /* 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.43/Docs/pages/fixedincome.docs000066400000000000000000000077221522512136400203240ustar00rootroot00000000000000 /* 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.43/Docs/pages/history.docs000066400000000000000000000015601522512136400175250ustar00rootroot00000000000000/* 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.43/Docs/pages/index.docs000066400000000000000000000032531522512136400171340ustar00rootroot00000000000000 /* 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.43/Docs/pages/instruments.docs000066400000000000000000000014231522512136400204150ustar00rootroot00000000000000 /* 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.43/Docs/pages/lattices.docs000066400000000000000000000106521522512136400176360ustar00rootroot00000000000000 /* 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.43/Docs/pages/license.docs000066400000000000000000000020471522512136400174470ustar00rootroot00000000000000 /*! \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.43/Docs/pages/math.docs000066400000000000000000000034471522512136400167630ustar00rootroot00000000000000 /* 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.43/Docs/pages/mcarlo.docs000066400000000000000000000016321522512136400173010ustar00rootroot00000000000000 /* 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.43/Docs/pages/patterns.docs000066400000000000000000000014121522512136400176600ustar00rootroot00000000000000 /* 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.43/Docs/pages/processes.docs000066400000000000000000000020041522512136400200240ustar00rootroot00000000000000 /* 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.43/Docs/pages/resources.docs000066400000000000000000000027301522512136400200360ustar00rootroot00000000000000 /* 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.43/Docs/pages/termstructures.docs000066400000000000000000000026611522512136400211420ustar00rootroot00000000000000 /* 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.43/Docs/quantlib.doxy000066400000000000000000000317311522512136400166020ustar00rootroot00000000000000# 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.43/Docs/quantlibextra.css000066400000000000000000000014711522512136400174510ustar00rootroot00000000000000#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.43/Docs/quantlibfooter.html000066400000000000000000000011261522512136400177750ustar00rootroot00000000000000 QuantLib-1.43/Docs/quantlibheader.html000066400000000000000000000040641522512136400177330ustar00rootroot00000000000000 $projectname: $title $title $treeview $search $mathjax $extrastylesheet
QuantLib: a free/open-source library for quantitative finance
Reference manual - version $projectnumber
$projectbrief
$searchbox
QuantLib-1.43/Examples/000077500000000000000000000000001522512136400147375ustar00rootroot00000000000000QuantLib-1.43/Examples/AsianOption/000077500000000000000000000000001522512136400171635ustar00rootroot00000000000000QuantLib-1.43/Examples/AsianOption/AsianOption.cpp000066400000000000000000000330631522512136400221200ustar00rootroot00000000000000/* -*- 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.43/Examples/AsianOption/AsianOption.vcxproj000066400000000000000000001055641522512136400230370ustar00rootroot00000000000000 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.43/Examples/AsianOption/AsianOption.vcxproj.filters000066400000000000000000000016131522512136400244740ustar00rootroot00000000000000 {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.43/Examples/AsianOption/CMakeLists.txt000066400000000000000000000003411522512136400217210ustar00rootroot00000000000000add_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.43/Examples/BasketLosses/000077500000000000000000000000001522512136400173415ustar00rootroot00000000000000QuantLib-1.43/Examples/BasketLosses/BasketLosses.cpp000066400000000000000000000265711522512136400224620ustar00rootroot00000000000000/* -*- 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 5-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 5-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 5-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 5-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 5-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 5-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 5-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 5-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 5-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.43/Examples/BasketLosses/BasketLosses.vcxproj000066400000000000000000001053701522512136400233660ustar00rootroot00000000000000 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.43/Examples/BasketLosses/BasketLosses.vcxproj.filters000066400000000000000000000016131522512136400250300ustar00rootroot00000000000000 {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.43/Examples/BasketLosses/CMakeLists.txt000066400000000000000000000003451522512136400221030ustar00rootroot00000000000000add_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.43/Examples/BermudanSwaption/000077500000000000000000000000001522512136400202215ustar00rootroot00000000000000QuantLib-1.43/Examples/BermudanSwaption/BermudanSwaption.cpp000066400000000000000000000372561522512136400242240ustar00rootroot00000000000000/* -*- 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