The QuantLib C++ library
QuantLib 1.34 includes 35 pull requests from several contributors.
Some of the most notable changes are included below. A detailed list of changes is available in ChangeLog.txt and at https://github.com/lballabio/QuantLib/milestone/32?closed=1.
boost::tuple
, boost::function
and boost::bind
instead of their std
counterparts; the std
classes are already the default since release 1.32.Calendar::advance
from returning the business end of month (instead of the calendar end) when endOfMonth
is true
and convention
is Unadjusted
; thanks to GitHub user @DeimosXing.LinearTsrPricer
; thanks to Peter Caspers (@pcaspers).BlackSwaptionEngine
manages OIS explicitly; other engines might work and return approximated values.MakeOIS
and MakeVanillaSwap
; thanks to Eugene Toder (@eltoder).BondFunctions
class now support either clean or dirty prices; thanks to Francois Botha (@igitur).basisPointValue
and yieldValueBasisPoint
methods in BondFunctions
didn't always manage the settlement date correctly; this is now fixed (thanks to GitHub user @jez6).Custom
to Futures::Type
enumeration to allow passing custom dates to futures; thanks to Eugene Toder (@eltoder).FuturesRateHelper
; thanks to GitHub user @PaulXiCao.argument_type
, first_argument_type
, second_argument_type
and result_type
typedefs in several classes;interpolated
argument;interpolated
method and the protected interpolated_
data member in InflationIndex
;CashFlows::npvbps
taking the result by reference;rateCurve_
method in InflationCouponPricer
;ThreadKey
typedef;ql/experimental/credit/riskybond.hpp
.InflationTermStructure
, ZeroInflationTermStructure
, YoYInflationTermStructure
, InterpolatedZeroInflationCurve
, InterpolatedYoYInflationCurve
, PiecewiseZeroInflationCurve
and PiecewiseYoYInflationCurve
taking an observation lag; use the overloads taking an explicit base date instead.Bond::yield
, BondFunctions::atmRate
, BondFunctions::yield
and BondFunctions::zSpread
overloads taking a clean price as a number; use the overloads taking a Bond::Price
instead.InflationTermStructure::setSeasonality
overload taking no arguments; use the overload taking a pointer and pass an empty one to remove seasonality.InflationTermStructure::setBaseRate
method; set baseRate_
directly if needed.Swaption::underlyingSwap
and SwaptionHelper::underlyingSwap
methods; use underlying
instead.FixedRateBondHelper::fixedRateBond
and CPIBondHelper::cpiBond
methods and the corresponding fixedRateBond_
and cpiBond_
data members.Thanks go also to Isuru Fernando (@isuruf), Viktor Zhou (@yyuuhhjjnnmm), Stephen Dacek (@sdacek), Yi Jiang (@yjian012), Jonathan Sweemer (@sweemer), Eugene Toder (@eltoder), the XAD team (@auto-differentiation-dev) and GitHub user @PaulXiCao and @klin333 for miscellaneous fixes, improvements or reports.
Full Changelog: https://github.com/lballabio/QuantLib/compare/v1.33...v1.34
QuantLib 1.33 includes 43 pull requests from several contributors.
Some of the most notable changes are included below. A detailed list of changes is available in ChangeLog.txt and at https://github.com/lballabio/QuantLib/milestone/31?closed=1.
boost::tuple
, boost::function
and boost::bind
instead of their std
counterparts; the std
classes are already the default since release 1.32.MakeOIS
and OISRateHelper
; thanks to Eugene Toder (@eltoder).CallableBond::impliedVolatility
taking an NPV as target.AmortizingFixedRateBond
taking a sinking frequency.AmortizingFixedRateBond
taking a vector of InterestRate
instances.FixedRateBond
taking start date, maturity date etc. instead of a schedule.FixedRateBond
taking a vector of InterestRate
instances.FloatingRateBond
taking start date, maturity date etc. instead of a schedule.CPICapFloor
taking a handle to an interest-rate index.CPICapFloor::inflationIndex
method.infIndex
data member of the CPICapFloor::arguments
class.SabrSmileSection
.ql/experimental/amortizingbonds/amortizingcmsratebond.hpp
, ql/experimental/amortizingbonds/amortizingfixedratebond.hpp
and ql/experimental/amortizingbonds/amortizingfloatingratebond.hpp
.Currency
and Currency::Data
taking a format string, and the Currency::format
method.Thanks go also to Yi Jiang (@yjian012), Hoang Giap Vu (@hgv79116), Jonathan Sweemer (@sweemer) and the XAD team (@auto-differentiation-dev) for smaller fixes and improvements.
Full Changelog: https://github.com/lballabio/QuantLib/compare/v1.32...v1.33
QuantLib 1.32 includes 34 pull requests from several contributors.
Some of the most notable changes are included below. A detailed list of changes is available in ChangeLog.txt and at https://github.com/lballabio/QuantLib/milestone/29?closed=1.
evaluationDate_
data member of the SwaptionVolatilityDiscrete
class was renamed to cachedReferenceDate_
.boost::tuple
, boost::function
and boost::bind
instead of their std
counterparts; starting from this release, the std
classes are already the default.FixedVsFloatingSwap
for vanilla swap and overnight-indexed swaps; this will be used in the future to help a few existing swap engines support OIS (@lballabio).redemptions
argument to amortizing bond constructors. This allows them to be used for pools of loans where a certain proportion of the underlying loans are subject to defaults and losses. Thanks to Gyan Sinha (@gyansinha).QL_NULL_INTEGER
, QL_NULL_REAL
, QL_NOEXCEPT
, QL_CONSTEXPR
and QL_USE_STD_UNIQUE_PTR
macros.MultiCurveSensitivities
class.constant
, identity
, square
, cube
, fourth_power
, add
, subtract
, subtract_from
, multiply_by
, divide
, divide_by
, less_than
, greater_than
, greater_or_equal_to
, not_zero
, not_null
, everywhere
, nowhere
, equal_within
, clipped_function
, clip
, composed_function
, compose
, binary_compose3_function
and compose3
functors.PdeShortRate
, ShoutCondition
, FDShoutCondition
, FDStepConditionEngine
and FDEngineAdapter
classes from the old finite-differences framework.dsd::inner_product
function.FDDividendEngineBase
, FDDividendEngineMerton73
, FDDividendEngineShiftScale
and FDDividendEngine
pricing engines.ql/auto_ptr.hpp
, ql/math/initializers.hpp
, ql/methods/finitedifferences/americancondition.hpp
, ql/methods/finitedifferences/onefactoroperator.hpp
, ql/pricingengines/vanilla/fddividendshoutengine.hpp
, ql/pricingengines/vanilla/fdshoutengine.hpp
and ql/utilities/disposable.hpp
.withReplication
method in the DigitalIborLeg
, DigitalCmsLeg
and DigitalCmsSpreadLeg
classes that takes no arguments; use the other overload instead.StandardFiniteDifferenceModel
, StandardSystemFiniteDifferenceModel
and StandardStepCondition
typedefs; define your own typedefs if needed.FDVanillaEngine
, FDMultiPeriodEngine
, StepConditionSet
, ParallelEvolverTraits
, ParallelEvolver
and SampledCurve
classes and the BSMTermOperator
and SampledCurveSet
typedefs; use the new finite-differences framework instead.QL_NULL_FUNCTION
macro; to check if a function is empty, use it in a bool context instead.ql/experimental/exoticoptions/margrabeoption.hpp
, ql/experimental/exoticoptions/analyticcomplexchooserengine.hpp
, ql/experimental/exoticoptions/analyticeuropeanmargrabeengine.hpp
, ql/experimental/exoticoptions/analyticcompoundoptionengine.hpp
, ql/experimental/exoticoptions/simplechooseroption.hpp
, ql/experimental/exoticoptions/compoundoption.hpp
, ql/experimental/exoticoptions/analyticamericanmargrabeengine.hpp
, ql/experimental/exoticoptions/analyticsimplechooserengine.hpp
, ql/experimental/exoticoptions/complexchooseroption.hpp
, ql/experimental/termstructures/multicurvesensitivities.hpp
, ql/methods/finitedifferences/shoutcondition.hpp
, ql/methods/finitedifferences/pdeshortrate.hpp
, ql/pricingengines/vanilla/fddividendengine.hpp
, ql/pricingengines/vanilla/fdstepconditionengine.hpp
, ql/pricingengines/vanilla/fdconditions.hpp
and ql/models/marketmodels/duffsdeviceinnerproduct.hpp
.Thanks go also to Jonathan Sweemer (@sweemer), Ralf Konrad (@ralfkonrad), Klaus Spanderen (@klausspanderen), Peter Caspers (@pcaspers), Tom Anderson (@tomwhoiscontrary), Fredrik Gerdin Börjesson (@gbfredrik), Guillaume Horel (@thrasibule) and the XAD team (@auto-differentiation-dev) for a number of smaller fixes and improvements.
Full Changelog: https://github.com/lballabio/QuantLib/compare/v1.31.1...v1.32
QuantLib 1.31.1 is a bug-fix release for QuantLib 1.31.
It fixes a regression that could cause a segmentation fault when bootstrapping an interest-rate curve using OIS rates.
Details are available at https://github.com/lballabio/QuantLib/milestone/30?closed=1.
Full Changelog: https://github.com/lballabio/QuantLib/compare/v1.31...v1.31.1
QuantLib 1.31 includes a record 68 pull requests from several contributors.
Some of the most notable changes are included below. A detailed list of changes is available in ChangeLog.txt and at https://github.com/lballabio/QuantLib/milestone/28?closed=1.
std::tuple
, std::function
and std::bind
(instead of their boost
counterparts) will become the default. If you're using ext::tuple
etc. in your code (which is suggested), this should be a transparent change. If not, you'll still be able to choose the boost
versions via a configure switch for a while; but we do suggest you start using ext::tuple
etc. in the meantime.quantlib-config
script that can be used to retrieve flags for compiling QuantLib-dependent projects; thanks to Christian Köhnenkamp (@kohnech).LazyObject
class forwards only one notification after recalculating and silently ignores the others. In some edge cases, this could lead to objects not being updated. It's now possible to enable a different behavior where all notifications are forwarded; the new behavior can be chosen at compile time via the configure option --disable-faster-lazy-objects
(or disabling QL_FASTER_LAZY_OBJECTS
in cmake or userconfig.hpp
) or at run time by calling LazyObject::Defaults::instance().alwaysForwardNotifications()
. This might cause a slow down, so you're invited to try it out and report on the mailing list. If there are no problems, the new behavior might become the default in future releases. Also, a new configure option --enable-throwing-in-cycles
(QL_THROW_IN_CYCLES
in cmake or userconfig.hpp
) is optionally available; when both this option and the new behavior are enabled, notifications cycles involving a lazy object will throw an exception. It is suggested to try enabling the option and removing such loops, if any. Thanks to Peter Caspers (@pcaspers) for the change and to Ralf Konrad (@ralfkonrad), Jonathan Sweemer (@sweemer) and GitHub user @djkrystul for feedback.--run_test=<filter>
option down to the underlying Boost.Test implementation. Thanks to Eugene Toder (@eltoder).Removed features deprecated in version 1.26:
CPICoupon
constructor taking a number of fixing days and its indexObservation
, adjustedFixing
and indexFixing(date)
methods.CPICashFlow
constructor taking a fixing date.withFixingDays
methods of CPILeg
.ZeroInflationCashFlow
constructor taking a calendar and business-day convention.LsmBasisSystem::PolynomType
typedef and the MakeMCAmericanEngine::withPolynomOrder
method.Observer::set_type
and Observable::set_type
typedefs.Curve
class.LexicographicalView
class.Composite
class.DriftTermStructure
class.Deprecated the various time_iterator
and value_iterator
types in TimeSeries
, as well as methods returning them. The more general const_iterator
and const_reverse_iterator
types can be used instead.
Deprecated the constructors of CPICoupon
taking a spread, as well as its spread
method, its protected spread_
data member, and the withSpreads
methods of CPILeg
.
Deprecated the adjustedFixing
method and the protected spread_
data member of CPICouponPricer
.
Renamed BlackVanillaOptionPricer
to MarketQuotedOptionPricer
and deprecated the old name.
Deprecated a couple of constructors of ForwardRateAgreement
.
Deprecated the constructor of YoYInflationIndex
taking a ratio
. Also, deprecated explicit classes for YoY ratio indexes YYGenericCPIr
, YYAUCPIr
, YYEUHICPr
, YYFRHICPr
, YYUKRPIr
, YYUSCPIr
and YYZACPIr
.
Deprecated the base
, increment
, decrement
, advance
and distance_to
methods of the step_iterator
class.
Thanks go also to Jonathan Sweemer (@sweemer), Jose Garcia (@j053g), Jake Heke (@jakeheke75), Eugene Toder (@eltoder), Binrui Dong (@BrettDong), the Xcelerit Dev Team (@xcelerit-dev), Ralf Konrad (@ralfkonrad), Fredrik Gerdin Börjesson (@gbfredrik) and Tom Anderson (@tomwhoiscontrary) for a number of smaller fixes and improvements.
Full Changelog: https://github.com/lballabio/QuantLib/compare/QuantLib-v1.30...v1.31
QuantLib 1.30 includes 34 pull requests from several contributors.
Some of the most notable changes are included below. A detailed list of changes is available in ChangeLog.txt and at https://github.com/lballabio/QuantLib/milestone/27?closed=1.
std::tuple
, std::function
and std::bind
(instead of their boost
counterparts) will become the default. If you're using ext::tuple
etc. in your code (which is suggested), this should be a transparent change. If not, you'll still be able to choose the boost
versions via a configure switch for a while; but we do suggest you start using ext::tuple
etc. in the meantime.std::any
and std::optional
(and the related std::any_cast
and std::nullopt
) instead of their boost
counterparts by setting new compilation switches; thanks to Jonathan Sweemer (@sweemer). Using the std
classes requires C++17. We expect the boost
classes to remain the default for a while, but in the meantime we encourage to start using ext::any
and ext::optional
in preparation for a new default.VanillaOption
and BarrierOption
classes can now be used to model vanilla and barrier options with discrete dividends; the future dividends (not being part of the terms and conditions of the contract) should be passed to the pricing engine instead (@lballabio).SwaptionVolCube1
, SwaptionVolCube1x
, SwaptionVolCube1a
and SwaptionVolCube2
to SabrSwaptionVolatilityCube
, XabrSwaptionVolatilityCube
, NoArbSabrSwaptionVolatilityCube
and InterpolatedSwaptionVolatilityCube
, respectively; thanks to Ignacio Anguita (@IgnacioAnguita). The old names are deprecated but still available for a few releases.spreadLegValue_
data member of BlackIborCouponPricer
;WulinYongDoubleBarrierEngine
alias for SuoWangDoubleBarrierEngine
;settlementDate
, incomeDiscountCurve
, spotIncome
, spotValue
, impliedYield
and forwardValue
methods of ForwardRateAgreement
, as well as its protected underlyingIncome_
, underlyingSpotValue_
, settlementDays_
, payoff_
and incomeDiscountCurve_
data members;InflationTermStructure
, ZeroInflationTermStructure
, InterpolatedZeroInflationCurve
, PiecewiseZeroInflationCurve
taking an indexIsInterpolated
parameter;indexIsInterpolated
method of InflationTermStructure
and its protected indexIsInterpolated_
data member;SofrFutureRateHelper
.DividendVanillaOption
and DividendBarrierOption
classes; use VanillaOption
and BarrierOption
instead (see above).AnalyticDividendEuropeanEngine
that takes no dividend information; use the other overload instead.SwaptionVolCube1
, SwaptionVolCube1x
, SwaptionVolCube1a
and SwaptionVolCube2
(see above).setCommon
method of CappedFlooredYoYInflationCoupon
.Thanks go also to Jonathan Sweemer (@sweemer), the Xcelerit Dev Team (@xcelerit-dev), Fredrik Gerdin Börjesson (@gbfredrik), Klaus Spanderen (@klausspanderen) and Peter Caspers (@pcaspers) for a number of smaller fixes and improvements, and to Matthias Groncki (@mgroncki) and @lukey8767 for raising issues.
Full Changelog: https://github.com/lballabio/QuantLib/compare/QuantLib-v1.29...QuantLib-v1.30
QuantLib 1.29 includes 42 pull requests from several contributors.
Some of the most notable changes are included below. A detailed list of changes is available in ChangeLog.txt and at https://github.com/lballabio/QuantLib/milestone/26?closed=1.
sessionId
function, and therefore the latter is no longer needed. Instead, the code now uses the built-in language support for thread-local variables. Thanks go to Peter Caspers (@pcaspers).std::tuple
, std::function
and std::bind
(instead of their boost
counterparts) will become the default. If you're using ext::tuple
etc. in your code (which is suggested), this should be a transparent change. If not, you'll still be able to choose the boost
versions via a configure switch for a while; but we do suggest you start using ext::tuple
etc. in the meantime.boost::thread
with std::thread
; thanks to Jonathan Sweemer (@sweemer). This removed our last dependency on Boost binaries and makes it possible to compile QuantLib using a header-only Boost installation.-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDLL
on the command line; thanks to Jonathan Sweemer (@sweemer). The static runtime remains the default.icpx
compiler using cmake; thanks to Jonathan Sweemer (@sweemer). Note that in order to get all the unit tests passing, -fp-model=precise
must be added to CMAKE_CXX_FLAGS
.withIndexedCoupons
and withAtParCoupons
methods to MakeSwaption
for easier initialization; thanks to Ralf Konrad (@ralfkonrad).ConstantCPIVolatility
constructor can now take a handle to a volatility quote, instead of just an immutable number (@lballabio).createAtParCoupons
, createIndexedCoupons
and usingAtParCoupons
methods of IborCoupon
;RiskyBond
class and its subclasses RiskyFixedBond
and RiskyFloatingBond
;CrossCurrencyBasisSwapRateHelper
typedef;termStructure_
data member of BlackCalibrationHelper
;baseCurrency
and conversionType
data members of Money
;nominalTermStructure
method and the nominalTermStructure_
data member of InflationTermStructure
;UnitedStates
calendar not taking an explicit market.argument_type
, first_argument_type
, second_argument_type
and result_type
typedefs in a number of classes; use auto
or decltype
instead.InflationIndex
, ZeroInflationIndex
, FRHICP
, ZACPI
, UKRPI
, EUHICP
, EUHICPXT
, USCPI
, AUCPI
and GenericCPI
taking an interpolated
parameter; use another constructor.interpolated
method and the interpolated_
data member of InflationIndex
.ThreadKey
typedef. It was used in the signature of sessionId
, which is no longer needed after the changes in the Singleton
implementation.rateCurve_
data member of the InflationCouponPricer
base class. If you need it, provide it in your derived class.npvbps
function taking NPV and BPS as references. Use the overload returning a pair of Real
s.Thanks go also to Matthias Groncki (@mgroncki), Jonathan Sweemer (@sweemer) and Nijaz Kovacevic (@NijazK) for a number of smaller fixes and improvements, to the Xcelerit Dev Team (@xcelerit-dev) for improvements to the automated CI builds, and to Vincenzo Ferrazzanno (@vincferr), @alienbrett, @xuruilong100 and @philippb90 for raising issues.
Full Changelog: https://github.com/lballabio/QuantLib/compare/QuantLib-v1.28...QuantLib-v1.29
Please report any problems to the QuantLib mailing list.
QuantLib-1.29-rc.tar.gz QuantLib-1.29-rc.zip QuantLib-SWIG-1.29-rc.tar.gz QuantLib-SWIG-1.29-rc.zip
QuantLib 1.28 includes 33 pull requests from several contributors.
Some of the most notable changes are included below. A detailed list of changes is available in ChangeLog.txt and at https://github.com/lballabio/QuantLib/milestone/24?closed=1.
sessionId
function. Future releases will use the built-in language support for thread-local variables.std::tuple
, std::function
and std::bind
(instead of their boost
counterparts) will become the default. If you're using ext::tuple
etc. in your code (which is suggested), this should be a transparent change. If not, you'll still be able to choose the boost
versions via a configure switch for a while.COSHestonEngine
in the case of an option with short time to expiration and deep ITM or deep OTM strike prices; thanks to Ignacio Anguita (@IgnacioAnguita).OISRateHelper
now allows to specify the endOfMonth
parameter; thanks to Guillaume Horel (@thrasibule).LocalVolRNDCalculator
; thanks to @mdotlic.The ql/experimental
folder contains code whose interface is not fully stable, but is released in order to get user feedback. Experimental classes make no guarantees of backward compatibility; their interfaces might change in future releases.
CPICapFloorTermPriceSurface
class now also takes an explicit interpolation type.CallableBond
changes its arguments. If you inherited from this class, you'll need to update your code. If you're using the existing derived bond classes, the change will be transparent.impliedVolatility
method for callable bonds was taking a target NPV, not a price. This implementation is now deprecated, and a new overload was added taking a price in base 100.ZeroCouponInflationSwap
and ZeroCouponInflationSwapHelper
missing an explicit CPI interpolation type;ActualActual
and Thirty360
missing an explicit choice of convention, and the constructor of Thirty360
passing an isLastPeriod
boolean flag.FixedRateBond
taking an InterestRate
instance or not taking a Schedule
instance.FloatingRateBond
not taking a Schedule
instance.AmortizingFixedRateBond
taking a sinking frequency or a vector of InterestRate
instances.CPICapFloor
taking a Handle
to an inflation index, and its inflationIndex
method returning a Handle
. New versions of both were added using shared_ptr
instead.SabrSmileSection
; a new version was added also taking an optional reference date.impliedVolatility
method for callable bonds; see above.Thanks go also to Konstantin Novitsky (@novitk), Peter Caspers (@pcaspers), Klaus Spanderen (@klausspanderen), Fredrik Gerdin Börjesson (@gbfredrik) and Dirk Eddelbuettel (@eddelbuettel) for a number of smaller fixes, and to Jonathan Sweemer (@sweemer) for various improvements to the automated CI builds.
Full Changelog: https://github.com/lballabio/QuantLib/compare/QuantLib-v1.27.1...QuantLib-v1.28
QuantLib 1.27.1 is a bug-fix release.
It restores the old implementation of Null<T>
which was replaced
in version 1.27 with a new one; the latter was reported to cause
an internal compiler error under Visual C++ 2022 for some client code.
The new version (which avoids some problems when replacing Real
with some AAD-enabled types) is still available; depending on how
you compile QuantLib, it can be enabled through the
--enable-null-as-functions
configure flag, the cmake variable
QL_NULL_AS_FUNCTIONS
, or the define with the same name in the
ql/userconfig.hpp
header (@lballabio).
Full Changelog: https://github.com/lballabio/QuantLib/compare/QuantLib-v1.27...QuantLib-v1.27.1