Quantlib User Manual
Quantlib User Manual
18 Nov 2003
Contents
I User Manual 1
1 An introduction to QuantLib 3
1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2 Project overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.3 Where to get QuantLib . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.4 Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.5 Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.6 Supported platforms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.7 Version history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.8 Todo List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
1.9 Additional resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
1.10 The QuantLib Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
1.11 Copyright and License . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
2 QuantLib components 27
2.1 Core classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
2.2 Date and time calculations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
2.3 Lattice methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
2.4 The finite differences framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
2.5 The Monte Carlo framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
2.6 The short-rate modelling framework . . . . . . . . . . . . . . . . . . . . . . . . . 42
2.7 Currencies and FX rates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
2.8 Instruments and pricers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
2.9 Math tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
2.10 Design patterns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
2.11 Term structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
2.12 Utilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
3 Examples 53
ii CONTENTS
II Reference Manual 55
User Manual
Chapter 1
An introduction to QuantLib
1.1 Introduction
QuantLib (http://quantlib.org/) is a C++ library for financial quantitative analysts and devel-
opers.
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 QuantLib Copyright and License(p. 24).
QuantLib and its documentation are distributed in the hope that they will be useful, but WITH-
OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the Copyright and License(p. 24) for more details.
1.1.1 Disclaimer
At this time, this documentation is widely incomplete and must be regarded as a work in progress.
Eventually, all QuantLib classes will be documented. However, no date is currently set for this
goal. Join the mailing lists (http://quantlib.org/mailinglists.html) for the latest updates.
4 An introduction to QuantLib
Interfaces
• financial instrument—done;
• deal—to do;
Generic Tools
• date/time module—done;
• one-dimensional solver—done;
Financial Tools
• Swaptions—in progress;
• Caps/floors—in progress;
Source code, documentation, modules, etc. of current and previous QuantLib releases can be
downloaded from http://quantlib.org/download.html
Debian package is available from http://ftp.us.debian.org/debian/pool/main/q/quantlib
(the .us can be replaced by .jp, .uk, .de, .it, etc.)
1.4 Installation
1.4.1 Linux/Unix
4. Type ‘make install’ to install the programs and any data files and documentation.
5. You can remove the program binaries and object files from the source code directory by
typing ‘make clean’. To also remove the files that ‘configure’ created (so you can compile
the package for a different kind of computer), type ‘make distclean’. There is also a ‘make
maintainer-clean’ target, but that is intended mainly for the package’s developers. If you
use it, you will need some GNU tools that usually only developers use, and which are not
required to build QuantLib from tarballs. These are automake, autoconf, libtool, GNU m4,
GNU make, and maybe others. They all come with recent GNU/Linux distributions. To
begin the build process after ‘make distclean’ start with ‘sh ./bootstrap’ which will prepare
the package for compilation. You can then use ‘configure’ and ‘make’ in the usual way.
The file INSTALL.txt in the QuantLib source distribution contains more detailed instructions.
1.4.2 Win32
1.4.3 Macintosh
Codewarrior support is currently broken. QuantLib should compile under Mac OS X as outlined
under Linux/Unix(p. ??).
1.5 Usage
To use QuantLib classes in your own code just add
#include <ql/quantlib.hpp>
A few suggestions for Visual C++ users wanting to use QuantLib into their own application:
1. As long as you include ql/quantlib.hpp, you won’t have to explicitly link your application
to QuantLib(p. 107) library. This is automatically done by quantlib.hpp using the pragma
statement:
#ifdef _DLL
#ifdef _DEBUG
#pragma comment(lib,"QuantLib_MTDLL_d.lib")
#else
#pragma comment(lib,"QuantLib_MTDLL.lib")
#endif
#else
#ifdef _DEBUG
#pragma comment(lib,"QuantLib_d.lib")
#else
#pragma comment(lib,"QuantLib.lib")
#endif
#endif
2. Your main() must be compiled with the same options that were used in compiling the
QuantLib library - namely, you’ll have to set the run-time library to "(Debug) Multithreaded
(DLL)". For single-threaded version of QuantLib(p. 107) one must change the settings under
project settings, "C/C++" tab, "Code Generation", and then re-build the library with the new
settings. You’ll have to check the "Use RTTI" option under the "C++ Language" category,
too. Finally, you have to define NOMINMAX
3. To create your own project, add it to a new or existing Workspace. Under File | New | Projects
select "Win32 Console Application" (or equivalent). Under Project | Settings select your
project. Select settings for: "All configuration". On the "C/C++" tab select "Preprocessor"
and under "Additional include directory" add "\$(QL_DIR)". This will add your current
QuantLib installation directory to the include path. On the "Link" tab select "Input" and
under "Additional library path" add "\$(QL_DIR)\lib\Win32\VisualStudio\". This will add
your current QuantLib installation directory to the library path.
4. To compile in "Win32 Debug" configuration you will need the QuantLib debug libraries,
available for download from http://quantlib.org/download.html
arm-Debian
hppa-Debian
ia64-Debian
m68k-Debian
mips-Debian
mipsel-Debian
powerpc-Debian
s390-Debian
sparc-Debian
For all these platforms Debian packages are available. If you compiled (or failed to com-
pile) QuantLib on different configurations and/or compilers please report your feedback to:
[email protected]
• Path pricer for Binary options. It should cover both European and American style options.
Also known as: Digital, Binary, Cash-At-Hit, Cash-At-Expiry.
• More options moved to the new pricing engine framework: binary, barrier
FIXED INCOME
VOLATILITY FRAMEWORK
OPTIMIZATION FRAMEWORK
PATTERNS
MATH
• Interpolation traits
TEST SUITE
• Added tests for Barrier options in PricingEngine Framework. Some Monte Carlo tests, but
not comprehensive.
MISCELLANEA
• Null calendar and simple day counter for reproducing theoretical calculations
• New path generator based on DiffusionProcess, TimeGrid, and externally initialized random
number generator.
• Added sequence generators: random sequence generator creates a sequence generator out
of a random number generator. InvCumGaussianRsg creates a gaussian sequence generator
out of a uniform (random or low discrepancy) sequence generator.
• Old class Grid no longer exists, use CenteredGrid to obtain the same result.
LATTICE FRAMEWORK
• Partially implemented.
FIXED INCOME
• Added swap constructor using specified maturity date as well as added functionality in
Scheduler.
• Added date-bucketed basis point sensitivity based on 1st derivative of zero coupon rate.
OPTIMIZATION FRAMEWORK
PATTERNS
MATH
• Added BicubicSplineInterpolation.
• Numerical Recipes algorithm is back since there is a problem with Nicolas’ code: it is unable
to fit a straight line, it waves around the line.
• Added SequenceStatistics.
• Added DiscrepancyStatistic that inherits from SequenceStatistic and extends it with the
calculation of L2-discrepancy.
• HStatistics.
RISK MEASURES
MISCELLANEA
• Dataformatters extended to format long integers, Ordinal numerals, power of two format-
ting.
VOLATILITY FRAMEWORK
• interface revisited
• added discrete time forward methods
• added DiscountCurve (loglinear interpolated) and CompoundForward term structures
• ForwardSpreadedTermStructure moved under QuantLib::TermStructures(p. 148) names-
pace
FIXED INCOME
• Modified coupons so that the payment date can be after the end of the accrual period
MISCELLANEA
BUILD PROCESS
LATTICE FRAMEWORK
VOLATILITY FRAMEWORK
FIXED INCOME
OPTIMIZATION FRAMEWORK
PATTERNS
MISCELLANEA
• MonteCarloModel now handles both single factor and multi factors simulations.
• McPricer now handles both single factor and multi factors pricing. New pricing interface
• antithetic variance-reduction technique made possible in Monte Carlo for both single factor
and multi factors
• Control Variate specific class removed: control variation technique is now handled by the
general MC model
PATTERNS
VARIOUS
• dividendYield is now a Spread instead of a Rate (that is: cost of carry is allowed)
• RelinkableHandle initialized with an optional Handle
• Worked around VC++ problems in History constructor
• added QL_VERSION and QL_HEX_VERSION
• generic bug fixes
• removed classes deprecated in 0.2.0
INSTALLATION FACILITIES
DOCUMENTATION
• general re-hauling
• improved and extended Monte Carlo documentation
• improved and extended examples
• Upgraded to Doxygen 1.2.11.1
• Added man pages for installed executables
• added docs in Windows Help format
• added info on "Win32 OnTheEdgeRelease" and "Win32 OnTheEdgeDebug" MS VC++ con-
figurations
• additional information on how to create a MS VC++ project based on QuantLib(p. 107)
• Library:
– source code moved under ql, better GNU standards
– gcc build dir can now be separated from source tree
– gcc 3.0.1 port
– clean compilation (no warnings)
– bootstrap script on cygwin
– Fixed automatic choice of seed for random number generators
– Actual/actual classes
– extended platform support (see table in documentation)
– antithetic variance-reduction technique made possible in Monte Carlo
– added dividend-Rho greek
– First implementation of segment integral (to be redesigned)
– Knuth random generator
– Cash flows, scheduler, and swap (both generic and simple) added
– added ICGaussian random generator
• Library:
– Style guidelines introduced (see http://quantlib.org/style.html) and partially en-
forced
– full support for Microsoft Visual Studio
– full support for Linux/gcc
– momentarily broken support for Metrowerks CodeWarrior
– autoconfiscation (with specialized config.∗.hpp files for platforms without au-
tomake/autoconf support)
– Include files moved under Include/ql folder and referenced as "ql/header.hpp"
– Implemented expression templates techniques for array algebra optimization
– Added custom iterators
– Improved term structure
– Added Asian, Bermudan, Shout, Cliquet, Himalaya, and Barrier options (all with
greeks calculation, control variated where possible)
– Added Helsinki and Wellington calendars
– Improved Normal distribution related functions: cumulative, inverse cumulative, etc.
– Added uniform and Gaussian random number generators
– Added Statistics class (mean, variance, skewness, downside variance, etc.)
– Added RiskMeasures class: VAR, average shortfall, expected shortfall, etc.
– Added RiskStatistics class combining Statistics and RiskMeasures
– Added sample accumulator for multivariate analysis
– Added Monte Carlo tools
– Added matrix-related functions (square root, symmetric Schur decomposition)
– Added interpolation framework (linear and cubic spline interpolation implemented).
• Installation facilities:
– Added Win32 GUI installer for binaries
• Documentation:
– support for Doxygen 1.2.7
– Added man documentation
Class CapFlatVolatilityVector(p. 246) Either add correct copy behavior or inhibit copy. Right
now, a copied instance would end up with its own copy of the length vector but an interpo-
lation pointing to the original ones.
Class ContinuousGeometricAPO(p. 272) add Average Strike version and make it backward
starting
Class SwaptionVolatilityMatrix(p. 629) Either add correct copy behavior or inhibit copy. Right
now, a copied instance would end up with its own copy of the exercise date and length
vector but an interpolation pointing to the original ones.
Class TimeGrid(p. 642) What was the rationale for limiting the grid to positive times? Investi-
gate and see whether we can use it for negative ones as well.
Member FloatingRateCouponVector(p. 122)(const Schedule &schedule, const std::vector< double > &nominals,
A suitable algorithm should be implemented for the calculation of the interpolated index
fixing for a short/long first coupon.
• current news;
• the QuantLib mailing lists (http://quantlib.org/mailinglists.html);
• the QuantLib FAQ (http://quantlib.org/FAQ.html);
• the QuantLib programming style guidelines (http://quantlib.org/style.html);
1.10.1 Authors
1.10.2 Contributors
• Redistributions of source code must retain the above copyright notice, this list of conditions
and the following disclaimer.
• Redistributions in binary form must reproduce the above copyright notice, this list of con-
ditions and the following disclaimer in the documentation and/or other materials provided
with the distribution.
• Neither the names of the copyright holders nor the names of the QuantLib Group and
its contributors may be used to endorse or promote products derived from this software
without specific prior written permission.
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 commer-
cialized.
[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 components
• The Date, Calendar and DayCounter classes are defined (see Date and time calcula-
tions(p. 28)).
• The abstract classes QuantLib::ForwardVolatilitySurface and QuantLib::SwaptionVolatility-
Surface provide the common interface to concrete volatility models. No examples are
available at this time, and the classes themselves will probably need some reworking.
• The abstract class QuantLib::Solver1D(p. 608) provides a common interface for the one-
dimensional solvers implemented in the QuantLib::Solvers1D(p. 147) namespace.
• The abstract class QuantLib::Index(p. 417) provides the common interface of the classes
implemented in the QuantLib::Indexes(p. 127) namespace.
• The abstract class QuantLib::Instrument(p. 422) provides a common interface and a calcu-
lation ramework for the classes implemented in the QuantLib::Instruments(p. 128) names-
pace.
• The abstract class QuantLib::TermStructure(p. 634) provides a common interface for the
classes implemented in the QuantLib::TermStructures(p. 148) namespace.
28 QuantLib components
2.2.1 Dates
The concrete class QuantLib::Date(p. 288) 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;
2.2.2 Calendars
The abstract class QuantLib::Calendar(p. 235) provides the interface for determining whether
a date is a business day or a holiday for a given market, or incrementing/decrementing a
date of a given number of business days. A number of calendars is contained in the Quant-
Lib::Calendars(p. 117) namespace.
The abstract class QuantLib::DayCounter(p. 292) 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 QuantLib::Day-
Counters(p. 124) namespace, namely,
• Actual/360
• Actual/365
• Actual/Actual, which can be calculated according to:
– ISMA and US Treasury convention, also known as "Actual/Actual (Bond)";
– ISDA, also known as "Actual/Actual (Historical)";
– AFB, also known as "Actual/Actual (Euro)";
• 30/360, which can be calculated according to:
– USA convention;
– European convention;
– Italian convention.
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(p. 845) 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.
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 Quant-
Lib::Lattices::TrinomialTree(p. 656) 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 y satisfying
At each node, there is a probability pu , pm andpd to go through respectively the upper, the middle
and the lower branch. These probabilities must satisfy
and
pu y2i+1,k+1 + pm y2i+1,k + pd y2i+1,k−1 = Vi,2 j + E2i, j ,
where k (the index of the node at the end of themiddle branch) is the index of the node which is the
nearest to the expected future value, Ei, j = E y(ti+1 )|y(ti ) = yi, j and Vi,2 j = Var{y(ti+1 )|y(ti ) = yi, j }.
√
If we suppose that the variance is only dependant on time Vi,j = Vi and set yi+1 to Vi 3, we find
that
2
1 (Ei, j − yi+1,k ) Ei, j − yi+1,k
pu = + 2
+ √ ,
6 6Vi 2 3Vi
2
2 (Ei, j − yi+1,k )
pm = − ,
3 3Vi2
2
1 (Ei, j − yi+1,k ) Ei, j − yi+1,k
pd = + 2
− √ .
6 6Vi 2 3Vi
To come...
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 Quant-
Lib::DiscretizedAsset(p. 308), are:
1. Define the initialisation procedure (e.g. terminal payoff for european stock options).
2. 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 Quant-
Lib::Pricers::DiscretizedSwap and QuantLib::Pricers::DiscretizedSwaption.
∂f
= Lf
∂t
where L is a differential operator in “space”, i.e., one which does not contain partial derivatives
in t but can otherwise contain any derivative in any other variable of the problem.
Writing the equation in the above form allows us to implement separately the discretization
of the differential operator L and the time scheme used for the evolution of the solution. The
QuantLib::FiniteDifferences::FiniteDifferenceModel(p. 352) class acts as a glue for such two
steps—which are outlined in the following sections—and provides the interface of the resulting
finite difference model for the end user. Furthermore, it provides the possibility of checking
and operating on the solution array at each step—which is typically used to apply an exercise
condition for an option. This is also outlined in a section below.
The discretization of the differential operator L depends on the discretization chosen for the
solution f of the given equation.
Such choice is obvious in the 1-D case where the domain [a, b] of the equation is discretized as
a series of points xi , i = 0 . . . N − 1 (note that the index is zero based) where xi = a + hi and
h = (b − a)/(N − 1). In turn, the solution f of the equation is discretized as an array ui , i = 0 . . . N − 1
whose elements are defined as ui = f (xi ). The discretization of the differential operator follows
by substituting the derivatives with the corresponding incremental ratios defined in terms of the
fi . A number of basic operators are defined in the framework which can be composed to form
more complex operators, namely:
the first derivative ∂/∂x is discretized as the operator D+ , defined as
ui+1 − ui
D+ ui =
h
and implemented in class QuantLib::FiniteDifferences::DPlus(p. 316); the operator D− , defined
as
ui − ui−1
D− ui =
h
and implemented in class QuantLib::FiniteDifferences::DMinus(p. 314); and the operator D0 ,
defined as
ui+1 − ui−1
D0 ui =
2h
and implemented in class QuantLib::FiniteDifferences::DZero(p. 320). The discretization error
of the above operators is O(h) for D+ and D− and O(h2 ) for D0 ;
the second derivative ∂2 /∂x2 is discretized as the operator D+ D− , defined as
ui+1 − 2ui + ui−1
D+ D− ui =
h2
and implemented in class QuantLib::FiniteDifferences::DPlusDMinus(p. 317). Its discretization
error is O(h2 ).
The boundary condition for the above operators is by default linear extrapolation. Methods are
currently provided for setting other kinds of boundary conditions to a tridiagonal operator which
Once the differential operator L has been discretized, a number of choices are available for
discretizing the time derivative at the left-hand side of the equation.
In this framework, such choice is encapsulated in so-called evolvers which, given L and the
solution u(k) at time tk , yield the solution u(k−1) at the previous time step.
A number of evolvers are currently provided in the library which implement well-known schemes,
namely,
the forward Euler explicit scheme in which the equation is discretized as
u(k) − u(k−1)
= Lu(k)
∆t
hence
u(k−1) = (I − ∆tL) u(k)
from which u(k−1) can be obtained directly;
the backward Euler implicit scheme in which the equation is discretized as
u(k) − u(k−1)
= Lu(k−1)
∆t
hence
(I + ∆tL) u(k−1) = u(k)
from which u(k−1) can be obtained by solving a linear system;
the Crank-Nicolson scheme in which the equation is discretized as
u(k) − u(k−1) u(k) + u(k−1)
=L
∆t 2
hence
∆t ∆t
I+
L u(k−1) = I − L u(k)
2 2
(k−1)
from which u can be obtained by solving a linear system.
Each of the above evolvers forces a set of interface requirements upon the dif-
ferential operator which are detailed in the documentation of the correspond-
ing class, namely, QuantLib::FiniteDifferences::ExplicitEuler(p. 335), QuantLib::Finite-
Differences::ImplicitEuler(p. 408), and QuantLib::FiniteDifferences::CrankNicolson(p. 282), re-
spectively.
A programmer could implement its own evolver, which does not need to inherit from any base
class.
However, it must implement the following interface:
class Evolver {
public:
typedef ... arrayType;
typedef ... operatorType;
// constructors
Evolver(const operatorType& D);
// member functions
void step(arrayType& a, Time t) const;
void setStep(Time dt);
};
Finally, we note again that the pricing of an option requires the finite difference model to solve
the corresponding equation backwards in time. Therefore, given a discretization u of the solution
at a given time t, the call
evolver.step(u,t)
A finite difference model can be passed a step condition to be applied at each step during the
rollback of the solution (e.g. the early exercise American condition). Such condition must be
embodied in a class derived from QuantLib::FiniteDifferences::StepCondition(p. 612) and must
implement the interface of the latter, namely,
∂f σ2 ∂2 f ∂f
=− −ν + r f.
∂t 2 ∂x 2 ∂x
It can be seen that the operator LBS is
σ2 ∂2 ∂
LBS = − − ν + rI
2 ∂x2 ∂x
and can be built from the basic operators provided in the library as
σ2
LBS = − D+ D− − νD0 + rI.
2
Its implementation closely reflects the above decomposition and can be written as
taking as inputs the relevant parameters of the equation (σ, ν and r) as well as model parameters
such as the number N of grid points and their spacing h.
As simple example cases, we will use the above operator to price both an European and an
American option. The parameters of the two options will be the same, namely, they will be both
call options with underlying price u = 100, strike s = 95, residual time T = 1 year, dividend yield
q = 3% and volatility σ = 10%. The risk-free rate will be r = 5%. Such parameters are expressed
using QuantLib types as
The grid upon which the model will act will be a logarithmic grid of underlying prices, i.e., f will
be defined in a range [ln umin , ln umax ] discretized as an array xi , i = 0 . . . N − 1 with xi = ln umin + ih
and h = (ln umax − ln umin )/(N − 1). Such a grid and the corresponding vector of actual prices can
√ in the code below. The domain of the model will be defined as [ln u − ∆, ln u + ∆]
be built as shown
where ∆ = 4σ T. A number of grid points N = 101 will be used.
The initial condition is determined by the values of the option at maturity, i.e., either the difference
between underlying price and strike if such difference is positive, or 0 if that is not the case (the
above will have to be suitably modified for a put option or a straddle.) Such “initial” condition
will be rolled back in time by our model.
Array exercisingValue(gridPoints);
for (unsigned int i=0; i<gridPoints; i++)
exercisingValue[i] = QL_MAX(prices[i]-strike,0.0);
Now the differential operator can be initialized. Also, Neumann initial conditions are set which
correspond to the initial value of the derivatives at the boundaries (see the BoundaryCondition
class documentation for details).
We are now already set for the pricing of the European option. Also, the exercise condition is the
only thing still to be defined for the American option to be priced. Such condition is equivalent
to the statement that at each time step, the value of the option is the maximum between the profit
realized in exercising the option (which we already calculated and stored in exercisingValue)
and the value of the option should we keep it (which corresponds to the solution rolled back to
the current time step). This logic can be implemented as:
Everything is now ready. The model can be created gluing the piece together by means of
the QuantLib::FiniteDifferences::FiniteDifferenceModel(p. 352) class. The current value of the
option is calculated by rolling back the solution to the current time, i.e., t = 0, and by taking the
value corresponding at the current underlying price—which by construction corresponds to the
central value provided that the number of grid points is odd.
// European option
Array f = exercisingValue; // initial condition
model.rollback(f, residualTime, 0.0, timeSteps);
double europeanValue = valueAtCenter(f);
// American option
f = exercisingValue; // reset
Handle<StepCondition<Array> > condition(
new ExerciseCondition(exercisingValue));
model.rollback(f, residualTime, 0.0, timeSteps, condition);
double americanValue = valueAtCenter(f);
where p(x) is a normalized probability function. Monte Carlo methods solve the above integral
by approximating it with the discrete sum
N
1 X
f (xi )w(xi )
N
i=1
where the xi are drawn from p(x), possibly with a weight w(xi ) — which otherwise can be
considered uniformly equal to 1.
The above sum has a straightforward interpretation in the case of a derivative product, namely,
the xi are N generated random paths which the value of the underlying can possibly follow, while
the f (xi ) are the values of the derivative on each of such paths. The sum above can therefore be
taken as an estimate of the price of the derivative, namely, the average of its value on all possible
paths — or rather all considered paths. Such a method enables the user to construct pricing
classes for an unlimited range of derivatives, most notably path-dependent ones which cannot
be priced by means of finite difference methods.
It must also be mentioned that for all such methods, the error e on the estimated value is propor-
tional to the square root of the number of samples N. A number of so-called variance-reduction
methods have been found which allows one to reduce the coefficient of proportionality between
√
e and 1/ N.
Separate implementations are provided in the library for the three components of the above
average, namely, the random drawing of the xi , the evaluation of the f (xi ), and the averaging
process itself. The QuantLib::MonteCarlo::MonteCarloModel(p. 504) class acts as a glue for such
three steps — which are outlined in the following sections — and provides the interface of the
resulting Monte Carlo model to the end user.
√ √
with average ν∆Ti and standard deviation σ ∆Ti — or possibly νi ∆Ti and σi ∆Ti should ν and
σ vary in time.
The QuantLib::MonteCarlo::Path(p. 543) class stores the variation vector decomposed in its drift
(determined) and diffusion (random) components. As shown below, this allows the implemen-
tation of antithetic variance reduction techniques.
The QuantLib::MonteCarlo::MultiPath(p. 506) class is a straightforward extension which acts as
a vector of Path objects.
Classes are provided which generate paths and multi-paths with the desired drift and diffusion
components, namely, QuantLib::MonteCarlo::PathGenerator(p. 544) and QuantLib::Monte-
Carlo::MultiPathGenerator(p. 507).
For the time being, the path generator is initialized with a constant drift and variance. This
requirement will most likely be relaxed in the next release. The multi-path generator is initialized
with an array of constant drifts—one for each single asset—and a covariance matrix which
encapsulates the relations between the diffusion components of the single assets.
The time discretization of the (multi)paths can be specified either as a given number of equal time
steps over a given time span, or as a vector of explicitly specified times at which the path will be
sampled.
The QuantLib::MonteCarlo::PathPricer(p. 546) class is the base class from which path pricers
must inherit. The only method which subclasses are required to implement is
where P can be Path or MultiPath depending on the derivative whose value must be calculated.
Similarly, the term path will be used in the following discussion as meaning either path or multi-
path depending on the context. The term single path is not to be taken as opposite to multi-path,
but rather as meaning “a single instance of a (multi)path" as opposed to the set of all generated
(multi)paths.
The above method encapsulates the pricing of the derivative on a single path and must return
its value had the evolution of the underlying(s) followed the path passed as argument. For this
reason, control variate techniques (see below) must not be implemented at this level since they
would cause the returned value to differ from the actual price of the derivative on the path.
Instead, antithetic variance-reduction techniques can be effectively implemented at this level and
indeed are used in the pricers currently included in the library.
In short, such techniques consist in pricing an option on both the given path and its antithetic,
the latter being a path with the same drift and the opposite diffusion component. The value of
the sample is defined as the average of the prices on the two paths.
A generic implementation of antithetic techniques could consist of a path pricer class which takes
a concrete path pricer upon construction and whose operator() simply proxies two calls to the
contained pricer, passing the given path and its antithetic, and averages the result. However, this
would not take full advantage of the technique.
In fact, it must be noted that using antithetic paths not only reduces the variance per se but also
allows to factor out calculations commons to a path and its antithetic, thus reducing greatly the
computation time. Therefore, such techniques are best implemented inside the path pricer itself,
whose algorithm can fully exploit such factorization.
A number of path pricers are available in the library and are listed in the QuantLib::Monte-
Carlo(p. 135) namespace reference.
The Monte Carlo model also provides the user with the possibility to take advantage of control-
variate techniques.
Such techniques consist in pricing a portfolio from which the price of the derivative can be
deduced, but with a lower variance than the derivative alone.
In our current implementation, static-hedge control variate is used, namely, the formed portfolio
is long of the derivative we need to price and short of a similar derivative whose price can be
calculated analytically. The value of the portfolio on a given path will of course be given by
the difference of the values of the two derivatives on such path. However, due to the similarity
between the derivatives, the portfolio price will have a lower variance than either derivative alone
since any variation in the price of the latter will be partly compensated by a similar variation in
the price of the other. Lastly, given the portfolio price, the price of the derivative we are interested
in can be deduced by adding the analytic value of the other.
In order to use such technique, the user must provide the model with a path pricer for the
additional option and the value of the latter. The action of the Monte Carlo model is in this case
expressed as:
Martingale (a.k.a. dynamic-hedge) control variate techniques are planned for future releases.
A QuantLib::Pricers::McPricer(p. 490) class is also available which wraps the typical usage of a
Monte Carlo model.
Details on the Monte Carlo Pricer interface will be available in the Pricers(p. ??) section.
As a simple example, we will use the outlined tools to price an European option by means of
Monte Carlo techniques.
Given a current underlying price u0 and a path p = [p1 , . . . , pN ] where every variation pi is the
sum of a drift term di and a random diffusion term ri , the price of the underlying at maturity is
N
N N N
Y X X X
u = u0 epi = u0 exp pi = u0 exp di + ri
1 1 1 1
while the price on the antithetic path — i.e., same drift and opposite diffusion — is
N N
X X
u0 exp di − ri .
1 1
size_t n = path.size();
// calculate payoff
double payoff;
switch (type_) {
case Option::Call;
payoff = QL_MAX(price-strike,0.0);
break;
// other cases are left as an exercise to the reader
...
}
The path pricer can now be used in a model. Let us assume the following parameters:
Handle<GaussianPathGenerator> pathGenerator(
new GaussianPathGenerator(nu,vol2,residualTime,timeSteps));
// discount at maturity
DiscountFactor discount = QL_EXP(-riskFreeRate*residualTime);
bool antithetic = true;
model.addSamples(samples);
// now get the results: the option price is given by value with
// a confidence level given by error
value = model.sampleAccumulator().mean();
error = model.sampleAccumulator().errorEstimate();
More examples of path pricers can be found in the QuantLib::MonteCarlo(p. 135) namespace,
while examples of more sophisticated pricers which uses them in Monte Carlo models can be
found in the QuantLib::Pricers(p. 139) namespace.
2.5.5 Notes
(1)(p. ??) A more rigorous approach would lead us to integrate the above equation by means of
Green functions or Laplace transforms. Both such methods would show that the price at time
t = 0 of an option with payoff G(S(T)) where S(T) is the underlying price at expiry is given by the
integral Z ∞
(ξ − νT)2
!
1
e−rT G(S0 eξ ) √ exp − dξ
−∞ 2πσ2 T 2σ2 T
where S0 is the price of the underlying at t = 0. It can be seen that the above integral is of the
form shown at the beginning of this section, namely, the pricing function is
and can be interpreted as the option payoff discounted to the present time, while the probability
distribution is
(x − νT)2
!
1
p(x) = √ exp − .
2πσ2 T 2σ2 T
which again shows that the logarithms of the underlying prices at time T are distributed as a
√
Gaussian with average νT and standard deviation σ T.
where r = f (t, x). If the model is affine (i.e. derived from the QuantLib::ShortRateModels::Affine-
Model(p. 158) class), analytical formulas for discount bonds and discount bond options are given
(useful for calibration).
When α and σ are constants, this model has analytical formulas for discount bonds and
discount bond options.
√
drt = (θ(t) − krt )dt + σ rt dWt
There are analytical formulas for discount bonds (and soon for discount bond options).
2.6.2 Calibration
The class CalibrationHelper is a base class that facilitates the instanciation 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::ShortRateModels::CalibrationHelpers::CapHelper and Quant-
Lib::ShortRateModels::CalibrationHelpers::SwaptionHelper.
For the calibration itself, you must choose an optimization method that will find constant param-
eters such that the value: v
t n
X (T − M )2
i i
V= ,
Mi
i=1
where Ti is the price given by the model and Mi is the market price, is minimized. A few
optimization methods are available in the QuantLib::Optimization namespace, and more are on
the way...
2.6.4 Pricers
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 Quant-
Lib::Pricers::AnalyticalCapFloor(p. 164). In the case of single-factor affine models, swaptions can
be priced using the Jamshidian decomposition, implemented in QuantLib::Pricers::Jamshidian-
Swaption(p. 432).
(Doesn’t work for the moment) For the moment, this is only available for single-factor affine
models. If x = x(t, r) is the state variable and follows this stochastic process:
∂P ∂P 1 2 ∂2 P
+µ + σ = r(t, x)P
∂t ∂x 2 ∂x2
The adequate operator to feed a Finite Difference Model instance is defined in the Quant-
Lib::FiniteDifferences::OneFactorOperator(p. 532) class.
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-independant derivative. Just implement a class derived from Numerical-
Derivative (see QuantLib::Pricers::NumericalSwaption for example) and roll it back until the
present time... Just look at QuantLib::Pricers::TreeCapFloor(p. 649) and QuantLib::Pricers::Tree-
Swaption(p. 650) for working pricers.
Since version 0.3.4, the Instrument class was reworked as shown in the following figure.
if (isExpired()) LazyObject
setupExpired();
else #calculate(): void
LazyObject::calculate(); #performCalculations(): void
setupArguments(engine_->arguments());
engine_->arguments()->validate();
engine_->calculate(); engine_
// dynamic_cast needed in real code
NPV_ = engine_->results()->NPV;
Instrument
+isExpired(): bool
#calculate(): void PricingEngine
#performCalculations(): void
#setupExpired(): void -arguments: Arguments *
+setupArguments(Arguments *): void -results: Results *
+calculate()
On the one hand, the checking of the expiration condition is now performed in a method is-
Expired() separated from the actual calculation, and a setupExpired() method is provided.
The latter sets the NPV to 0.0 and can be extended in derived classes should any other results be
returned.
On the other hand, the pricing-engine machinery previously contained in the Option class was
moved upwards to the Instrument class. Also, the setupEngine() method was replaced by a
setupArguments(Arguments∗) method. This allows one to cleanly implement containment of
instruments with code such as:
2.9.3 Optimizers
Pi = P0 + λei ,
where λ is the problem’s characteristic length scale). These points will form a geometrical form
called simplex. The principle of the downhill simplex method is, at each iteration, to move the
worst point (highest cost function value) through the opposite face to a better point. When the
simplex seems to be constrained in a valley, it will be contracted downhill, keeping the best point
unchanged.
d0 = −∇ f (x0 ).
As we can see, this optimization method requires the knowledge of the gradient of the cost
function. see QuantLib::Optimization::ConjugateGradient(p. 268) .
2.12 Utilities
Documentation for this part of the library is in progress.
Iterators are meant to build a sequence on the fly from one or more other sequences, without
having to allocate place for storing it. A couple of examples: suppose we have a function which
calculates the average of a sequence, and that for genericity we have implemented it as a template
function which takes the beginning and the end of the sequence, so that its declaration is:
This kind of genericity allows one to use the same function to calculate the average of a std::vector,
a std::list, a QuantLib::History(p. 394), any other container, of a subset of any of the former.
Now let’s say we have two sequences of numbers, and we want to calculate the average of their
products. One approach could be to store the products in another sequence, and to calculate the
average of the latter, as in:
The above works, however, it might be not particularly efficient since we have to allocate the
product vector, quite possibly just to throw it away when the calculation is done.
QuantLib::Utilities::coupling_iterator(p. 274) allows us to do the same thing without allocating
the extra vector: what we do is simply:
The call to make_coupling_iterator creates an iterator which is really a reference to the two
iterators and the operation we passed. Dereferencing such iterator returns the result of applying
such operation to the values pointed to by the two contained iterators. Advancing the coupling
iterator advances the two underlying ones. One can see how iterating on such iterator generates
the products one by one so that they can be processed by average(), but does not need allocating
memory for storing the results. The product sequence is generated on the fly.
The other iterators share the same principle but have different functionalities:
• processing_iterator takes a sequence [x0 , x1 , . . .] and a function f and generates the sequence
[ f (x0 ), f (x1 ), . . .];
• stepping_iterator takes a sequence [x0 , x1 , . . .] and a step m and generates the sequence
[x0 , xm , x2m , . . .]
Examples
More examples of using the QuantLib library can be found in chapter 13 of the reference manual.
Should your viewer allow it, they can also be reached via the hyperlinks in the following list.
• AmericanOption.cpp
• BermudanSwaption.cpp
• DiscreteHedging.cpp
• EuropeanOption.cpp
• history_iterators.cpp
• swapvaluation.cpp
54 Examples
Reference Manual
Chapter 4
Frankfurt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367
Helsinki . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392
Johannesburg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434
JointCalendar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 435
London . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 467
Milan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 499
NewYork . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 514
NullCalendar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 520
Oslo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 536
Stockholm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 616
Sydney . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 631
TARGET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 633
Tokyo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 643
Toronto . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 645
Warsaw . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 673
Wellington . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 674
Zurich . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 685
Bridge< Constraint, ConstraintImpl > . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230
Constraint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270
BoundaryConstraint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226
CompositeConstraint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266
NoConstraint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 515
PositiveConstraint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 556
Bridge< DayCounter, DayCounterImpl > . . . . . . . . . . . . . . . . . . . . . . . . . . . 230
DayCounter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 292
Actual360 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
Actual365 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
ActualActual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
SimpleDayCounter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 597
Thirty360 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 639
Bridge< Parameter, ParameterImpl > . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230
Parameter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 539
ConstantParameter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269
NullParameter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 521
PiecewiseConstantParameter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 552
TermStructureFittingParameter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 638
ExtendedCoxIngersollRoss::FittingParameter . . . . . . . . . . . . . . . . . . . 339
G2::FittingParameter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373
HullWhite::FittingParameter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403
BrownianBridge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231
CalendarImpl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239
Calendar::WesternImpl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238
CalibrationSet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242
CLGaussianRng . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256
CliquetOption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258
CliquetOption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259
combining_iterator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264
ConstraintImpl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
CostFunction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273
LeastSquareFunction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 446
coupling_iterator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
CoxIngersollRoss::Dynamics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280
ExtendedCoxIngersollRoss::Dynamics . . . . . . . . . . . . . . . . . . . . . . . . . . . 338
CubicSpline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283
CumulativeNormalDistribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285
CuriouslyRecurringTemplate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
Solver1D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 608
CuriouslyRecurringTemplate< Bisection > . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
Solver1D< Bisection > . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 608
Bisection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205
CuriouslyRecurringTemplate< Brent > . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
Solver1D< Brent > . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 608
Brent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
CuriouslyRecurringTemplate< FalsePosition > . . . . . . . . . . . . . . . . . . . . . . . . 286
Solver1D< FalsePosition > . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 608
FalsePosition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342
CuriouslyRecurringTemplate< Newton > . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
Solver1D< Newton > . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 608
Newton . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 512
CuriouslyRecurringTemplate< NewtonSafe > . . . . . . . . . . . . . . . . . . . . . . . . . 286
Solver1D< NewtonSafe > . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 608
NewtonSafe . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 513
CuriouslyRecurringTemplate< Ridder > . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
Solver1D< Ridder > . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 608
Ridder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 582
CuriouslyRecurringTemplate< Secant > . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
Solver1D< Secant > . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 608
Secant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 589
CurrencyFormatter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287
Date . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288
DateFormatter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291
DayCounterImpl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294
DiffusionProcess . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298
BlackScholesProcess . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
OrnsteinUhlenbeckProcess . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 534
SquareRootProcess . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 610
DiscretizedAsset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308
DiscretizedDiscountBond . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310
DiscretizedOption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311
Disposable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313
DoubleFormatter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315
EndCriteria . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321
Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325
AssertionFailedError . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
IllegalArgumentError . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 406
IllegalResultError . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407
IndexError . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 421
OutOfMemoryError . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 537
PostconditionNotSatisfiedError . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 557
PreconditionNotSatisfiedError . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 558
ErrorFunction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326
EuroFormatter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328
Exercise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334
AmericanExercise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
BermudanExercise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
EuropeanExercise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329
FdBermudanOption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344
FdDividendShoutOption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348
filtering_iterator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351
FiniteDifferenceModel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352
ForwardOptionArguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359
GammaFunction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 374
GaussianStatistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375
GeneralStatistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378
GenericRiskStatistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383
HaltonRsg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389
Handle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390
Handle< BlackModel > . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390
Handle< Impl > . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390
Handle< Link< TermStructure > > . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390
RelinkableHandle< TermStructure > . . . . . . . . . . . . . . . . . . . . . . . . . . . . 579
Handle< Link< Type > > . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390
RelinkableHandle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 579
Handle< MonteCarlo::MonteCarloModel< MonteCarlo::MultiAsset_old< Monte-
Carlo::PseudoRandomSequence_old >, Math::Statistics > > . . . . . . . . . . 390
Handle< MonteCarlo::MonteCarloModel< MonteCarlo::SingleAsset< RNG >, S > > . . 390
Handle< MonteCarlo::MonteCarloModel< MonteCarlo::SingleAsset_old< Monte-
Carlo::PseudoRandom_old >, Math::Statistics > > . . . . . . . . . . . . . . . . 390
Handle< path_generator_type > . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390
Handle< path_pricer_type > . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390
Handle< ShortRateModels::OneFactorAffineModel > . . . . . . . . . . . . . . . . . . . . 390
Handle< TermStructure > . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390
History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 394
History::const_iterator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397
History::Entry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399
HullWhite::Dynamics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402
ICGaussianRng . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 404
ICGaussianRsg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405
IncrementalStatistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 414
IntegerFormatter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 425
Interpolation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 427
CubicSplineInterpolation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284
LinearInterpolation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 452
LogLinearInterpolation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 466
Interpolation2D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 429
BicubicSplineInterpolation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
BilinearInterpolation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
InverseCumulativeNormal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 431
KnuthUniformRng . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 437
KronrodIntegral . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 438
LeastSquareProblem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 447
LecuyerUniformRng . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 448
LexicographicalView . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 449
Linear . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451
LineSearch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 453
ArmijoLineSearch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
LogLinear . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 465
lowest_category_iterator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 468
MakeSchedule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 469
Matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 471
McPricer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 490
McBasket . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 477
McCliquetOption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 480
McDiscreteArithmeticAPO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 481
McDiscreteArithmeticASO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 482
McEuropean . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 483
McEverest . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 485
McHimalaya . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 486
McMaxBasket . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 487
McPagoda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 488
McPerformanceOption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 489
McPricer< MonteCarlo::MultiAsset_old< MonteCarlo::PseudoRandomSequence_old > > 490
McPricer< MonteCarlo::SingleAsset_old< MonteCarlo::PseudoRandom_old > > . . . . 490
McSimulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 492
MCBarrierEngine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 475
MCBinaryEngine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 478
MCVanillaEngine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 494
MCEuropeanEngine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 484
McSimulation< MonteCarlo::SingleAsset< RNG >, S > . . . . . . . . . . . . . . . . . . . 492
MersenneTwisterUniformRng . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 496
Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 497
ConjugateGradient . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268
Simplex . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 603
SteepestDescent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 611
MixedScheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 500
CrankNicolson . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282
ExplicitEuler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335
ImplicitEuler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408
MonteCarloModel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 504
MonteCarloModel< MonteCarlo::MultiAsset_old< MonteCarlo::PseudoRandom-
Sequence_old >, Math::Statistics > . . . . . . . . . . . . . . . . . . . . . . . . . 504
MonteCarloModel< MonteCarlo::SingleAsset< RNG >, S > . . . . . . . . . . . . . . . . . 504
MonteCarloModel< MonteCarlo::SingleAsset_old< MonteCarlo::PseudoRandom_old
>, Math::Statistics > . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 504
MoroInverseCumulativeNormal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 505
MultiPath . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 506
MultiPathGenerator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 507
MultiPathGenerator_old . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 508
MultivariateAccumulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 509
NonLinearLeastSquare . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 516
NormalDistribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 518
Null . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 519
NumericalMethod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 522
Lattice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 439
BlackScholesLattice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213
Lattice2D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 441
TwoFactorModel::ShortRateTree . . . . . . . . . . . . . . . . . . . . . . . . . . . 659
OneFactorModel::ShortRateTree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 531
Observable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 523
BlackModel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
BlackVolTermStructure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222
BlackVarianceTermStructure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
BlackVarianceCurve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
BlackVarianceSurface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218
ImpliedVolTermStructure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 411
BlackVolatilityTermStructure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
BlackConstantVol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
CapFlatVolatilityStructure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244
CapFlatVolatilityVector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
CapletForwardVolatilityStructure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
CashFlow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252
Coupon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276
FixedRateCoupon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353
FloatingRateCoupon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355
IndexedCoupon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 419
InArrearIndexedCoupon . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413
UpFrontIndexedCoupon . . . . . . . . . . . . . . . . . . . . . . . . . . . . 660
ParCoupon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 541
ShortFloatingRateCoupon . . . . . . . . . . . . . . . . . . . . . . . . . . . 594
SimpleCashFlow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 596
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 417
Xibor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 675
AUDLibor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
CADLibor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
CHFLibor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255
Euribor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327
GBPLibor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377
JPYLibor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 436
USDLibor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 661
ZARLibor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 678
Link . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 455
Link< TermStructure > . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 455
LocalVolTermStructure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 463
LocalConstantVol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457
LocalVolCurve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 459
LocalVolSurface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461
MarketElement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 470
CompositeMarketElement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267
DerivedMarketElement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297
SimpleMarketElement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 598
LazyObject . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 443
Instrument . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 422
CapFloor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247
Cap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
Collar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263
Floor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357
Stock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 615
Swap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 621
SimpleSwap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 599
Option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 533
BarrierOption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
BinaryOption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
Swaption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 625
VanillaOption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 664
ForwardVanillaOption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365
QuantoVanillaOption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 572
QuantoForwardVanillaOption . . . . . . . . . . . . . . . . . . . . . . . . . 566
PiecewiseFlatForward . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 553
GenericModelEngine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382
AnalyticalCapFloor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
BlackCapFloor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
BlackSwaption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
JamshidianSwaption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 432
LatticeShortRateModelEngine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 442
TreeCapFloor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 649
TreeSwaption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 650
LatticeShortRateModelEngine< Instruments::CapFloor::arguments,
Instruments::CapFloor::results > . . . . . . . . . . . . . . . . . . . . . . 442
LatticeShortRateModelEngine< Instruments::Swaption::arguments, Instru-
ments::Swaption::results > . . . . . . . . . . . . . . . . . . . . . . . . . 442
GenericModelEngine< BlackModel, Instruments::CapFloor::arguments,
Instruments::CapFloor::results > . . . . . . . . . . . . . . . . . . . . . . . . 382
GenericModelEngine< BlackModel, Instruments::Swaption::arguments, Instru-
ments::Swaption::results > . . . . . . . . . . . . . . . . . . . . . . . . . . . 382
GenericModelEngine< ShortRateModels::AffineModel, Instruments::Cap-
Floor::arguments, Instruments::CapFloor::results > . . . . . . . . . . . . . 382
GenericModelEngine< ShortRateModels::Model, Arguments, Results > . . . . . . . . 382
GenericModelEngine< ShortRateModels::Model, Instruments::Cap-
Floor::arguments, Instruments::CapFloor::results > . . . . . . . . . . . . . 382
GenericModelEngine< ShortRateModels::Model, Instru-
ments::Swaption::arguments, Instruments::Swaption::results > . . . . . . 382
GenericModelEngine< ShortRateModels::OneFactorAffineModel, Instru-
ments::Swaption::arguments, Instruments::Swaption::results > . . . . . . 382
CalibrationHelper . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 502
OneFactorModel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 529
BlackKarasinski . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
OneFactorAffineModel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 528
TwoFactorModel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 657
G2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 371
SwaptionVolatilityStructure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 630
SwaptionVolatilityMatrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 629
TermStructure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 634
DiscountStructure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303
AffineTermStructure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
DiscountCurve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301
ExtendedDiscountCurve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340
ImpliedTermStructure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 409
ForwardRateStructure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 361
ForwardSpreadedTermStructure . . . . . . . . . . . . . . . . . . . . . . . . . . 363
PiecewiseFlatForward . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 553
ZeroYieldStructure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 683
DriftTermStructure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318
QuantoTermStructure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 570
ZeroCurve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 679
ZeroSpreadedTermStructure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 681
RateHelper . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 577
DepositRateHelper . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295
FraRateHelper . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 368
FuturesRateHelper . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 370
SwapRateHelper . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 623
Observer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 525
BlackModel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
IndexedCoupon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 419
ParCoupon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 541
CompositeMarketElement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267
DerivedMarketElement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297
Xibor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 675
Link . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 455
Link< TermStructure > . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 455
LazyObject . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 443
GenericModelEngine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382
GenericModelEngine< BlackModel, Instruments::CapFloor::arguments,
Instruments::CapFloor::results > . . . . . . . . . . . . . . . . . . . . . . . . 382
GenericModelEngine< BlackModel, Instruments::Swaption::arguments, Instru-
ments::Swaption::results > . . . . . . . . . . . . . . . . . . . . . . . . . . . 382
GenericModelEngine< ShortRateModels::AffineModel, Instruments::Cap-
Floor::arguments, Instruments::CapFloor::results > . . . . . . . . . . . . . 382
GenericModelEngine< ShortRateModels::Model, Arguments, Results > . . . . . . . . 382
GenericModelEngine< ShortRateModels::Model, Instruments::Cap-
Floor::arguments, Instruments::CapFloor::results > . . . . . . . . . . . . . 382
GenericModelEngine< ShortRateModels::Model, Instru-
ments::Swaption::arguments, Instruments::Swaption::results > . . . . . . 382
GenericModelEngine< ShortRateModels::OneFactorAffineModel, Instru-
ments::Swaption::arguments, Instruments::Swaption::results > . . . . . . 382
CalibrationHelper . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 502
AffineTermStructure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
DriftTermStructure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318
ExtendedDiscountCurve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340
ForwardSpreadedTermStructure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363
ImpliedTermStructure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 409
QuantoTermStructure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 570
RateHelper . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 577
ZeroSpreadedTermStructure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 681
BlackConstantVol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
BlackVarianceCurve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
BlackVarianceSurface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218
ImpliedVolTermStructure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 411
LocalConstantVol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457
LocalVolCurve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 459
LocalVolSurface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461
OneFactorModel::ShortRateDynamics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 530
ParameterImpl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 540
Path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 543
PathGenerator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 544
PathGenerator_old . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 545
PathPricer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 546
PathPricer< Path > . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 546
BarrierPathPricer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
BiasedBarrierPathPricer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
BinaryPathPricer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202
CliquetOptionPathPricer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
EuropeanPathPricer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331
PathPricer_old . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 547
PathPricer_old< MultiPath > . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 547
BasketPathPricer_old . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
EverestPathPricer_old . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333
HimalayaPathPricer_old . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393
MaxBasketPathPricer_old . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 474
PagodaPathPricer_old . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 538
PathPricer_old< Path > . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 547
ArithmeticAPOPathPricer_old . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
ArithmeticASOPathPricer_old . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
CliquetOptionPathPricer_old . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262
EuropeanPathPricer_old . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332
GeometricAPOPathPricer_old . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 386
GeometricASOPathPricer_old . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 387
PerformanceOptionPathPricer_old . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 550
Payoff . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 548
StrikedTypePayoff . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 617
AssetOrNothingPayoff . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
CashOrNothingPayoff . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254
PlainVanillaPayoff . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 555
SupersharePayoff . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 619
PerformanceOption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 549
Period . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 551
PricingEngine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 559
GenericEngine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381
BarrierEngine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
AnalyticBarrierEngine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
MCBarrierEngine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 475
BinaryEngine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
AnalyticAmericanBinaryEngine . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
AnalyticEuropeanBinaryEngine . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
MCBinaryEngine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 478
CliquetEngine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257
ForwardEngine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358
ForwardPerformanceEngine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 360
GenericModelEngine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382
GenericModelEngine< BlackModel, Instruments::CapFloor::arguments,
Instruments::CapFloor::results > . . . . . . . . . . . . . . . . . . . . . . 382
GenericModelEngine< BlackModel, Instruments::Swaption::arguments, Instru-
ments::Swaption::results > . . . . . . . . . . . . . . . . . . . . . . . . . 382
SegmentIntegral . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 590
SequenceStatistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 591
SequenceStatistics< Statistics > . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 591
DiscrepancyStatistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305
Short . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 593
SingleAssetOption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 605
BarrierOption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
BinaryOption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
DiscreteGeometricAPO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306
DiscreteGeometricASO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307
EuropeanOption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330
ContinuousGeometricAPO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
FdDividendEuropeanOption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347
FdBsmOption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345
FdEuropean . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349
FdStepConditionOption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350
FdAmericanOption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343
SobolRsg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 607
StepCondition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 612
AmericanCondition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
ShoutCondition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 595
StepCondition< Array > . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 612
stepping_iterator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 613
StringFormatter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 618
SVD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 620
SymmetricSchurDecomposition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 632
TermStructureConsistentModel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 637
BlackKarasinski . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
ExtendedCoxIngersollRoss . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336
G2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 371
HullWhite . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 400
TimeBasket . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 641
TimeGrid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 642
TrapezoidIntegral . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 646
SimpsonIntegral . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 604
Tree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 648
BinomialTree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
EqualJumpsBinomialTree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323
CoxRossRubinstein . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281
Trigeorgis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 654
EqualProbabilitiesBinomialTree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324
AdditiveEQPBinomialTree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
JarrowRudd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 433
Tian . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 640
TrinomialTree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 656
TridiagonalOperator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 651
BSMOperator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
DMinus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314
DPlus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316
DPlusDMinus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317
DZero . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320
OneFactorOperator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 532
TridiagonalOperator::TimeSetter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 653
TrinomialBranching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 655
TwoFactorModel::ShortRateDynamics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 658
Vasicek::Dynamics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 671
Visitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 672
Visitor< BlackVolTermStructure > . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 672
Visitor< CashFlow > . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 672
BPSCalculator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
Visitor< Coupon > . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 672
BPSCalculator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
Visitor< FixedRateCoupon > . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 672
Visitor< VolTermStructures::BlackConstantVol > . . . . . . . . . . . . . . . . . . . . . . . 672
Visitor< VolTermStructures::BlackVarianceCurve > . . . . . . . . . . . . . . . . . . . . . . 672
XiborManager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 677
Here are the classes, structs, unions and interfaces with brief descriptions:
Actual360 (Actual/360 day count convention ) . . . . . . . . . . . . . . . . . . . . . . . . 153
Actual365 (Actual/365 day count convention ) . . . . . . . . . . . . . . . . . . . . . . . . 154
ActualActual (Actual/Actual day count ) . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
AcyclicVisitor (Degenerate base class for the Acyclic Visitor(p. 672) pattern ) . . . . . . 156
AdditiveEQPBinomialTree (Additive equal probabilities binomial tree ) . . . . . . . . . 157
AffineModel (Affine model class ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
AffineTermStructure (Term-structure implied by an affine model ) . . . . . . . . . . . . 159
AmericanCondition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
AmericanExercise (American exercise class ) . . . . . . . . . . . . . . . . . . . . . . . . . 162
AmericanMCVanillaEngine (Least-square Monte Carlo engine ) . . . . . . . . . . . . . . 163
AnalyticalCapFloor (Analytical pricer for cap/floor ) . . . . . . . . . . . . . . . . . . . . . 164
AnalyticAmericanBinaryEngine (Pricing engine for American binary options using
analytic formulae ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
AnalyticBarrierEngine (Pricing engine for Barrier(p. 180) options using analytical for-
mulae ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
AnalyticEuropeanBinaryEngine (Pricing engine for European binary options using an-
alytic formulae ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
AnalyticEuropeanEngine (Pricing engine for European options using analytical formu-
lae ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
Arguments (Base class for generic argument groups ) . . . . . . . . . . . . . . . . . . . . 169
ArithmeticAPOPathPricer_old (path pricer for arithmetic average price option ) . . . . 170
ArithmeticASOPathPricer_old (path pricer for arithmetic average strike Asian options ) 171
ArmijoLineSearch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
Array (1-D array used in linear algebra ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
ArrayFormatter (Formats arrays for output ) . . . . . . . . . . . . . . . . . . . . . . . . . 176
AssertionFailedError (Specialized error ) . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
AssetOrNothingPayoff (Binary(p. 195) Asset-Or-Nothing option payoff ) . . . . . . . . 178
AUDLibor (AUD Libor index (Also known as SIBOR, check settlement days) ) . . . . . 179
Barrier (Placeholder for enumerated barrier types ) . . . . . . . . . . . . . . . . . . . . . 180
BarrierEngine (Barrier(p. 180) engine base class ) . . . . . . . . . . . . . . . . . . . . . . . 181
BarrierOption (Barrier(p. 180) option on a single asset ) . . . . . . . . . . . . . . . . . . . 182
BarrierOption (Barrier(p. 180) option ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
BarrierOption::arguments (Arguments(p. 169) for barrier option calculation ) . . . . . . 185
74 QuantLib Class Index
Global definitions and quite a few macros which help porting the code to different compilers
Defines
• #define QL_DUMMY_RETURN(x)
specific per-compiler definitions Is a dummy return statement required?
if (condition)
return validResult;
else
throw HideousError();
96 QuantLib Module Documentation
On the other hand, other compilers will issue a warning if it is present because it cannot be
reached. For the code to be portable this macro should be used after the block.
I/O initialization.
Sometimes, programs compiled with the free Borland compiler will crash miserably upon at-
tempting to write on std::cout. Strangely enough, issuing the instruction
at the beginning of the program will prevent other accesses to std::cout from crashing the program.
This macro, to be called at the beginning of main(), encapsulates the above enchantment for
Borland and is defined as empty for the other compilers.
Some compilers still define math functions them in the global namespace. For the code to be
portable these macros should be used instead of the actual functions.
Defines
• #define QL_SQRT std::sqrt
square root
Some compilers do not give an implementation of yet. For the code to be portable these macros
should be used instead of the corresponding method of std::numeric_limits or the corresponding
macro defined in <limits.h>.
Defines
• #define QL_MIN_INT ((std::numeric_limits<int>::min)())
• #define QL_MAX_INT ((std::numeric_limits<int>::max)())
• #define QL_MIN_DOUBLE -((std::numeric_limits<double>::max)())
• #define QL_MIN_POSITIVE_DOUBLE ((std::numeric_limits<double>::min)())
• #define QL_MAX_DOUBLE ((std::numeric_limits<double>::max)())
• #define QL_EPSILON ((std::numeric_limits<double>::epsilon)())
Some compilers still define time functions in the global namespace. For the code to be portable
these macros should be used instead of the actual functions.
Defines
• #define QL_CLOCK std::clock
clock value
Some compilers still define string functions in the global namespace. For the code to be portable
these macros should be used instead of the actual functions.
Defines
• #define QL_STRLEN std::strlen
string length
Some compilers still define character functions in the global namespace. For the code to be
portable these macros should be used instead of the actual functions.
Defines
• #define QL_TOUPPER std::toupper
convert to uppercase
Some compilers still define i/o functions in the global namespace. For the code to be portable
these macros should be used instead of the actual functions.
Defines
• #define QL_SPRINTF std::sprintf
print to string
Some compilers still do not define std::min and std::max. Moreover, Visual C++ defines them but
for unfathomable reasons garble their names. For the code to be portable these macros should be
used instead of the actual functions.
Defines
• #define QL_MIN std::min
minimum between two elements
Some compilers still do not fully implement the template syntax. These macros can be used to
select between alternate implementations of blocks of code, namely, one that takes advantage of
template programming techniques and a less efficient one which is compatible with all compilers.
Defines
• #define QL_DECLARE_TEMPLATE_SPECIALIZATIONS
Blame Microsoft for this one...
• #define QL_ALLOW_TEMPLATE_METHOD_CALLS 1
Blame Microsoft for this one...
• #define QL_TEMPLATE_METAPROGRAMMING_WORKS 1
Handle<Type1> h1(whatever);
h2 = h1.downcast<Type2>();
For compatibility, a workaround should be implemented (which of course will be less solid or
more comples - as I said, blame Microsoft...)
Some compilers still define the iterator struct outside the std namespace, only partially implement
it, or do not implement it at all. For the code to be portable these macros should be used instead
of the actual functions.
Defines
• #define QL_ITERATOR std::iterator
• #define QL_ITERATOR_TRAITS std::iterator_traits
• #define QL_SPECIALIZE_ITERATOR_TRAITS(T)
• #define QL_REVERSE_ITERATOR(iterator, type) std::reverse_iterator< iterator >
Blame Microsoft for this one...
• #define QL_FULL_ITERATOR_SUPPORT
Custom iterators should be derived from this struct for the code to be portable.
For the code to be portable this macro should be used instead of the actual struct.
When using the QuantLib implementation of iterator_traits or Visual C++ .Net, this macro might
be needed to specialize QL_ITERATOR_TRAITS for a pointer to a user-defined type.
Some compilers (most notably, Visual C++) still do not fully support iterators in their STL
implementation. This macro can be used to select between alternate implementations of blocks
of code, namely, one that takes advantage of full iterator support and a less efficient one which is
compatible with all compilers.
QuantLib Namespace
Documentation
Classes
• class Arguments
base class for generic argument groups
• class Results
base class for generic result groups
• class Array
1-D array used in linear algebra.
• class BlackModel
Black-model for vanilla interest-rate derivatives.
• class CalendarImpl
abstract base class for calendar implementations
• class Calendar
calendar class
• class Calendar::WesternImpl
• class CapFlatVolatilityStructure
Cap/floor flat volatility structure.
108 QuantLib Namespace Documentation
• class CapletForwardVolatilityStructure
Caplet/floorlet forward volatility structure.
• class CashFlow
Base class for cash flows.
• class IntegerFormatter
Formats integers for output.
• class DoubleFormatter
Formats doubles for output.
• class ArrayFormatter
Formats arrays for output.
• class EuroFormatter
Formats amounts in Euro for output.
• class RateFormatter
Formats rates for output.
• class DateFormatter
Formats dates for output.
• class CurrencyFormatter
Formats currencies for output.
• class StringFormatter
Formats strings as lower- or uppercase.
• class Period
Time period described by a number of a given time unit.
• class Date
Concrete date class.
• class DayCounterImpl
abstract base class for day counter implementations
• class DayCounter
day counter class
• class DiffusionProcess
Diffusion process class.
• class BlackScholesProcess
Black-Scholes diffusion process class.
• class OrnsteinUhlenbeckProcess
Ornstein-Uhlenbeck process class.
• class SquareRootProcess
Square-root process class.
• class DiscretizedAsset
Discretized asset class used by numerical methods.
• class DiscretizedDiscountBond
Useful discretized discount bond asset.
• class DiscretizedOption
Discretized option on another asset.
• class Disposable
generic disposable object with move semantics
• class Error
Base error class.
• class AssertionFailedError
Specialized error.
• class PreconditionNotSatisfiedError
Specialized error.
• class PostconditionNotSatisfiedError
Specialized error.
• class IndexError
Specialized error.
• class IllegalArgumentError
Specialized error.
• class IllegalResultError
Specialized error.
• class OutOfMemoryError
Specialized error.
• class Exercise
Exercise(p. 334) class (American, Bermudan or European).
• class AmericanExercise
American exercise class.
• class BermudanExercise
Bermudan exercise class.
• class EuropeanExercise
• class TimeGrid
time grid class
• class Handle
Reference-counted pointer.
• class History
Container for historical data.
• class History::Entry
single datum in history
• class History::const_iterator
random access iterator on history entries
• class Index
purely virtual base class for indexes
• class Instrument
Abstract instrument class.
• class Value
pricing results
• struct Barrier
placeholder for enumerated barrier types
• struct Binary
placeholder for enumerated binary types
• class MarketElement
purely virtual base class for market observables
• class SimpleMarketElement
market element returning a stored value
• class DerivedMarketElement
market element whose value depends on another market element
• class CompositeMarketElement
market element whose value depends on two other market element
• class Null
template class providing a null value for a given type.
• class NumericalMethod
Numerical method (Tree, Finite Differences) base class.
• class Option
base option class
• class Greeks
additional option results
• class Payoff
Option(p. 533) payoff base class.
• class StrikedTypePayoff
• class PlainVanillaPayoff
• class CashOrNothingPayoff
Binary(p. 195) Cash-Or-Nothing option payoff.
• class AssetOrNothingPayoff
Binary(p. 195) Asset-Or-Nothing option payoff.
• class SupersharePayoff
Binary(p. 195) supershare option payoff.
• class PricingEngine
base class for pricing engines
• class Link
Relinkable access to a Handle(p. 390).
• class RelinkableHandle
Globally accessible relinkable pointer.
• class RiskStatistics_old
Risk analysis tool.
• class Schedule
Payment schedule.
• class MakeSchedule
helper class
• class Solver1D
Base class for 1-D solvers.
• class SwaptionVolatilityStructure
Swaption volatility structure.
• class TermStructure
Term structure.
• class ZeroYieldStructure
Zero yield term structure.
• class DiscountStructure
Discount factor term structure.
• class ForwardRateStructure
Forward rate term structure.
• class BlackVolTermStructure
Black Volatility Term structure.
• class BlackVolatilityTermStructure
Black Volatility term structure.
• class BlackVarianceTermStructure
Black Variance term structure.
• class LocalVolTermStructure
Local Volatility Term structure.
Typedefs
• typedef int Day
Day number.
Enumerations
• enum RollingConvention {
Preceding, ModifiedPreceding, Following, ModifiedFollowing,
MonthEndReference }
Rolling conventions.
• enum Currency {
ARS, ATS, AUD, BDT,
BEF, BGL, BRL, BYB,
CAD, CHF, CLP, CNY,
COP, CYP, CZK, DEM,
DKK, EEK, EUR, GBP,
GRD, HKD, HUF, ILS,
INR, IQD, IRR, ISK,
ITL, JPY, KRW, KWD,
LTL, LVL, MTL, MXP,
NOK, NPR, NZD, PKR,
PLN, ROL, SAR, SEK,
SGD, SIT, SKK, THB,
TRL, TTD, TWD, USD,
VEB, ZAR }
Known currencies.
• enum Weekday {
Sunday = 1, Monday = 2, Tuesday = 3, Wednesday = 4,
Thursday = 5, Friday = 6, Saturday = 7 }
• enum Month {
January = 1, February = 2, March = 3, April = 4,
May = 5, June = 6, July = 7, August = 8,
September = 9, October = 10, November = 11, December = 12 }
Month names.
Functions
• double DotProduct (const Array &v1, const Array &v2)
• Disposable< Array > operator+ (const Array &v)
• Disposable< Array > operator- (const Array &v)
• Disposable< Array > operator+ (const Array &v1, const Array &v2)
• Disposable< Array > operator+ (const Array &v1, double a)
• Disposable< Array > operator+ (double a, const Array &v2)
• Disposable< Array > operator- (const Array &v1, const Array &v2)
• Disposable< Array > operator- (const Array &v1, double a)
• Disposable< Array > operator- (double a, const Array &v2)
• Disposable< Array > operator ∗ (const Array &v1, const Array &v2)
• Disposable< Array > operator ∗ (const Array &v1, double a)
• Disposable< Array > operator ∗ (double a, const Array &v2)
• Disposable< Array > operator/ (const Array &v1, const Array &v2)
• Disposable< Array > operator/ (const Array &v1, double a)
• Disposable< Array > operator/ (double a, const Array &v2)
• Disposable< Array > Abs (const Array &v)
• Disposable< Array > Sqrt (const Array &v)
• Disposable< Array > Log (const Array &v)
• Disposable< Array > Exp (const Array &v)
• bool operator== (const Calendar &c1, const Calendar &c2)
• bool operator!= (const Calendar &c1, const Calendar &c2)
• std::ostream & operator<< (std::ostream &stream, const Array &a)
• std::ostream & operator<< (std::ostream &stream, const Math::Matrix &matrix)
• std::ostream & operator<< (std::ostream &stream, const Date &date)
• bool operator== (const Period &p1, const Period &p2)
• bool operator< (const Period &p1, const Period &p2)
• long operator- (const Date &d1, const Date &d2)
• bool operator== (const Date &d1, const Date &d2)
• bool operator!= (const Date &d1, const Date &d2)
• bool operator< (const Date &d1, const Date &d2)
• bool operator<= (const Date &d1, const Date &d2)
• bool operator> (const Date &d1, const Date &d2)
• bool operator>= (const Date &d1, const Date &d2)
• bool operator== (const DayCounter &d1, const DayCounter &d2)
• bool operator!= (const DayCounter &d1, const DayCounter &d2)
• Disposable< Array > CenteredGrid (double center, double dx, Size steps)
• Disposable< Array > BoundedGrid (double xMin, double xMax, Size steps)
Deprecated
use Schedule(p. 588) instead
Deprecated
use MakeSchedule(p. 469) instead
Rolling conventions.
These conventions specify the algorithm used to find the business day which is "closest" to a
given holiday.
Enumeration values:
Preceding Choose the first business day before the given holiday.
ModifiedPreceding Choose the first business day before the given holiday unless it belongs
to a different month, in which case choose the first business day after the holiday.
Following Choose the first business day after the given holiday.
ModifiedFollowing Choose the first business day after the given holiday unless it belongs
to a different month, in which case choose the first business day before the holiday.
MonthEndReference Choose the first business day after the given holiday, if the original date
falls on last business day of month result reverts to first business day before month-end
Known currencies.
Enumeration values:
ARS Argentinian Peso.
ATS Austrian Schillings.
AUD Australian Dollar.
BDT Bangladesh Taka.
BEF Belgian Franc.
BGL Bulgarian Lev.
BRL Brazilian Real.
BYB Belarusian Ruble.
CAD Canadian Dollar.
CHF Swiss Franc.
CLP Chilean Peso.
CNY Chinese Yuan.
COP Colombian Peso.
CYP Cyprus Pound.
CZK Czech Koruna.
DEM German Mark.
DKK Danish Krone.
EEK Estonian Kroon.
EUR Euro.
GBP British Pound.
GRD Greek Drachma.
Day’s serial number MOD 7; WEEKDAY Excel function is the same except for Sunday = 7
Classes
• class Budapest
Budapest calendar
• class Frankfurt
Frankfurt calendar
• class Helsinki
Helsinki calendar
• class Johannesburg
Johannesburg calendar
• class JointCalendar
Joint calendar.
• class London
London calendar
• class Milan
Milan calendar
• class NewYork
New York calendar.
• class NullCalendar
Calendar(p. 235) for reproducing theoretical calculations.
• class Oslo
Oslo calendar
• class Stockholm
Stockholm calendar
• class Sydney
Sydney, calendar (New South Wales, Australia)
• class TARGET
TARGET calendar
• class Tokyo
Tokyo calendar
• class Toronto
Toronto calendar
• class Warsaw
Warsaw calendar
• class Wellington
Wellington calendar
• class Zurich
Zurich calendar
Enumerations
• enum JointCalendarRule { JoinHolidays, JoinBusinessDays }
rules for joining calendars
Enumeration values:
JoinHolidays A date is a holiday for the joint calendar if it is a holiday for any of the given
calendars
JoinBusinessDays A date is a business day for the joint calendar if it is a business day for
any of the given calendars
Classes
• class BPSCalculator
basis point sensitivity (BPS) calculator
• class Coupon
coupon accruing over a fixed period
• class FixedRateCoupon
coupon paying a fixed interest rate
• class FloatingRateCoupon
coupon at par on a term structure
• class InArrearIndexedCoupon
in arrear indexed coupon class
• class IndexedCoupon
base indexed coupon class
• class ParCoupon
coupon at par on a term structure
• class ShortFloatingRateCoupon
short coupon at par on a term structure
• class Short
short indexed coupon
• class SimpleCashFlow
Predetermined cash flow.
• class TimeBasket
Distribution over a number of dates.
• class UpFrontIndexedCoupon
up front indexed coupon class
Functions
• double BasisPointSensitivity (const std::vector< Handle< CashFlow > > &leg, const
RelinkableHandle< TermStructure > &ts)
Collective basis-point sensitivity of a cash-flow sequence.
• std::vector< Handle< CashFlow > > FixedRateCouponVector (const std::vector< double >
&nominals, const std::vector< Rate > &couponRates, const DayCounter &dayCount, const
DayCounter &firstPeriodDayCount, const Schedule &schedule)
helper function building a sequence of fixed rate coupons
Deprecated
use the version taking a Schedule(p. 588) as first argument instead
Deprecated
use the version taking a Schedule(p. 588) as first argument instead
Deprecated
use the version taking a Schedule(p. 588) as first argument instead
10.3.2.4 std::vector< Handle< CashFlow > > FloatingRateCouponVector (const Schedule &
schedule, const std::vector< double > & nominals, const Handle< Indexes::Xibor > &
index, int fixingDays, const std::vector< Spread > & spreads = std::vector<Spread>())
Warning:
The passing of a non-null stub date - i.e., the creation of a short/long first coupon - is currently
disabled.
Todo
A suitable algorithm should be implemented for the calculation of the interpolated index
fixing for a short/long first coupon.
Deprecated
use the version taking a Schedule(p. 588) as first argument instead
Deprecated
use the version taking a Schedule(p. 588) as first argument instead
Deprecated
use the version taking a Schedule(p. 588) as first argument instead
Deprecated
use the version taking a Schedule(p. 588) instead
Classes
• class Actual360
Actual/360 day count convention.
• class Actual365
Actual/365 day count convention.
• class ActualActual
Actual/Actual day count.
• class SimpleDayCounter
Simple day counter for reproducing theoretical calculations.
• class Thirty360
30/360 day count convention
Classes
• class AmericanCondition
• class BoundaryCondition
Abstract boundary condition class for finite difference problems.
• class NeumannBC
Neumann boundary condition (i.e., constant derivative).
• class DirichletBC
Neumann boundary condition (i.e., constant value).
• class BSMOperator
Black-Scholes-Merton differential operator.
• class CrankNicolson
Crank-Nicolson scheme for finite difference methods.
• class DMinus
D− matricial representation
• class DPlus
D+ matricial representation
• class DPlusDMinus
D+ D− matricial representation
• class DZero
D0 matricial representation
• class ExplicitEuler
Forward Euler scheme for finite difference methods.
• class FiniteDifferenceModel
Generic finite difference model.
• class ImplicitEuler
Backward Euler scheme for finite difference methods.
• class MixedScheme
Mixed (explicit/implicit) scheme for finite difference methods.
• class OneFactorOperator
Interest-rate single factor model differential operator.
• class ShoutCondition
Shout option condition.
• class StepCondition
condition to be applied at every time step
• class TridiagonalOperator
Base implementation for tridiagonal operator.
• class TridiagonalOperator::TimeSetter
encapsulation of time-setting logic
Typedefs
• typedef FiniteDifferenceModel< CrankNicolson< TridiagonalOperator > > Standard-
FiniteDifferenceModel
default choice for finite-difference model
Functions
• Disposable< TridiagonalOperator > operator+ (const TridiagonalOperator &D)
• Disposable< TridiagonalOperator > operator- (const TridiagonalOperator &D)
• Disposable< TridiagonalOperator > operator+ (const TridiagonalOperator &D1, const
TridiagonalOperator &D2)
• Disposable< TridiagonalOperator > operator- (const TridiagonalOperator &D1, const
TridiagonalOperator &D2)
• Disposable< TridiagonalOperator > operator ∗ (double a, const TridiagonalOperator &D)
• Disposable< TridiagonalOperator > operator ∗ (const TridiagonalOperator &D, double a)
• Disposable< TridiagonalOperator > operator/ (const TridiagonalOperator &D, double a)
• double valueAtCenter (const Array &a)
mid-point value
Classes
• class AUDLibor
AUD Libor index (Also known as SIBOR, check settlement days)
• class CADLibor
CAD Libor index (Also known as CDOR)
• class CHFLibor
CHF Libor index (Also known as ZIBOR)
• class Euribor
Euribor index
• class GBPLibor
GBP Libor index
• class JPYLibor
JPY Libor index (Also known as TIBOR, check settlement days)
• class USDLibor
USD Libor index
• class Xibor
base class for libor indexes
• class XiborManager
global repository for libor histories
• class ZARLibor
ZAR Libor index (also known as JIBAR)
Classes
• class BarrierOption
Barrier(p. 180) option on a single asset.
• class BarrierOption::arguments
arguments for barrier option calculation
• class BarrierOption::results
results from barrier option calculation
• class BinaryOption
Binary(p. 195) option on a single asset.
• class BinaryOption::arguments
arguments for binary option calculation
• class BinaryOption::results
results from binary option calculation
• class CapFloor
Base class for cap-like instruments.
• class Cap
Concrete cap class.
• class Floor
Concrete floor class.
• class Collar
Concrete cap class.
• class CapFloor::arguments
arguments for cap/floor calculation
• class CapFloor::results
results from cap/floor calculation
• class CliquetOption
currently just a container for arguments and results
• class CliquetOption::arguments
• class ForwardOptionArguments
arguments for forward (strike-resetting) option calculation
• class ForwardVanillaOption
Forward version of a vanilla option.
• class QuantoForwardVanillaOption
Quanto version of a forward vanilla option.
• class QuantoOptionArguments
arguments for quanto option calculation
• class QuantoOptionResults
results from quanto option calculation
• class QuantoVanillaOption
quanto version of a vanilla option
• class SimpleSwap
Simple fixed-rate vs Libor swap.
• class SimpleSwap::arguments
arguments for simple swap calculation
• class SimpleSwap::results
results from swaption calculation
• class Stock
Simple stock class.
• class Swap
Interest rate swap.
• class Swaption
Swaption(p. 625) class.
• class Swaption::arguments
arguments for swaption calculation
• class Swaption::results
results from swaption calculation
• class VanillaOption
Vanilla option (no discrete dividends, no barriers) on a single asset.
• class VanillaOption::arguments
arguments for vanilla option calculation
• class VanillaOption::results
results from vanilla option calculation
Typedefs
• typedef CapFloor VanillaCapFloor
• typedef Cap VanillaCap
• typedef Floor VanillaFloor
• typedef Collar VanillaCollar
Deprecated
use CapFloor(p. 247) instead
Deprecated
use Cap(p. 243) instead
Deprecated
use Floor(p. 357) instead
Deprecated
use Collar(p. 263) instead
Classes
• class BicubicSplineInterpolation
bicubic spline interpolation between discrete points
• class BilinearInterpolation
bilinear interpolation between discrete points
• class CubicSplineInterpolation
cubic spline interpolation between discrete points
• class DiscrepancyStatistics
Statistic tool for sequences with discrepancy calculation.
• class ErrorFunction
Error(p. 325) function.
• class GammaFunction
Gamma function class.
• class GaussianStatistics
Statistics tool for gaussian-assumption risk measures.
• class GeneralStatistics
Statistics tool.
• class IncrementalStatistics
Statistics tool based on incremental accumulation.
• class Interpolation
abstract base class for 1-D interpolations
• class Interpolation2D
abstract base class for 2-D interpolations
• class Linear
linear interpolation traits
• class LogLinear
log-linear interpolation traits
• class CubicSpline
• class KronrodIntegral
Integral of a 1-dimensional function using the Gauss-Kronrod method.
• class LexicographicalView
Lexicographical 2-D view of a contiguous set of data.
• class LinearInterpolation
linear interpolation between discrete points
• class LogLinearInterpolation
log linear interpolation between discrete points
• class Matrix
matrix used in linear algebra.
• class MultivariateAccumulator
A sample accumulator for multivariate analysis.
• class NormalDistribution
Normal distribution function.
• class CumulativeNormalDistribution
Cumulative normal distribution function.
• class InverseCumulativeNormal
Inverse cumulative normal distribution function.
• class MoroInverseCumulativeNormal
Moro Inverse cumulative normal distribution class.
• class PrimeNumbers
Prime numbers calculator.
• class RiskMeasures
• class GenericRiskStatistics
empirical-distribution risk measures
• class SegmentIntegral
Integral of a one-dimensional function.
• class SequenceStatistics
Statistics analysis of N-dimensional (sequence) data.
• class SimpsonIntegral
Integral of a one-dimensional function.
• class SVD
Singular Value(p. 662) Decomposition.
• class SymmetricSchurDecomposition
symmetric threshold Jacobi algorithm.
• class TrapezoidIntegral
Integral of a one-dimensional function.
Typedefs
• typedef NormalDistribution GaussianDistribution
• typedef InverseCumulativeNormal InvCumulativeNormalDistribution
• typedef GaussianStatistics< GenericRiskStatistics< GeneralStatistics > > RiskStatistics
default risk measures tool
Enumerations
• enum SalvagingAlgorithm { None, Spectral, Hypersphere }
Functions
• template<class F, class R> clipped_function< F, R > clip (const F &f, const R &r)
• template<class F, class G> composed_function< F, G > compose (const F &f, const G &g)
• Disposable< Matrix > pseudoSqrt (const Matrix &realSymmMatrix, SalvagingAlgorithm
sa)
• Disposable< Matrix > operator+ (const Matrix &m1, const Matrix &m2)
• Disposable< Matrix > operator- (const Matrix &m1, const Matrix &m2)
• Disposable< Matrix > operator ∗ (const Matrix &m, double x)
• Disposable< Matrix > operator ∗ (double x, const Matrix &m)
• Disposable< Matrix > operator/ (const Matrix &m, double x)
• Disposable< Array > operator ∗ (const Array &v, const Matrix &m)
• Disposable< Array > operator ∗ (const Matrix &m, const Array &v)
• Disposable< Matrix > operator ∗ (const Matrix &m1, const Matrix &m2)
• Disposable< Matrix > transpose (const Matrix &m)
• Disposable< Matrix > outerProduct (const Array &v1, const Array &v2)
• template<class Iterator1, class Iterator2> Disposable< Matrix > outerProduct (Iterator1
v1begin, Iterator1 v1end, Iterator2 v2begin, Iterator2 v2end)
• Disposable< Matrix > matrixSqrt (const Matrix &m)
• double hypot (const double &a, const double &b)
Singular Value(p. 662) Decomposition.
Returns:
hypotenuse of real (non-complex) scalars a and b by avoiding underflow/overflow using (a
∗ sqrt( 1 + (b/a) ∗ (b/a))), rather than sqrt(a∗a + b∗b).
Classes
• class ArithmeticAPOPathPricer_old
path pricer for arithmetic average price option
• class ArithmeticASOPathPricer_old
path pricer for arithmetic average strike Asian options
• class BarrierPathPricer
path pricer for Barrier(p. 180) options
• class BasketPathPricer_old
multipath pricer for European-type basket option
• class BiasedBarrierPathPricer
Biased, but simple, path pricer for Barrier(p. 180) options
• class BinaryPathPricer
path pricer for Binary(p. 195) options
• class BrownianBridge
Builds Wiener process paths using Gaussian variates.
• class CliquetOptionPathPricer
path pricer for cliquet options
• class CliquetOptionPathPricer_old
path pricer for cliquet options
• class EuropeanPathPricer
path pricer for European options
• class EuropeanPathPricer_old
path pricer for European options
• class EverestPathPricer_old
path pricer for European-type Everest option
• class GeometricAPOPathPricer_old
path pricer for geometric average price option
• class GeometricASOPathPricer_old
• class HimalayaPathPricer_old
multipath pricer for European-type Himalaya option
• class MaxBasketPathPricer_old
multipath pricer for European-type basket option
• class MonteCarloModel
General purpose Monte Carlo model for path samples.
• class MultiPath
single random walk
• class MultiPathGenerator
Generates a multipath from a random number generator.
• class MultiPathGenerator_old
Generates a multipath from a random number generator.
• class PagodaPathPricer_old
multipath pricer for pagoda options
• class Path
single factor random walk
• class PathGenerator
Generates random paths using a sequence generator.
• class PathGenerator_old
Generates random paths from a random number generator.
• class PathPricer
base class for path pricers
• class PathPricer_old
base class for path pricers
• class PerformanceOptionPathPricer_old
path pricer for performance options
• struct Sample
weighted sample
Typedefs
• typedef GenericPseudoRandom< RandomNumbers::MersenneTwisterUniformRng,
Math::InverseCumulativeNormal > PseudoRandom
Functions
• template<class DataIterator> Disposable< Math::Matrix > getCovariance (DataIterator
volBegin, DataIterator volEnd, const Math::Matrix &corr)
Combines the correlation matrix and the vector of volatilities to return the covariance matrix.
Note that only the symmetric part of the correlation matrix is used. Also it is assumed that the
diagonal member of the correlation matrix equals one.
Classes
• class Bridge
The Bridge(p. 230) pattern made explicit.
• class CuriouslyRecurringTemplate
Support for the curiously recurring template pattern.
• class LazyObject
Framework for calculation on demand and result caching.
• class Observable
Object that notifies its changes to a set of observables.
• class Observer
Object that gets notified when a given observable changes.
• class AcyclicVisitor
degenerate base class for the Acyclic Visitor(p. 672) pattern
• class Visitor
visitor for a specific class
Classes
• class AnalyticalCapFloor
Analytical pricer for cap/floor.
• class BarrierOption
Barrier(p. 180) option.
• class BinaryOption
Binary(p. 195) (digital) option.
• class BlackCapFloor
CapFloor priced by the Black formula.
• class BlackSwaption
Swaption priced by the Black formula.
• class CliquetOption
cliquet (Ratchet) option
• class ContinuousGeometricAPO
Continuous Geometric Average Price Option(p. 533) (European exercise).
• class DiscreteGeometricAPO
Discrete Geometric Average Price Asian Option(p. 533) (European style).
• class DiscreteGeometricASO
Discrete Geometric Average Strike Asian Option(p. 533) (European style).
• class EuropeanOption
Black-Scholes-Merton European option.
• class FdAmericanOption
• class FdBermudanOption
Bermudan option.
• class FdBsmOption
Black-Scholes-Merton option priced numerically.
• class FdDividendEuropeanOption
European option with dividends.
• class FdDividendShoutOption
Shout option with dividends.
• class FdEuropean
Example of European option calculated using finite differences.
• class FdStepConditionOption
option executing additional code at each time step
• class JamshidianSwaption
Jamshidian swaption pricer.
• class McBasket
simple example of multi-factor Monte Carlo pricer
• class McCliquetOption
simple example of Monte Carlo pricer
• class McDiscreteArithmeticAPO
example of Monte Carlo pricer using a control variate
• class McDiscreteArithmeticASO
example of Monte Carlo pricer using a control variate.
• class McEuropean
simple example of Monte Carlo pricer
• class McEverest
Everest-type option pricer.
• class McHimalaya
Himalayan-type option pricer.
• class McMaxBasket
simple example of multi-factor Monte Carlo pricer
• class McPagoda
roofed Asian option
• class McPerformanceOption
Performance option computed using Monte Carlo simulation.
• class McPricer
base class for Monte Carlo pricers
• class PerformanceOption
Performance option.
• class SingleAssetOption
Black-Scholes-Merton option.
• class TreeCapFloor
Cap/Floor priced in a tree.
• class TreeSwaption
Swaption priced on a lattice.
Classes
• class BoxMullerGaussianRng
Gaussian random number generator.
• class CLGaussianRng
Gaussian random number generator.
• class HaltonRsg
Halton low-discrepancy sequence generator.
• class ICGaussianRng
Inverse cumulative Gaussian random number generator.
• class ICGaussianRsg
Inverse cumulative Gaussian random sequence generator.
• class KnuthUniformRng
Uniform random number generator.
• class LecuyerUniformRng
Uniform random number generator.
• class MersenneTwisterUniformRng
Uniform random number generator.
• class RandomArrayGenerator
Generates random arrays using a random number generator.
• class RandomSequenceGenerator
Random sequence generator based on a pseudo-random number generator.
• class SobolRsg
Sobol low-discrepancy sequence generator.
Typedefs
• typedef MonteCarlo::PseudoRandom::urng_type UniformRandomGenerator
default choice for uniform random number generator.
Classes
• class CalibrationHelper
liquid market instrument used during calibration
• class CalibrationSet
Set of calibration instruments.
• class AffineModel
Affine model class.
• class TermStructureConsistentModel
Term-structure consistent model class.
• class Model
Abstract short-rate model class.
• class OneFactorModel
Single-factor short-rate model abstract class.
• class OneFactorModel::ShortRateDynamics
Base class describing the short-rate dynamics.
• class OneFactorModel::ShortRateTree
Recombining trinomial tree discretizing the state variable.
• class OneFactorAffineModel
Single-factor affine base class.
• class BlackKarasinski
Standard Black-Karasinski model class.
• class BlackKarasinski::Dynamics
Short-rate dynamics in the Black-Karasinski model.
• class CoxIngersollRoss
Cox-Ingersoll-Ross model class.
• class CoxIngersollRoss::Dynamics
Dynamics(p. 280) of the short-rate under the Cox-Ingersoll-Ross model.
• class ExtendedCoxIngersollRoss
• class ExtendedCoxIngersollRoss::Dynamics
Short-rate dynamics in the extended Cox-Ingersoll-Ross model.
• class ExtendedCoxIngersollRoss::FittingParameter
Analytical term-structure fitting parameter ϕ(t).
• class HullWhite
Single-factor Hull-White (extended Vasicek(p. 669)) model class.
• class HullWhite::Dynamics
Short-rate dynamics in the Hull-White model.
• class HullWhite::FittingParameter
Analytical term-structure fitting parameter ϕ(t).
• class Vasicek
Vasicek(p. 669) model class.
• class Vasicek::Dynamics
Short-rate dynamics in the Vasicek(p. 669) model.
• class ParameterImpl
Base class for model parameter implementation.
• class Parameter
Base class for model arguments.
• class ConstantParameter
Standard constant parameter a(t) = a.
• class NullParameter
Parameter(p. 539) which is always zero a(t) = 0.
• class PiecewiseConstantParameter
Piecewise constant parameter.
• class TermStructureFittingParameter
Deterministic time-dependent parameter used for yield-curve fitting.
• class TwoFactorModel
Abstract base-class for two-factor models.
• class TwoFactorModel::ShortRateDynamics
Class describing the dynamics of the two state variables.
• class TwoFactorModel::ShortRateTree
Recombining two-dimensional tree discretizing the state variable.
• class G2
Two-additive-factor gaussian model class.
• class G2::FittingParameter
Analytical term-structure fitting parameter ϕ(t).
Classes
• class Bisection
bisection 1-D solver
• class Brent
Brent 1-D solver
• class FalsePosition
False position 1-D solver.
• class Newton
Newton 1-D solver
• class NewtonSafe
safe Newton 1-D solver
• class Ridder
Ridder 1-D solver
• class Secant
secant 1-D solver
Classes
• class AffineTermStructure
Term-structure implied by an affine model.
• class DiscountCurve
Term structure based on loglinear interpolation of discount factors.
• class DriftTermStructure
Drift term structure.
• class ExtendedDiscountCurve
Term structure based on loglinear interpolation of discount factors.
• class ForwardSpreadedTermStructure
Term structure with added spread on the instantaneous forward rate.
• class ImpliedTermStructure
Implied term structure at a given date in the future.
• class PiecewiseFlatForward
Piecewise flat forward term structure.
• class QuantoTermStructure
Quanto term structure.
• class RateHelper
base class for rate helpers
• class DepositRateHelper
Deposit rate.
• class FraRateHelper
Forward rate agreement.
• class FuturesRateHelper
Interest Rate Futures.
• class SwapRateHelper
Swap rate.
• class ZeroCurve
• class ZeroSpreadedTermStructure
Term structure with an added spread on the zero yield rate.
Classes
• class combining_iterator
Iterator mapping a function to a set of underlying sequences.
• class coupling_iterator
Iterator mapping a function to a pair of underlying sequences.
• class filtering_iterator
Iterator filtering undesired data.
• struct lowest_category_iterator
most generic of two given iterator categories
• class processing_iterator
Iterator mapping a unary function to an underlying sequence.
• class stepping_iterator
Iterator advancing in constant steps.
Functions
• template<class I, class F> combining_iterator< typename 1< I >::value_type, F > make_-
combining_iterator (I it1, I it2, F f)
• template<class It1, class It2, class Function> coupling_iterator< It1, It2, Function > make_-
coupling_iterator (It1 it1, It2 it2, Function f)
• template<class Iterator, class UnaryPredicate> filtering_iterator< Iterator, UnaryPredicate
> make_filtering_iterator (Iterator it, UnaryPredicate p, Iterator beforeBegin, Iterator end)
• template<class I, class F> processing_iterator< I, F > make_processing_iterator (I it, F p)
Classes
• class BlackConstantVol
Constant Black volatility, no time-strike dependence.
• class BlackVarianceCurve
Black volatility curve modelled as variance curve.
• class BlackVarianceSurface
Black volatility surface modelled as variance surface.
• class ImpliedVolTermStructure
Implied vol term structure at a given date in the future.
• class LocalConstantVol
Constant local volatility, no time-strike dependence.
• class LocalVolCurve
Local volatility curve derived from a Black curve.
• class LocalVolSurface
Local volatility surface derived from a Black vol surface.
DayCounter
Actual360
• ql/DayCounters/actual360.hpp
154 QuantLib Class Documentation
DayCounter
Actual365
• ql/DayCounters/actual365.hpp
DayCounter
ActualActual
Public Types
• enum Convention {
ISMA, Bond, ISDA, Historical,
AFB, Euro }
The documentation for this class was generated from the following files:
• ql/DayCounters/actualactual.hpp
• ql/DayCounters/actualactual.cpp
AcyclicVisitor
BPSCalculator
• ql/Patterns/visitor.hpp
Tree
BinomialTree
EqualProbabilitiesBinomialTree
AdditiveEQPBinomialTree
The documentation for this class was generated from the following files:
• ql/Lattices/binomialtree.hpp
• ql/Lattices/binomialtree.cpp
AffineModel
G2 OneFactorAffineModel
CoxIngersollRoss Vasicek
ExtendedCoxIngersollRoss HullWhite
• virtual double discountBondOption (Option::Type type, double strike, Time maturity, Time
bondMaturity) const =0
The documentation for this class was generated from the following file:
• ql/ShortRateModels/model.hpp
Observable
TermStructure
DiscountStructure Observer
AffineTermStructure
• void update ()
This method must be implemented in derived classes. An instance of Observer does not call this
method directly: instead, it will be called by the observables the instance registered with when
they need to notify any changes.
Implements Observer (p. 527).
The documentation for this class was generated from the following files:
• ql/TermStructures/affinetermstructure.hpp
• ql/TermStructures/affinetermstructure.cpp
StandardStepCondition
AmericanCondition
The documentation for this class was generated from the following file:
• ql/FiniteDifferences/americancondition.hpp
Exercise
AmericanExercise
The documentation for this class was generated from the following files:
• ql/exercise.hpp
• ql/exercise.cpp
PricingEngine
VanillaEngine
AmericanMCVanillaEngine
Unstable
This engine is known not to work for deeply out-of-the-money options. More problems
might surface.
The documentation for this class was generated from the following files:
• ql/PricingEngines/americanmcengines.hpp
• ql/PricingEngines/americanmcengines.cpp
The documentation for this class was generated from the following files:
• ql/Pricers/analyticalcapfloor.hpp
• ql/Pricers/analyticalcapfloor.cpp
PricingEngine
BinaryEngine
AnalyticAmericanBinaryEngine
The documentation for this class was generated from the following files:
• ql/PricingEngines/binaryengines.hpp
• ql/PricingEngines/analyticamericanbinaryengine.cpp
PricingEngine
BarrierEngine
AnalyticBarrierEngine
The documentation for this class was generated from the following files:
• ql/PricingEngines/barrierengines.hpp
• ql/PricingEngines/analyticbarrierengine.cpp
PricingEngine
BinaryEngine
AnalyticEuropeanBinaryEngine
The documentation for this class was generated from the following files:
• ql/PricingEngines/binaryengines.hpp
• ql/PricingEngines/analyticeuropeanbinaryengine.cpp
PricingEngine
VanillaEngine
AnalyticEuropeanEngine
The documentation for this class was generated from the following files:
• ql/PricingEngines/vanillaengines.hpp
• ql/PricingEngines/analyticeuropeanengine.cpp
Arguments
The documentation for this class was generated from the following file:
• ql/argsandresults.hpp
ArithmeticAPOPathPricer_old
The documentation for this class was generated from the following files:
• ql/MonteCarlo/arithmeticapopathpricer.hpp
• ql/MonteCarlo/arithmeticapopathpricer.cpp
ArithmeticASOPathPricer_old
The documentation for this class was generated from the following files:
• ql/MonteCarlo/arithmeticasopathpricer.hpp
• ql/MonteCarlo/arithmeticasopathpricer.cpp
LineSearch
ArmijoLineSearch
Armijo linesearch.
Let alpha and beta be 2 scalars in [0,1]. Let x be the current value of the unknow, d the search
direction and t the step. Let f be the function to minimize. The line search stop when t verifies
f(x+t∗d) - f(x) <= -alpha∗t∗f’(x+t∗d) and f(x+t/beta∗d) - f(x) > -alpha∗t∗f’(x+t∗d)/beta
(see Polak. Algorithms and consitent approximations, Optimization, volume 124 of Applied
Mathematical Sciences. Springer-Arrayerlag, N-Y, 1997)
• virtual ∼ArmijoLineSearch ()
Destructor.
The documentation for this class was generated from the following files:
• ql/Optimization/armijo.hpp
• ql/Optimization/armijo.cpp
Public Types
• typedef double ∗ iterator
• typedef const double ∗ const_iterator
Vector algebra
v += x and similar operation involving a scalar value are shortcuts for ∀i : vi = vi + x
v ∗= w and similar operation involving two vectors are shortcuts for ∀i : vi = vi × wi
Precondition:
all arrays involved in an algebraic expression must have the same size.
Element access
Inspectors
Iterator access
Utilities
Related Functions
The documentation for this class was generated from the following files:
• ql/array.hpp
• ql/dataformatters.hpp
The documentation for this class was generated from the following file:
• ql/dataformatters.hpp
Error
AssertionFailedError
Specialized error.
Thrown upon a failed assertion.
The documentation for this class was generated from the following file:
• ql/errors.hpp
Payoff
StrikedTypePayoff
AssetOrNothingPayoff
The documentation for this class was generated from the following file:
• ql/payoff.hpp
Observable
Index Observer
Xibor
AUDLibor
The documentation for this class was generated from the following file:
• ql/Indexes/audlibor.hpp
Public Types
• enum Type { DownIn, UpIn, DownOut, UpOut }
The documentation for this struct was generated from the following file:
• ql/Instruments/barrieroption.hpp
PricingEngine
BarrierEngine
AnalyticBarrierEngine MCBarrierEngine
• ql/PricingEngines/barrierengines.hpp
Observable Observer
LazyObject
Instrument
Option
BarrierOption
greeks
Protected Attributes
• double delta_
• double gamma_
• double theta_
• double vega_
• double rho_
• double dividendRho_
• double strikeSensitivity_
• Barrier::Type barrierType_
• double barrier_
• double rebate_
• Option::Type type_
• RelinkableHandle< MarketElement > underlying_
• double strike_
• Exercise exercise_
• RelinkableHandle< TermStructure > riskFreeTS_
• RelinkableHandle< TermStructure > dividendTS_
• RelinkableHandle< BlackVolTermStructure > volTS_
When a derived argument structure is defined for an instrument, this method should be overrid-
den to fill it. This is mandatory in case a pricing engine is used.
Reimplemented from Instrument (p. 423).
This method must leave the instrument in a consistent state when the expiration condition is met.
Reimplemented from Instrument (p. 424).
In case a pricing engine is not used, this method must be overridden to perform the actual calcu-
lations and set any needed results. In case a pricing engine is used, the default implementation
can be used.
Reimplemented from Instrument (p. 424).
The documentation for this class was generated from the following files:
• ql/Instruments/barrieroption.hpp
• ql/Instruments/barrieroption.cpp
SingleAssetOption
BarrierOption
Deprecated
use Instruments::BarrierOption(p. 182) instead.
Protected Attributes
• double greeksCalculated_
• double delta_
• double gamma_
• double theta_
The documentation for this class was generated from the following files:
• ql/Pricers/barrieroptionpricer.hpp
• ql/Pricers/barrieroptionpricer.cpp
Arguments
arguments
BarrierOption::arguments
Public Attributes
• Barrier::Type barrierType
• double barrier
• double rebate
The documentation for this class was generated from the following file:
• ql/Instruments/barrieroption.hpp
Results
Value Greeks
results
BarrierOption::results
• ql/Instruments/barrieroption.hpp
BarrierPathPricer
The documentation for this class was generated from the following files:
• ql/MonteCarlo/barrierpathpricer.hpp
• ql/MonteCarlo/barrierpathpricer.cpp
BasketPathPricer_old
The documentation for this class was generated from the following files:
• ql/MonteCarlo/basketpathpricer.hpp
• ql/MonteCarlo/basketpathpricer.cpp
Exercise
BermudanExercise
The documentation for this class was generated from the following files:
• ql/exercise.hpp
• ql/exercise.cpp
BiasedBarrierPathPricer
The documentation for this class was generated from the following files:
• ql/MonteCarlo/biasedbarrierpathpricer.hpp
• ql/MonteCarlo/biasedbarrierpathpricer.cpp
BicubicSplineInterpolation
Public Types
• typedef double result_type
Public Attributes
• typedef< RandomAccessIteratorX >::value_type first_argument_type
• typedef< RandomAccessIteratorY >::value_type second_argument_type
Precondition:
The sequence of values for x must have been sorted for the result to make sense.
• ql/Math/bicubicsplineinterpolation.hpp
BilinearInterpolation
Public Types
• typedef double result_type
Public Attributes
• typedef< RandomAccessIteratorX >::value_type first_argument_type
• typedef< RandomAccessIteratorY >::value_type second_argument_type
Precondition:
The sequence of values for x must have been sorted for the result to make sense.
• ql/Math/bilinearinterpolation.hpp
Public Types
• enum Type { CashAtHit, CashAtExpiry }
The documentation for this struct was generated from the following file:
• ql/Instruments/binaryoption.hpp
PricingEngine
BinaryEngine
• ql/PricingEngines/binaryengines.hpp
Observable Observer
LazyObject
Instrument
Option
BinaryOption
greeks
Protected Attributes
• double delta_
• double gamma_
• double theta_
• double vega_
• double rho_
• double dividendRho_
• double strikeSensitivity_
• Binary::Type binaryType_
• double barrier_
• double cashPayoff_
• Option::Type type_
• RelinkableHandle< MarketElement > underlying_
• Exercise exercise_
• RelinkableHandle< TermStructure > riskFreeTS_
• RelinkableHandle< TermStructure > dividendTS_
• RelinkableHandle< BlackVolTermStructure > volTS_
When a derived argument structure is defined for an instrument, this method should be overrid-
den to fill it. This is mandatory in case a pricing engine is used.
Reimplemented from Instrument (p. 423).
This method must leave the instrument in a consistent state when the expiration condition is met.
Reimplemented from Instrument (p. 424).
In case a pricing engine is not used, this method must be overridden to perform the actual calcu-
lations and set any needed results. In case a pricing engine is used, the default implementation
can be used.
Reimplemented from Instrument (p. 424).
The documentation for this class was generated from the following files:
• ql/Instruments/binaryoption.hpp
• ql/Instruments/binaryoption.cpp
SingleAssetOption
BinaryOption
Deprecated
use Instruments::BarrierOption(p. 182) instead.
The documentation for this class was generated from the following files:
• ql/Pricers/binaryoptionpricer.hpp
• ql/Pricers/binaryoptionpricer.cpp
Arguments
arguments
BinaryOption::arguments
Public Attributes
• Binary::Type binaryType
• double barrier
• double cashPayoff
The documentation for this class was generated from the following files:
• ql/Instruments/binaryoption.hpp
• ql/Instruments/binaryoption.cpp
Results
Value Greeks
results
BinaryOption::results
• ql/Instruments/binaryoption.hpp
BinaryPathPricer
The documentation for this class was generated from the following files:
• ql/MonteCarlo/binarypathpricer.hpp
• ql/MonteCarlo/binarypathpricer.cpp
Tree
BinomialTree
Protected Attributes
• double x0_
• double driftPerStep_
• Time dt_
The documentation for this class was generated from the following files:
• ql/Lattices/binomialtree.hpp
• ql/Lattices/binomialtree.cpp
PricingEngine
VanillaEngine
BinomialVanillaEngine
Public Types
• enum Type {
CoxRossRubinstein, JarrowRudd, EQP, Trigeorgis,
Tian }
The documentation for this class was generated from the following files:
• ql/PricingEngines/vanillaengines.hpp
• ql/PricingEngines/binomialvanillaengine.cpp
Bisection
The documentation for this class was generated from the following file:
• ql/Solvers1D/bisection.hpp
PricingEngine
BlackCapFloor
The documentation for this class was generated from the following files:
• ql/Pricers/blackcapfloor.hpp
• ql/Pricers/blackcapfloor.cpp
Observable
BlackVolTermStructure
BlackVolatilityTermStructure Observer
BlackConstantVol
BlackVolTermStructure interface
• double blackForwardVol (Time t1, Time t2, double strike, bool extrapolate=false) const
future (a.k.a. forward) volatility
Observer interface
• void update ()
Visitability
This method must be implemented in derived classes. An instance of Observer does not call this
method directly: instead, it will be called by the observables the instance registered with when
they need to notify any changes.
Implements Observer (p. 527).
The documentation for this class was generated from the following file:
• ql/Volatilities/blackconstantvol.hpp
Observer Observable
Model
OneFactorModel TermStructureConsistentModel
BlackKarasinski
The documentation for this class was generated from the following files:
• ql/ShortRateModels/OneFactorModels/blackkarasinski.hpp
• ql/ShortRateModels/OneFactorModels/blackkarasinski.cpp
The documentation for this class was generated from the following file:
• ql/ShortRateModels/OneFactorModels/blackkarasinski.hpp
Observable Observer
BlackModel
This method must be implemented in derived classes. An instance of Observer does not call this
method directly: instead, it will be called by the observables the instance registered with when
they need to notify any changes.
Implements Observer (p. 527).
Black formula.
Returns
Black( f, k, v, w) = f wΦ(wd1 ( f, k, v)) − kwΦ(wd2 ( f, k, v)),
where
ln( f /k) + v2 /2
d1 ( f, k, v) =
v
and
d2 ( f, k, v) = d1 ( f, k, v) − v.
The documentation for this class was generated from the following file:
• ql/blackmodel.hpp
NumericalMethod
Lattice
BlackScholesLattice
The documentation for this class was generated from the following files:
• ql/Lattices/bsmlattice.hpp
• ql/Lattices/bsmlattice.cpp
DiffusionProcess
BlackScholesProcess
σ(t, S)2
dS(t, S) = (r(t) − q(t) − )dt + σdWt .
2
The documentation for this class was generated from the following files:
• ql/diffusionprocess.hpp
• ql/diffusionprocess.cpp
PricingEngine
BlackSwaption
The documentation for this class was generated from the following files:
• ql/Pricers/blackswaption.hpp
• ql/Pricers/blackswaption.cpp
Observable
BlackVolTermStructure
BlackVarianceTermStructure Observer
BlackVarianceCurve
BlackVolTermStructure interface
Modifiers
Observer interface
• void update ()
Visitability
This method must be implemented in derived classes. An instance of Observer does not call this
method directly: instead, it will be called by the observables the instance registered with when
they need to notify any changes.
Implements Observer (p. 527).
The documentation for this class was generated from the following files:
• ql/Volatilities/blackvariancecurve.hpp
• ql/Volatilities/blackvariancecurve.cpp
Observable
BlackVolTermStructure
BlackVarianceTermStructure Observer
BlackVarianceSurface
Public Types
• enum Extrapolation { ConstantExtrapolation, InterpolatorDefaultExtrapolation }
BlackVolTermStructure interface
Modifiers
Observer interface
• void update ()
Visitability
This method must be implemented in derived classes. An instance of Observer does not call this
method directly: instead, it will be called by the observables the instance registered with when
they need to notify any changes.
Implements Observer (p. 527).
The documentation for this class was generated from the following files:
• ql/Volatilities/blackvariancesurface.hpp
• ql/Volatilities/blackvariancesurface.cpp
Observable
BlackVolTermStructure
BlackVarianceTermStructure
11.57.2.1 double blackVolImpl (Time maturity, double strike, bool extrapolate = false) const
[protected, virtual]
Returns the volatility for the given strike and date calculating it from the variance.
Implements BlackVolTermStructure (p. 223).
The documentation for this class was generated from the following files:
• ql/voltermstructure.hpp
• ql/voltermstructure.cpp
Observable
BlackVolTermStructure
BlackVolatilityTermStructure
BlackConstantVol
11.58.2.1 double blackVarianceImpl (Time maturity, double strike, bool extrapolate = false)
const [protected, virtual]
Returns the variance for the given strike and date calculating it from the volatility.
Implements BlackVolTermStructure (p. 223).
The documentation for this class was generated from the following files:
• ql/voltermstructure.hpp
• ql/voltermstructure.cpp
Observable
BlackVolTermStructure
BlackVarianceTermStructure BlackVolatilityTermStructure
• double blackVol (const Date &maturity, double strike, bool extrapolate=false) const
present (a.k.a spot) volatility
• double blackVariance (const Date &maturity, double strike, bool extrapolate=false) const
• double blackForwardVol (const Date &date1, const Date &date2, double strike, bool
extrapolate=false) const
future (a.k.a. forward) volatility
• double blackForwardVol (Time time1, Time time2, double strike, bool extrapolate=false)
const
future (a.k.a. forward) volatility
• double blackForwardVariance (const Date &date1, const Date &date2, double strike,
bool extrapolate=false) const
• double blackForwardVariance (Time time1, Time time2, double strike, bool extrapo-
late=false) const
future (a.k.a. forward) variance
Dates
Visitability
The documentation for this class was generated from the following files:
• ql/voltermstructure.hpp
• ql/voltermstructure.cpp
Public Types
• typedef Operator operatorType
• typedef Operator::arrayType arrayType
• enum Side { None, Upper, Lower }
Todo
Generalize for n-dimensional conditions
This method modifies an operator L before it is applied to an array u so that v = Lu will satisfy
the given condition.
11.60.3.3 virtual void applyBeforeSolving (operatorType &, arrayType & rhs) const [pure
virtual]
This method modifies an operator L before the linear system Lu0 = u is solved so that u0 will
satisfy the given condition.
This method sets the current time for time-dependent boundary conditions.
Implemented in NeumannBC (p. 511), and DirichletBC (p. 300).
The documentation for this class was generated from the following file:
• ql/FiniteDifferences/boundarycondition.hpp
Constraint
BoundaryConstraint
The documentation for this class was generated from the following file:
• ql/Optimization/constraint.hpp
Public Types
• typedef MonteCarlo::Sample< double > sample_type
Deprecated
initialize with a random number generator instead.
The documentation for this class was generated from the following file:
• ql/RandomNumbers/boxmullergaussianrng.hpp
BPSCalculator
Visitor interface
The documentation for this class was generated from the following files:
• ql/CashFlows/basispointsensitivity.hpp
• ql/CashFlows/basispointsensitivity.cpp
Brent
The documentation for this class was generated from the following file:
• ql/Solvers1D/brent.hpp
class FooImpl;
class Foo : public Bridge<Foo,FooImpl> {
...
};
which makes it possible to pass instances of class Foo by value while retaining polymorphic
behavior.
Public Types
• typedef T_impl Impl
Protected Attributes
• Handle< Impl > impl_
The documentation for this class was generated from the following file:
• ql/Patterns/bridge.hpp
Public Types
• typedef Sample< std::vector< double > > sample_type
• BrownianBridge (const std::vector< double > &sigma, const TimeGrid &timeGrid, GSG
generator)
general Wiener process paths
inspectors
The documentation for this class was generated from the following file:
• ql/MonteCarlo/brownianbridge.hpp
TridiagonalOperator
BSMOperator
The documentation for this class was generated from the following files:
• ql/FiniteDifferences/bsmoperator.hpp
• ql/FiniteDifferences/bsmoperator.cpp
Calendar
Budapest
Budapest calendar
Holidays:
• Saturdays
• Sundays
• Easter Monday
• Whit(Pentecost) Monday
• New Year’s Day, January 1st
• National Day, March 15th
• Labour Day, May 1st
• Constitution Day, August 20th
• Republic Day, October 23rd
• All Saints Day, November 1st
• Christmas, December 25th
• 2nd Day of Christmas, December 26th
The documentation for this class was generated from the following file:
• ql/Calendars/budapest.hpp
Observable
Index Observer
Xibor
CADLibor
Todo
check settlement days
The documentation for this class was generated from the following file:
• ql/Indexes/cadlibor.hpp
Budapest
Frankfurt
Helsinki
Johannesburg
JointCalendar
London
Milan
NewYork
NullCalendar
Bridge< Calendar, CalendarImpl > Calendar
Oslo
Stockholm
Sydney
TARGET
Tokyo
Toronto
Warsaw
Wellington
Zurich
calendar class
This class provides methods for determining whether a date is a business day or a holiday for a
given market, and for incrementing/decrementing a date of a given number of business days.
The Bridge pattern is used to provide the base behavior of the calendar, namely, to determine
whether a date is a business day.
Calendar interface
Related Functions
11.70.2.1 Calendar ()
This default constructor returns a calendar with a null implementation, which is therefore unus-
able except as a placeholder.
This protected constructor will only be invoked by derived classes which define a given Calen-
dar(p. 235) implementation
Warning:
This method is used for output and comparison between calendars. It is not meant to be
used for writing switch-on-type code.
Returns true iff the date is a business day for the given market.
Returns true iff the date is last business day for the month in given market.
Returns true iff the date is a holiday for the given market.
11.70.3.5 Date roll (const Date &, RollingConvention convention = Following, const Date &
origin = Date()) const
Returns the next business day on the given market with respect to the given date and convention.
11.70.3.6 Date advance (const Date &, int n, TimeUnit unit, RollingConvention convention =
Following) const
Advances the given date of the given number of business days and returns the result.
Note:
The input date is not modified.
11.70.3.7 Date advance (const Date & date, const Period & period, RollingConvention
convention) const
Advances the given date as specified by the given period and returns the result.
Note:
The input date is not modified.
11.70.4.1 bool operator== (const Calendar &, const Calendar &) [related]
Returns true iff the two calendars belong to the same derived class.
The documentation for this class was generated from the following files:
• ql/calendar.hpp
• ql/calendar.cpp
CalendarImpl
Calendar::WesternImpl
partial implementation providing the means of determining the Easter Monday for a given year.
The documentation for this class was generated from the following files:
• ql/calendar.hpp
• ql/calendar.cpp
CalendarImpl
WesternImpl
The documentation for this class was generated from the following file:
• ql/calendar.hpp
#include <calibrationhelper.hpp>
Inheritance diagram for CalibrationHelper:
Observer Observable
CalibrationHelper
Protected Attributes
• double marketValue_
• RelinkableHandle< MarketElement > volatility_
• RelinkableHandle< TermStructure > termStructure_
• Handle< BlackModel > blackModel_
• Handle< PricingEngine > engine_
This method must be implemented in derived classes. An instance of Observer does not call this
method directly: instead, it will be called by the observables the instance registered with when
they need to notify any changes.
Implements Observer (p. 527).
The documentation for this class was generated from the following files:
• ql/ShortRateModels/calibrationhelper.hpp
• ql/ShortRateModels/calibrationhelper.cpp
The documentation for this class was generated from the following file:
• ql/ShortRateModels/calibrationhelper.hpp
Observable Observer
LazyObject
Instrument
CapFloor
Cap
The documentation for this class was generated from the following file:
• ql/Instruments/capfloor.hpp
Observable
CapFlatVolatilityStructure
CapFlatVolatilityVector
The documentation for this class was generated from the following file:
• ql/capvolstructures.hpp
Observable
CapFlatVolatilityStructure
CapFlatVolatilityVector
Todo
Either add correct copy behavior or inhibit copy. Right now, a copied instance would end up
with its own copy of the length vector but an interpolation pointing to the original ones.
The documentation for this class was generated from the following file:
• ql/Volatilities/capflatvolvector.hpp
Observable Observer
LazyObject
Instrument
CapFloor
Public Types
• enum Type { Cap, Floor, Collar }
Instrument interface
Inspectors
When a derived argument structure is defined for an instrument, this method should be overrid-
den to fill it. This is mandatory in case a pricing engine is used.
Reimplemented from Instrument (p. 423).
The documentation for this class was generated from the following files:
• ql/Instruments/capfloor.hpp
• ql/Instruments/capfloor.cpp
Arguments
CapFloor::arguments
Public Attributes
• CapFloor::Type type
• std::vector< Time > startTimes
• std::vector< Time > fixingTimes
• std::vector< Time > endTimes
• std::vector< Time > accrualTimes
• std::vector< Rate > capRates
• std::vector< Rate > floorRates
• std::vector< Rate > forwards
• std::vector< double > nominals
The documentation for this class was generated from the following files:
• ql/Instruments/capfloor.hpp
• ql/Instruments/capfloor.cpp
Results
Value
CapFloor::results
• ql/Instruments/capfloor.hpp
Observable
CapletForwardVolatilityStructure
The documentation for this class was generated from the following file:
• ql/capvolstructures.hpp
#include <cashflow.hpp>
Inheritance diagram for CashFlow:
Observable
CashFlow
Coupon SimpleCashFlow
FixedRateCoupon FloatingRateCoupon
IndexedCoupon ParCoupon
CashFlow interface
Visitability
Note:
The amount is not discounted, i.e., it is the actual amount paid at the cash flow date.
Implemented in FixedRateCoupon (p. 354), IndexedCoupon (p. 420), ParCoupon (p. 542), Short-
FloatingRateCoupon (p. 594), and SimpleCashFlow (p. 596).
The documentation for this class was generated from the following file:
• ql/cashflow.hpp
Payoff
StrikedTypePayoff
CashOrNothingPayoff
The documentation for this class was generated from the following file:
• ql/payoff.hpp
Observable
Index Observer
Xibor
CHFLibor
Todo
check settlement days and day-count
The documentation for this class was generated from the following file:
• ql/Indexes/chflibor.hpp
Public Types
• typedef MonteCarlo::Sample< double > sample_type
Deprecated
initialize with a random number generator instead.
The documentation for this class was generated from the following file:
• ql/RandomNumbers/centrallimitgaussianrng.hpp
PricingEngine
CliquetEngine
• ql/PricingEngines/cliquetengines.hpp
• ql/Instruments/cliquetoption.hpp
The documentation for this class was generated from the following files:
• ql/Pricers/cliquetoption.hpp
• ql/Pricers/cliquetoption.cpp
Arguments
arguments
CliquetOption::arguments
Public Attributes
• double moneyness
• double accruedCoupon
• double lastFixing
• double localCap
• double localFloor
• double globalCap
• double globalFloor
• std::vector< Date > resetDates
The documentation for this class was generated from the following file:
• ql/Instruments/cliquetoption.hpp
CliquetOptionPathPricer
The documentation for this class was generated from the following files:
• ql/MonteCarlo/cliquetoptionpathpricer.hpp
• ql/MonteCarlo/cliquetoptionpathpricer.cpp
CliquetOptionPathPricer_old
Deprecated
use CliquetOptionPathPricer(p. 261) instead
The documentation for this class was generated from the following files:
• ql/MonteCarlo/cliquetoptionpathpricer.hpp
• ql/MonteCarlo/cliquetoptionpathpricer.cpp
Observable Observer
LazyObject
Instrument
CapFloor
Collar
The documentation for this class was generated from the following file:
• ql/Instruments/capfloor.hpp
Public Types
• typedef Function::result_type value_type
• typedef const Function::result_type ∗ pointer
• typedef const Function::result_type & reference
Dereferencing
Random access
Difference
Comparisons
Public Attributes
• typedef< Iterator >::difference_type difference_type
Related Functions
The documentation for this class was generated from the following file:
• ql/Utilities/combiningiterator.hpp
Constraint
CompositeConstraint
The documentation for this class was generated from the following file:
• ql/Optimization/constraint.hpp
Observable
MarketElement Observer
CompositeMarketElement
Observer interface
• void update ()
This method must be implemented in derived classes. An instance of Observer does not call this
method directly: instead, it will be called by the observables the instance registered with when
they need to notify any changes.
Implements Observer (p. 527).
The documentation for this class was generated from the following file:
• ql/marketelement.hpp
Method
ConjugateGradient
The documentation for this class was generated from the following files:
• ql/Optimization/conjugategradient.hpp
• ql/Optimization/conjugategradient.cpp
Parameter
ConstantParameter
The documentation for this class was generated from the following file:
• ql/ShortRateModels/parameter.hpp
Constraint
The documentation for this class was generated from the following file:
• ql/Optimization/constraint.hpp
The documentation for this class was generated from the following file:
• ql/Optimization/constraint.hpp
SingleAssetOption
EuropeanOption
ContinuousGeometricAPO
Todo
add Average Strike version and make it backward starting
The documentation for this class was generated from the following file:
• ql/Pricers/continuousgeometricapo.hpp
CostFunction
LeastSquareFunction
The documentation for this class was generated from the following file:
• ql/Optimization/costfunction.hpp
Public Types
• typedef Function::result_type value_type
• typedef const Function::result_type ∗ pointer
• typedef const Function::result_type & reference
Dereferencing
Random access
Difference
Comparisons
Public Attributes
• typedef< Iterator1 >::difference_type difference_type
Related Functions
• coupling_iterator< It1, It2, Function > make_coupling_iterator (It1 it1, It2 it2, Function f)
helper function to create combining iterators
The documentation for this class was generated from the following file:
• ql/Utilities/couplingiterator.hpp
Observable
CashFlow
Coupon
FixedRateCoupon FloatingRateCoupon
IndexedCoupon ParCoupon
Inspectors
Visitability
Protected Attributes
• double nominal_
• Date paymentDate_
• Date accrualStartDate_
• Date accrualEndDate_
• Date refPeriodStart_
• Date refPeriodEnd_
11.103.2.1 Coupon (double nominal, const Date & paymentDate, const Date &
accrualStartDate, const Date & accrualEndDate, const Date & refPeriodStart =
Date(), const Date & refPeriodEnd = Date())
Warning:
the coupon does not roll the payment date which must already be a business day.
The documentation for this class was generated from the following file:
• ql/CashFlows/coupon.hpp
Observer Observable
Model
OneFactorModel AffineModel
OneFactorAffineModel
CoxIngersollRoss
ExtendedCoxIngersollRoss
Unstable
This class was not tested enough to guarantee its functionality.
The documentation for this class was generated from the following files:
• ql/ShortRateModels/OneFactorModels/coxingersollross.hpp
• ql/ShortRateModels/OneFactorModels/coxingersollross.cpp
CoxIngersollRoss::Dynamics
Dynamics
The documentation for this class was generated from the following file:
• ql/ShortRateModels/OneFactorModels/coxingersollross.hpp
Tree
BinomialTree
EqualJumpsBinomialTree
CoxRossRubinstein
The documentation for this class was generated from the following files:
• ql/Lattices/binomialtree.hpp
• ql/Lattices/binomialtree.cpp
MixedScheme<Operator>
CrankNicolson
// copy constructor/assignment
// (these will be provided by the compiler if none is defined)
Operator(const Operator&);
Operator& operator=(const Operator&);
// inspectors
Size size();
// modifiers
void setTime(Time t);
// operator interface
arrayType applyTo(const arrayType&);
arrayType solveFor(const arrayType&);
static Operator identity(Size size);
// operator algebra
Operator operator*(double, const Operator&);
Operator operator+(const Operator&, const Operator&);
Operator operator+(const Operator&, const Operator&);
Warning:
The differential operator must be linear for this evolver to work.
Friends
• class FiniteDifferenceModel< CrankNicolson< Operator > >
The documentation for this class was generated from the following file:
• ql/FiniteDifferences/cranknicolson.hpp
The documentation for this class was generated from the following file:
• ql/Math/interpolationtraits.hpp
Interpolation<RandomAccessIterator1,RandomAccessIterator2>
CubicSplineInterpolation
Public Attributes
• typedef< RandomAccessIterator1 >::value_type argument_type
• typedef< RandomAccessIterator2 >::value_type result_type
Precondition:
The sequence of values for x must have been sorted for the result to make sense.
• ql/Math/cubicspline.hpp
The documentation for this class was generated from the following files:
• ql/Math/normaldistribution.hpp
• ql/Math/normaldistribution.cpp
CuriouslyRecurringTemplate
The documentation for this class was generated from the following file:
• ql/Patterns/curiouslyrecurring.hpp
The documentation for this class was generated from the following files:
• ql/dataformatters.hpp
• ql/dataformatters.cpp
• Date ()
Default constructor returning a null date.
inspectors
date algebra
• Date maxDate ()
latest allowed date
• Date todaysDate ()
today’s date.
Related Functions
The documentation for this class was generated from the following files:
• ql/date.hpp
• ql/dataformatters.hpp
• ql/date.cpp
Public Types
• enum Format { Long, Short, ISO }
The documentation for this class was generated from the following files:
• ql/dataformatters.hpp
• ql/dataformatters.cpp
DayCounter
DayCounter interface
• Time yearFraction (const Date &, const Date &, const Date &refPeriodStart=Date(), const
Date &refPeriodEnd=Date()) const
Returns the period between two dates as a fraction of year.
Related Functions
11.115.2.1 DayCounter ()
This default constructor returns a day counter with a null implementation, which is therefore
unusable except as a placeholder.
This protected constructor will only be invoked by derived classes which define a given Day-
Counter(p. 292) implementation
Warning:
This method is used for output and comparison between day counters. It is not meant to be
used for writing switch-on-type code.
11.115.4.1 bool operator== (const DayCounter &, const DayCounter &) [related]
Returns true iff the two day counters belong to the same derived class.
The documentation for this class was generated from the following file:
• ql/daycounter.hpp
The documentation for this class was generated from the following file:
• ql/daycounter.hpp
Observer Observable
RateHelper
DepositRateHelper
Deposit rate.
Warning:
This class assumes that the reference date does not change between calls of setTerm-
Structure()(p. 295).
Warning:
Being a pointer and not a Handle(p. 390), the term structure is not guaranteed to remain
allocated for the whole life of the rate helper. It is responsibility of the programmer to ensure
that the pointer remains valid. It is advised that rate helpers be used only in term structure
constructors, setting the term structure to this, i.e., the one being constructed.
• ql/TermStructures/ratehelpers.hpp
• ql/TermStructures/ratehelpers.cpp
Observable
MarketElement Observer
DerivedMarketElement
Observer interface
• void update ()
This method must be implemented in derived classes. An instance of Observer does not call this
method directly: instead, it will be called by the observables the instance registered with when
they need to notify any changes.
Implements Observer (p. 527).
The documentation for this class was generated from the following file:
• ql/marketelement.hpp
DiffusionProcess
• virtual double expectation (Time t0, double x0, Time dt) const
returns the expectation of the process after a time interval
• virtual double variance (Time t0, double x0, Time dt) const
returns the variance of the process after a time interval
11.119.2.1 virtual double expectation (Time t0, double x0, Time dt) const [virtual]
11.119.2.2 virtual double variance (Time t0, double x0, Time dt) const [virtual]
• ql/diffusionprocess.hpp
DirichletBC
Todo
generalize to time-dependent conditions.
This method sets the current time for time-dependent boundary conditions.
Implements BoundaryCondition< TridiagonalOperator > (p. 225).
The documentation for this class was generated from the following files:
• ql/FiniteDifferences/boundarycondition.hpp
• ql/FiniteDifferences/boundarycondition.cpp
Observable
TermStructure
DiscountStructure
DiscountCurve
ExtendedDiscountCurve
Protected Types
• typedef Math::LogLinearInterpolation< std::vector< Time >::const_iterator, std::vector<
DiscountFactor >::const_iterator > DfInterpolation
Protected Attributes
• Date todaysDate_
• Date referenceDate_
• DayCounter dayCounter_
• std::vector< Date > dates_
• std::vector< DiscountFactor > discounts_
• std::vector< Time > times_
• Handle< DfInterpolation > interpolation_
The documentation for this class was generated from the following files:
• ql/TermStructures/discountcurve.hpp
• ql/TermStructures/discountcurve.cpp
#include <termstructure.hpp>
Inheritance diagram for DiscountStructure:
Observable
TermStructure
DiscountStructure
ExtendedDiscountCurve
11.122.2.1 Rate zeroYieldImpl (Time, bool extrapolate = false) const [protected, virtual]
Returns the zero yield rate for the given date calculating it from the discount.
Implements TermStructure (p. 635).
11.122.2.2 Rate forwardImpl (Time, bool extrapolate = false) const [protected, virtual]
Returns the instantaneous forward rate for the given date calculating it from the discount.
Implements TermStructure (p. 635).
Returns the forward rate at a specified compound frequency for the given date calculating it from
the zero yield.
Implements TermStructure (p. 636).
Reimplemented in ExtendedDiscountCurve (p. 341).
The documentation for this class was generated from the following file:
• ql/termstructure.hpp
DiscrepancyStatistics
1-dimensional inspectors
The documentation for this class was generated from the following files:
• ql/Math/discrepancystatistics.hpp
• ql/Math/discrepancystatistics.cpp
SingleAssetOption
DiscreteGeometricAPO
Todo
add analytical greeks
The documentation for this class was generated from the following files:
• ql/Pricers/discretegeometricapo.hpp
• ql/Pricers/discretegeometricapo.cpp
SingleAssetOption
DiscreteGeometricASO
Todo
add analytical greeks
The documentation for this class was generated from the following files:
• ql/Pricers/discretegeometricaso.hpp
• ql/Pricers/discretegeometricaso.cpp
#include <discretizedasset.hpp>
Inheritance diagram for DiscretizedAsset:
DiscretizedAsset
DiscretizedDiscountBond DiscretizedOption
Protected Attributes
• Time time_
• Array values_
This method will be invoked after rollback and before any other asset (i.e., an option on this one)
has any chance to look at the values. For instance, payments happening at times already spanned
by the rollback will be added here.
This method will be invoked after rollback and after any other asset had their chance to look at
the values. For instance, payments happening at the present time (and therefore not included in
an option to be exercised at this time) will be added here.
Reimplemented in DiscretizedOption (p. 311).
The documentation for this class was generated from the following file:
• ql/discretizedasset.hpp
DiscretizedAsset
DiscretizedDiscountBond
The documentation for this class was generated from the following file:
• ql/discretizedasset.hpp
DiscretizedAsset
DiscretizedOption
Precondition:
The underlying asset must be initialized
Protected Attributes
• Handle< DiscretizedAsset > underlying_
• Exercise::Type exerciseType_
• std::vector< Time > exerciseTimes_
This method will be invoked after rollback and after any other asset had their chance to look at
the values. For instance, payments happening at the present time (and therefore not included in
an option to be exercised at this time) will be added here.
Reimplemented from DiscretizedAsset (p. 309).
The documentation for this class was generated from the following files:
• ql/discretizedasset.hpp
• ql/discretizedasset.cpp
Disposable<Foo> bar(int i) {
Foo f(i*2);
return f;
}
Warning:
In order to avoid copies in code such as shown above, the conversion from T to Dispos-
able(p. 313)<T> is destructive, i.e., it does not preserve the state of the original object. There-
fore, it is necessary for the developer to avoid code such as
Disposable<Foo> bar(Foo& f) {
return f;
}
which would likely render the passed object unusable. The correct way to obtain the desired
behavior would be:
Disposable<Foo> bar(Foo& f) {
Foo temp = f;
return temp;
}
The documentation for this class was generated from the following file:
• ql/disposable.hpp
TridiagonalOperator
DMinus
D− matricial representation
The differential operator D− discretizes the first derivative with the first-order formula
∂ui ui − ui−1
≈ = D− ui
∂x h
The documentation for this class was generated from the following file:
• ql/FiniteDifferences/dminus.hpp
Examples:
DiscreteHedging.cpp.
The documentation for this class was generated from the following files:
• ql/dataformatters.hpp
• ql/dataformatters.cpp
TridiagonalOperator
DPlus
D+ matricial representation
The differential operator D+ discretizes the first derivative with the first-order formula
∂ui ui+1 − ui
≈ = D+ ui
∂x h
The documentation for this class was generated from the following file:
• ql/FiniteDifferences/dplus.hpp
TridiagonalOperator
DPlusDMinus
D+ D− matricial representation
The differential operator D+ D− discretizes the second derivative with the second-order formula
The documentation for this class was generated from the following file:
• ql/FiniteDifferences/dplusdminus.hpp
Observable
TermStructure
ZeroYieldStructure Observer
DriftTermStructure
Note:
This term structure will remain linked to the original structures, i.e., any changes in the latters
will be reflected in this structure as well.
TermStructure interface
Observer interface
• void update ()
This method must be implemented in derived classes. An instance of Observer does not call this
method directly: instead, it will be called by the observables the instance registered with when
they need to notify any changes.
Implements Observer (p. 527).
The documentation for this class was generated from the following file:
• ql/TermStructures/drifttermstructure.hpp
TridiagonalOperator
DZero
D0 matricial representation
The differential operator D0 discretizes the first derivative with the second-order formula
The documentation for this class was generated from the following file:
• ql/FiniteDifferences/dzero.hpp
• stationary point
• stationary gradient
• maximum number of iterations ....
Public Types
• enum Type { maxIter, statPt, statGd }
• void setPositiveOptimization ()
• bool checkIterationNumber (int iteration)
• bool checkStationaryValue (double fold, double fnew)
• bool checkAccuracyValue (double f)
• bool checkStationaryGradientNorm (double normDiff)
• bool checkAccuracyGradientNorm (double norm)
• bool operator() (int iteration, double fold, double normgold, double fnew, double nor-
mgnew, double normdiff)
test if the number of iteration is not too big and if we don’t
Protected Attributes
• int maxIteration_
Maximum number of iterations.
• double functionEpsilon_
function and gradient epsilons
• double gradientEpsilon_
• int maxIterStatPt_
Maximun number of iterations in stationary state.
• int statState_
Maximun number of iterations in stationary state.
• int endCriteria_
• bool positiveOptimization_
The documentation for this class was generated from the following file:
• ql/Optimization/criteria.hpp
Tree
BinomialTree
EqualJumpsBinomialTree
CoxRossRubinstein Trigeorgis
Protected Attributes
• double dx_
• double pu_
• double pd_
The documentation for this class was generated from the following files:
• ql/Lattices/binomialtree.hpp
• ql/Lattices/binomialtree.cpp
Tree
BinomialTree
EqualProbabilitiesBinomialTree
AdditiveEQPBinomialTree JarrowRudd
Protected Attributes
• double up_
The documentation for this class was generated from the following files:
• ql/Lattices/binomialtree.hpp
• ql/Lattices/binomialtree.cpp
AssertionFailedError
IllegalArgumentError
IllegalResultError
Error IndexError
OutOfMemoryError
PostconditionNotSatisfiedError
PreconditionNotSatisfiedError
The documentation for this class was generated from the following file:
• ql/errors.hpp
The documentation for this class was generated from the following files:
• ql/Math/errorfunction.hpp
• ql/Math/errorfunction.cpp
Observable
Index Observer
Xibor
Euribor
Euribor index
The documentation for this class was generated from the following file:
• ql/Indexes/euribor.hpp
The documentation for this class was generated from the following files:
• ql/dataformatters.hpp
• ql/dataformatters.cpp
Exercise
EuropeanExercise
The documentation for this class was generated from the following files:
• ql/exercise.hpp
• ql/exercise.cpp
SingleAssetOption
EuropeanOption
ContinuousGeometricAPO FdDividendEuropeanOption
Deprecated
use VanillaOption with EuropeanAnalyticEngine
Examples:
DiscreteHedging.cpp.
The documentation for this class was generated from the following files:
• ql/Pricers/europeanoption.hpp
• ql/Pricers/europeanoption.cpp
EuropeanPathPricer
The documentation for this class was generated from the following files:
• ql/MonteCarlo/europeanpathpricer.hpp
• ql/MonteCarlo/europeanpathpricer.cpp
EuropeanPathPricer_old
The documentation for this class was generated from the following files:
• ql/MonteCarlo/europeanpathpricer.hpp
• ql/MonteCarlo/europeanpathpricer.cpp
EverestPathPricer_old
The documentation for this class was generated from the following files:
• ql/MonteCarlo/everestpathpricer.hpp
• ql/MonteCarlo/everestpathpricer.cpp
Exercise
Warning:
the input dates must be effective (adjusted) exercise dates.
Public Types
• enum Type { American, Bermudan, European }
Protected Attributes
• std::vector< Date > dates_
• Type type_
The documentation for this class was generated from the following file:
• ql/exercise.hpp
MixedScheme<Operator>
ExplicitEuler
// copy constructor/assignment
// (these will be provided by the compiler if none is defined)
Operator(const Operator&);
Operator& operator=(const Operator&);
// inspectors
Size size();
// modifiers
void setTime(Time t);
// operator interface
arrayType applyTo(const arrayType&);
static Operator identity(Size size);
// operator algebra
Operator operator*(double, const Operator&);
Operator operator-(const Operator&, const Operator&);
Todo
add Richardson extrapolation
Friends
• class FiniteDifferenceModel< ExplicitEuler< Operator > >
The documentation for this class was generated from the following file:
• ql/FiniteDifferences/expliciteuler.hpp
Observer Observable
Model
OneFactorModel AffineModel
OneFactorAffineModel
CoxIngersollRoss TermStructureConsistentModel
ExtendedCoxIngersollRoss
Unstable
This class was not tested enough to guarantee its functionality.
• double discountBondOption (Option::Type type, double strike, Time maturity, Time bond-
Maturity) const
The documentation for this class was generated from the following files:
• ql/ShortRateModels/OneFactorModels/extendedcoxingersollross.hpp
• ql/ShortRateModels/OneFactorModels/extendedcoxingersollross.cpp
Dynamics
ExtendedCoxIngersollRoss::Dynamics
The documentation for this class was generated from the following file:
• ql/ShortRateModels/OneFactorModels/extendedcoxingersollross.hpp
Parameter
TermStructureFittingParameter
ExtendedCoxIngersollRoss::FittingParameter
The documentation for this class was generated from the following file:
• ql/ShortRateModels/OneFactorModels/extendedcoxingersollross.hpp
#include <extendeddiscountcurve.hpp>
Inheritance diagram for ExtendedDiscountCurve:
Observable
TermStructure
DiscountStructure
DiscountCurve Observer
ExtendedDiscountCurve
• ExtendedDiscountCurve (const Date &todaysDate, const std::vector< Date > &dates, const
std::vector< DiscountFactor > &dfs, const Calendar &calendar, const RollingConvention
roll, const DayCounter &dayCounter=DayCounters::Actual365())
• Calendar calendar () const
• RollingConvention roll () const
Observer interface
• void update ()
This method must be implemented in derived classes. An instance of Observer does not call this
method directly: instead, it will be called by the observables the instance registered with when
they need to notify any changes.
Implements Observer (p. 527).
Returns the forward rate at a specified compound frequency for the given date calculating it from
the zero yield.
Reimplemented from DiscountStructure (p. 304).
The documentation for this class was generated from the following files:
• ql/TermStructures/extendeddiscountcurve.hpp
• ql/TermStructures/extendeddiscountcurve.cpp
FalsePosition
The documentation for this class was generated from the following file:
• ql/Solvers1D/falseposition.hpp
SingleAssetOption
FdBsmOption
FdStepConditionOption
FdAmericanOption
American option
Todo
make american call with no dividends = european
The documentation for this class was generated from the following file:
• ql/Pricers/fdamericanoption.hpp
Bermudan option.
Protected Attributes
• double extraTermInBermudan
The documentation for this class was generated from the following files:
• ql/Pricers/fdbermudanoption.hpp
• ql/Pricers/fdbermudanoption.cpp
SingleAssetOption
FdBsmOption
FdEuropean FdStepConditionOption
FdAmericanOption
Protected Types
• typedef FiniteDifferences::BoundaryCondition< FiniteDifferences::TridiagonalOperator
> BoundaryCondition
Protected Attributes
• Size gridPoints_
• double value_
• double delta_
• double gamma_
• Array grid_
• FiniteDifferences::BSMOperator finiteDifferenceOperator_
• Array intrinsicValues_
• std::vector< Handle< BoundaryCondition > > BCs_
• double sMin_
• double center_
• double sMax_
The documentation for this class was generated from the following files:
• ql/Pricers/fdbsmoption.hpp
• ql/Pricers/fdbsmoption.cpp
SingleAssetOption
EuropeanOption
FdDividendEuropeanOption
The documentation for this class was generated from the following files:
• ql/Pricers/fddividendeuropeanoption.hpp
• ql/Pricers/fddividendeuropeanoption.cpp
The documentation for this class was generated from the following files:
• ql/Pricers/fddividendshoutoption.hpp
• ql/Pricers/fddividendshoutoption.cpp
SingleAssetOption
FdBsmOption
FdEuropean
The documentation for this class was generated from the following files:
• ql/Pricers/fdeuropean.hpp
• ql/Pricers/fdeuropean.cpp
SingleAssetOption
FdBsmOption
FdStepConditionOption
FdAmericanOption
Protected Attributes
• Handle< FiniteDifferences::StandardStepCondition > stepCondition_
• int timeSteps_
The documentation for this class was generated from the following files:
• ql/Pricers/fdstepconditionoption.hpp
• ql/Pricers/fdstepconditionoption.cpp
Dereferencing
• reference operator ∗ () const
• pointer operator → () const
Comparisons
• bool operator== (const filtering_iterator< Iterator, UnaryPredicate > &)
• bool operator!= (const filtering_iterator< Iterator, UnaryPredicate > &)
Public Attributes
• typedef< Iterator >::pointer pointer
• typedef< Iterator >::reference reference
Related Functions
The documentation for this class was generated from the following file:
• ql/Utilities/filteringiterator.hpp
Public Types
• typedef Evolver::arrayType arrayType
• typedef Evolver::operatorType operatorType
• typedef BoundaryCondition< operatorType > bcType
11.163.2.1 void rollback (arrayType & a, Time from, Time to, Size steps, const Handle<
StepCondition< arrayType > > & condition = Handle< StepCondition< arrayType
> >())
solves the problem between the given times, possibly applying a condition at every step.
Warning:
being this a rollback, from must be a later time than to.
The documentation for this class was generated from the following file:
• ql/FiniteDifferences/finitedifferencemodel.hpp
Observable
CashFlow
Coupon
FixedRateCoupon
CashFlow interface
Coupon interface
Inspectors
Visitability
Note:
The amount is not discounted, i.e., it is the actual amount paid at the cash flow date.
• ql/CashFlows/fixedratecoupon.hpp
Observable
CashFlow
Coupon
FloatingRateCoupon
IndexedCoupon ParCoupon
Warning:
This class does not perform any date adjustment, i.e., the start and end date passed upon
construction should be already rolled to a business day.
Coupon interface
Inspectors
Visitability
Protected Attributes
• int fixingDays_
• Spread spread_
The documentation for this class was generated from the following file:
• ql/CashFlows/floatingratecoupon.hpp
Observable Observer
LazyObject
Instrument
CapFloor
Floor
The documentation for this class was generated from the following file:
• ql/Instruments/capfloor.hpp
PricingEngine
ForwardEngine
Protected Attributes
• Handle< GenericEngine< ArgumentsType, ResultsType > > originalEngine_
• ArgumentsType ∗ originalArguments_
• const ResultsType ∗ originalResults_
The documentation for this class was generated from the following file:
• ql/PricingEngines/forwardengines.hpp
Public Attributes
• double moneyness
• Date resetDate
The documentation for this class was generated from the following file:
• ql/Instruments/forwardvanillaoption.hpp
PricingEngine
ForwardEngine<ArgumentsType, ResultsType>
ForwardPerformanceEngine
The documentation for this class was generated from the following file:
• ql/PricingEngines/forwardengines.hpp
Observable
TermStructure
ForwardRateStructure
ForwardSpreadedTermStructure
11.170.2.1 Rate zeroYieldImpl (Time, bool extrapolate = false) const [protected, virtual]
Returns the zero yield rate for the given date calculating it from the instantaneous forward rate.
Warning:
This is just a default, highly inefficient implementation. Derived classes should implement
their own zeroYield method.
Returns the discount factor for the given date calculating it from the instantaneous forward rate.
Implements TermStructure (p. 635).
Returns the forward rate at a specified compound frequency for the given date calculating it from
the zero yield.
Implements TermStructure (p. 636).
The documentation for this class was generated from the following file:
• ql/termstructure.hpp
Observable
TermStructure
ForwardRateStructure Observer
ForwardSpreadedTermStructure
Note:
This term structure will remain linked to the original structure, i.e., any changes in the latter
will be reflected in this structure as well.
TermStructure interface
Observer interface
• void update ()
This method must be implemented in derived classes. An instance of Observer does not call this
method directly: instead, it will be called by the observables the instance registered with when
they need to notify any changes.
Implements Observer (p. 527).
11.171.2.2 Rate zeroYieldImpl (Time, bool extrapolate = false) const [protected, virtual]
Warning:
This method must disappear should the spread become a curve
• ql/TermStructures/forwardspreadedtermstructure.hpp
#include <forwardvanillaoption.hpp>
Inheritance diagram for ForwardVanillaOption:
Observable Observer
LazyObject
Instrument
Option
VanillaOption
ForwardVanillaOption
Public Types
When a derived argument structure is defined for an instrument, this method should be overrid-
den to fill it. This is mandatory in case a pricing engine is used.
Reimplemented from VanillaOption (p. 665).
In case a pricing engine is not used, this method must be overridden to perform the actual calcu-
lations and set any needed results. In case a pricing engine is used, the default implementation
can be used.
Reimplemented from VanillaOption (p. 666).
The documentation for this class was generated from the following files:
• ql/Instruments/forwardvanillaoption.hpp
• ql/Instruments/forwardvanillaoption.cpp
Calendar
Frankfurt
Frankfurt calendar
Holidays:
• Saturdays
• Sundays
• New Year’s Day, January 1st
• Good Friday
• Easter Monday
• Ascension Thursday
• Whit Monday
• Corpus Christi
• Labour Day, May 1st
• National Day, October 3rd
• Christmas Eve, December 24th
• Christmas, December 25th
• Boxing Day, December 26th
The documentation for this class was generated from the following file:
• ql/Calendars/frankfurt.hpp
#include <ratehelpers.hpp>
Inheritance diagram for FraRateHelper:
Observer Observable
RateHelper
FraRateHelper
Warning:
This class assumes that the reference date does not change between calls of setTerm-
Structure()(p. 368).
Todo
convexity adjustment should be implemented.
Warning:
Being a pointer and not a Handle(p. 390), the term structure is not guaranteed to remain
allocated for the whole life of the rate helper. It is responsibility of the programmer to ensure
that the pointer remains valid. It is advised that rate helpers be used only in term structure
constructors, setting the term structure to this, i.e., the one being constructed.
• ql/TermStructures/ratehelpers.hpp
• ql/TermStructures/ratehelpers.cpp
Observer Observable
RateHelper
FuturesRateHelper
Warning:
This class assumes that the reference date does not change between calls of setTerm-
Structure()(p. 578).
The documentation for this class was generated from the following files:
• ql/TermStructures/ratehelpers.hpp
• ql/TermStructures/ratehelpers.cpp
Observer Observable
Model
G2
Unstable
This class was not tested enough to guarantee its functionality.
• double discountBondOption (Option::Type type, double strike, Time maturity, Time bond-
Maturity) const
• double swaption (const Instruments::Swaption::arguments &arguments) const
• DiscountFactor discount (Time t) const
Implied discount curve.
Friends
• class SwaptionPricingFunction
The documentation for this class was generated from the following files:
• ql/ShortRateModels/TwoFactorModels/g2.hpp
• ql/ShortRateModels/TwoFactorModels/g2.cpp
Parameter
TermStructureFittingParameter
G2::FittingParameter
The documentation for this class was generated from the following file:
• ql/ShortRateModels/TwoFactorModels/g2.hpp
The documentation for this class was generated from the following files:
• ql/Math/gammadistribution.hpp
• ql/Math/gammadistribution.cpp
returns the downside deviation, defined as the square root of the downside variance.
wi (min(0, xi − tar1et))2
P
P .
wi
Precondition:
percentile must be in range [90%-100%)
Precondition:
percentile must be in range [90%-100%)
Precondition:
percentile must be in range 90%-100%
The documentation for this class was generated from the following file:
• ql/Math/gaussianstatistics.hpp
Observable
Index Observer
Xibor
GBPLibor
The documentation for this class was generated from the following file:
• ql/Indexes/gbplibor.hpp
Statistics tool.
This class accumulates a set of data and returns their statistics (e.g: mean, variance, skewness,
kurtosis, error estimation, percentile, etc.) based on the empirical distribution (no gaussian
assumption)
It doesn’t suffer the numerical instability problem of IncrementalStatistics(p. 414). The downside
is that it stores all samples, thus increasing the memory requirements.
Examples:
DiscreteHedging.cpp.
• const std::vector< std::pair< double, double > > & data () const
collected data
Modifiers
• void reset ()
resets the data to a null set
returns the standard deviation σ, defined as the square root of the variance.
The range is passed as a boolean function returning true if the argument belongs to the range or
false otherwise.
The function returns a pair made of the result and the number of observations in the given range.
Precondition:
weights must be positive or null
The documentation for this class was generated from the following files:
• ql/Math/generalstatistics.hpp
• ql/Math/generalstatistics.cpp
Protected Attributes
• ArgumentsType arguments_
• ResultsType results_
The documentation for this class was generated from the following file:
• ql/PricingEngines/genericengine.hpp
Protected Attributes
• Handle< ModelType > model_
This method must be implemented in derived classes. An instance of Observer does not call this
method directly: instead, it will be called by the observables the instance registered with when
they need to notify any changes.
Implements Observer (p. 527).
Reimplemented in LatticeShortRateModelEngine (p. 442), LatticeShortRateModelEngine<
Instruments::Swaption::arguments, Instruments::Swaption::results > (p. 442), and Lattice-
ShortRateModelEngine< Instruments::CapFloor::arguments, Instruments::CapFloor::results >
(p. 442).
The documentation for this class was generated from the following file:
• ql/PricingEngines/genericengine.hpp
#include <riskstatistics.hpp>
N h i
E (x − hxi)2 | x < hxi .
N−1
returns the semi deviation, defined as the square root of the semi variance.
returns the downside deviation, defined as the square root of the downside variance.
N h i
E (x − t)2 | x < t .
N−1
Precondition:
percentile must be in range [90%-100%)
Precondition:
percentile must be in range [90%-100%)
E x | x < VaR(p) ,
that is the average of observations below the given percentile p. Also know as conditional
value-at-risk.
See Artzner, Delbaen, Eber and Heath, "Coherent measures of risk", Mathematical Finance 9
(1999)
E [Θ | (−∞, ∞)]
where
1 x<t
(
Θ(x) =
0 x≥t
The documentation for this class was generated from the following file:
• ql/Math/riskstatistics.hpp
GeometricAPOPathPricer_old
The documentation for this class was generated from the following files:
• ql/MonteCarlo/geometricapopathpricer.hpp
• ql/MonteCarlo/geometricapopathpricer.cpp
GeometricASOPathPricer_old
The documentation for this class was generated from the following files:
• ql/MonteCarlo/geometricasopathpricer.hpp
• ql/MonteCarlo/geometricasopathpricer.cpp
Results
Greeks
results
results results
Public Attributes
• double delta
• double gamma
• double theta
• double vega
• double rho
• double dividendRho
• double strikeSensitivity
The documentation for this class was generated from the following file:
• ql/option.hpp
Public Types
• typedef MonteCarlo::Sample< Array > sample_type
The documentation for this class was generated from the following files:
• ql/RandomNumbers/haltonrsg.hpp
• ql/RandomNumbers/haltonrsg.cpp
Reference-counted pointer.
This class acts as a proxy to a pointer contained in it. Such pointer is owned by the handle, i.e.,
the handle will be responsible for its deletion, unless explicitly stated by the programmer.
A count of the references to the contained pointer is incremented every time a handle is copied,
and decremented every time a handle is deleted or goes out of scope. When the handle owns the
pointer, this mechanism ensures on one hand, that the pointer will not be deallocated as long as
a handle refers to it, and on the other hand, that it will be deallocated when no more handles do.
Note:
The implementation of this class was originally taken from "The C++ Programming Lan-
guage", 3rd ed., B.Stroustrup, Addison-Wesley, 1997.
Warning:
This mechanism will break and result in untimely deallocation of the pointer (and very
possible death of your executable) if two handles are explicitly initialized with the same
pointer, as in
SomeObj* so = new SomeObj;
Handle<SomeObj> h1(so);
Handle<SomeObj> h2 = h1; // this is safe.
Handle<SomeObj> h3(so); // this is definitely not.
It is good practice to create the pointer and immediately pass it to the handle, as in
Handle<SomeObj> h1(new SomeObj); // this is as safe as can be.
When the programmer keeps the ownership of the pointer, as explicitly declared in
SomeObj so;
Handle<SomeObj> h(&so,false);
it is responsibility of the programmer to make sure that the object remain in scope as long
as there are handles pointing to it. Also, the programmer must explicitly delete the object if
required.
Examples:
DiscreteHedging.cpp.
Dereferencing
Inspectors
Friends
• class HandleCopier
• ql/handle.hpp
Calendar
Helsinki
Helsinki calendar
Holidays:
• Saturdays
• Sundays
• New Year’s Day, January 1st
• Epiphany, January 6th
• Good Friday
• Easter Monday
• Ascension Thursday
• Labour Day, May 1st
• Midsummer Eve (Friday between June 18-24)
• Independence Day, December 6th
• Christmas Eve, December 24th
• Christmas, December 25th
• Boxing Day, December 26th
The documentation for this class was generated from the following file:
• ql/Calendars/helsinki.hpp
HimalayaPathPricer_old
The documentation for this class was generated from the following files:
• ql/MonteCarlo/himalayapathpricer.hpp
• ql/MonteCarlo/himalayapathpricer.cpp
Public Types
• typedef Utilities::filtering_iterator< const_iterator, DataValidator > const_valid_iterator
bidirectional iterator on non-null history entries
Inspectors
Iterator access
Four different types of iterators are provided, namely, const_iterator, const_valid_iterator, const_data_-
iterator, and const_valid_data_iterator.
const_iterator and const_valid_iterator point to an Entry structure, the difference being that the latter
only iterates over valid entries - i.e., entries whose data are not null. The same difference exists between
const_data_iterator and const_valid_data_iterator which point directly to historical values without
reference to the date they are associated to.
11.192.2.1 History ()
Default constructor
11.192.2.2 History (const Date & firstDate, const Date & lastDate, Iterator begin, Iterator end)
This constructor initializes the history with the given set of values, corresponding to the date
range between firstDate and lastDate included.
Precondition:
begin-end must equal the number of days from firstDate to lastDate included.
11.192.2.3 History (const Date & firstDate, const Date & lastDate, const std::vector< double
> & values)
This constructor initializes the history with the given set of values, corresponding to the date
range between firstDate and lastDate included.
Precondition:
The size of values must equal the number of days from firstDate to lastDate included.
11.192.2.4 History (const std::vector< Date > & dates, const std::vector< double > & values)
This constructor initializes the history with the given set of values, corresponding each to the
element with the same index in the given set of dates. The whole date range between dates[0]
and dates[N-1] will be automatically filled by inserting null values where a date is missing from
the given set.
Precondition:
dates must be sorted.
There can be no pairs (dates[i],values[i]) and (dates[j],values[j]) such that dates[i] ==
dates[j] && values[i] != values[j]. Pairs with dates[i] == dates[j] && values[i]
== values[j] are allowed; the duplicated entries will be discarded.
The size of values must equal the number of days from firstDate to lastDate included.
The documentation for this class was generated from the following file:
• ql/history.hpp
Public Types
Dereferencing
Random access
Difference
Comparisons
Friends
• class History
The documentation for this class was generated from the following file:
• ql/history.hpp
Friends
• class const_iterator
The documentation for this class was generated from the following file:
• ql/history.hpp
Observer Observable
Model
OneFactorModel AffineModel
OneFactorAffineModel
Vasicek TermStructureConsistentModel
HullWhite
• double discountBondOption (Option::Type type, double strike, Time maturity, Time bond-
Maturity) const
The documentation for this class was generated from the following files:
• ql/ShortRateModels/OneFactorModels/hullwhite.hpp
• ql/ShortRateModels/OneFactorModels/hullwhite.cpp
The documentation for this class was generated from the following file:
• ql/ShortRateModels/OneFactorModels/hullwhite.hpp
Parameter
TermStructureFittingParameter
HullWhite::FittingParameter
The documentation for this class was generated from the following file:
• ql/ShortRateModels/OneFactorModels/hullwhite.hpp
I::I();
double I::operator() const;
Public Types
• typedef MonteCarlo::Sample< double > sample_type
Deprecated
initialize with a random number generator instead.
The documentation for this class was generated from the following file:
• ql/RandomNumbers/inversecumgaussianrng.hpp
I::I();
double I::operator() const;
Public Types
• typedef MonteCarlo::Sample< Array > sample_type
The documentation for this class was generated from the following file:
• ql/RandomNumbers/inversecumgaussianrsg.hpp
Error
IllegalArgumentError
Specialized error.
Thrown upon passing an argument with an illegal value.
The documentation for this class was generated from the following file:
• ql/errors.hpp
Error
IllegalResultError
Specialized error.
Thrown upon obtaining a result outside the allowed range.
The documentation for this class was generated from the following file:
• ql/errors.hpp
MixedScheme<Operator>
ImplicitEuler
// copy constructor/assignment
// (these will be provided by the compiler if none is defined)
Operator(const Operator&);
Operator& operator=(const Operator&);
// inspectors
Size size();
// modifiers
void setTime(Time t);
// operator interface
arrayType solveFor(const arrayType&);
static Operator identity(Size size);
// operator algebra
Operator operator*(double, const Operator&);
Operator operator+(const Operator&, const Operator&);
Friends
• class FiniteDifferenceModel< ImplicitEuler< Operator > >
The documentation for this class was generated from the following file:
• ql/FiniteDifferences/impliciteuler.hpp
Observable
TermStructure
DiscountStructure Observer
ImpliedTermStructure
Note:
This term structure will remain linked to the original structure, i.e., any changes in the latter
will be reflected in this structure as well.
TermStructure interface
Observer interface
• void update ()
This method must be implemented in derived classes. An instance of Observer does not call this
method directly: instead, it will be called by the observables the instance registered with when
they need to notify any changes.
Implements Observer (p. 527).
The documentation for this class was generated from the following file:
• ql/TermStructures/impliedtermstructure.hpp
Observable
BlackVolTermStructure
BlackVarianceTermStructure Observer
ImpliedVolTermStructure
Note:
This term structure will remain linked to the original structure, i.e., any changes in the latter
will be reflected in this structure as well.
Warning:
It doesn’t make financial sense to have an asset-dependant implied Vol Term Structure. This
class should be used with term structures that are time dependant only
BlackVolTermStructure interface
• Date referenceDate () const
returns the reference date for which t=0
Observer interface
• void update ()
Visitability
• virtual void accept (Patterns::AcyclicVisitor &)
This method must be implemented in derived classes. An instance of Observer does not call this
method directly: instead, it will be called by the observables the instance registered with when
they need to notify any changes.
Implements Observer (p. 527).
The documentation for this class was generated from the following file:
• ql/Volatilities/impliedvoltermstructure.hpp
Observable
CashFlow
Coupon
FloatingRateCoupon Observer
IndexedCoupon
InArrearIndexedCoupon
Warning:
This class does not perform any date adjustment, i.e., the start and end date passed upon
construction should be already rolled to a business day.
FloatingRateCoupon interface
Visitability
The documentation for this class was generated from the following file:
• ql/CashFlows/inarrearindexedcoupon.hpp
#include <incrementalstatistics.hpp>
Warning:
high moments are numerically unstable for high average/standardDeviation ratios
Inspectors
Modifiers
• void reset ()
resets the data to a null set
Protected Attributes
• Size sampleNumber_
• Size downsideSampleNumber_
• double sampleWeight_
• double downsideSampleWeight_
• double sum_
• double quadraticSum_
• double downsideQuadraticSum_
• double cubicSum_
• double fourthPowerSum_
• double min_
• double max_
returns the standard deviation σ, defined as the square root of the variance.
returns the downside deviation, defined as the square root of the downside variance.
returns the error estimate , defined as the square root of the ratio of the variance to the number
of samples.
Precondition:
weights must be positive or null
The documentation for this class was generated from the following files:
• ql/Math/incrementalstatistics.hpp
• ql/Math/incrementalstatistics.cpp
Observable
Index
Xibor
Warning:
This method is used for output and comparison between indexes. It is not meant to be used
for writing switch-on-type code.
11.207.2.2 virtual Rate fixing (const Date & fixingDate) const [pure virtual]
Note:
any date passed as arguments must be a value date, i.e., the real calendar date advanced by
a number of settlement days.
• ql/index.hpp
Observable
CashFlow
Coupon
FloatingRateCoupon Observer
IndexedCoupon
InArrearIndexedCoupon UpFrontIndexedCoupon
Warning:
This class does not perform any date adjustment, i.e., the start and end date passed upon
construction should be already rolled to a business day.
CashFlow interface
Coupon interface
FloatingRateCoupon interface
Inspectors
Observer interface
• void update ()
Visitability
Note:
The amount is not discounted, i.e., it is the actual amount paid at the cash flow date.
This method must be implemented in derived classes. An instance of Observer does not call this
method directly: instead, it will be called by the observables the instance registered with when
they need to notify any changes.
Implements Observer (p. 527).
The documentation for this class was generated from the following file:
• ql/CashFlows/indexedcoupon.hpp
Error
IndexError
Specialized error.
Thrown upon accessing an array or container outside its range.
The documentation for this class was generated from the following file:
• ql/errors.hpp
Observable Observer
LazyObject
Instrument
Inspectors
Modifiers
Protected Attributes
• Handle< PricingEngine > engine_
Results
The value of this attribute and any other that derived classes might declare must be set during calculation.
• double NPV_
• double errorEstimate_
Warning:
calling this method will have no effects in case the performCalculation method was overrid-
den in a derived class.
When a derived argument structure is defined for an instrument, this method should be overrid-
den to fill it. This is mandatory in case a pricing engine is used.
Reimplemented in BarrierOption (p. 183), BinaryOption (p. 198), CapFloor (p. 248), Forward-
VanillaOption (p. 366), QuantoForwardVanillaOption (p. 567), QuantoVanillaOption (p. 573),
SimpleSwap (p. 600), Swaption (p. 625), and VanillaOption (p. 665).
This method performs all needed calculations by calling the performCalculations method.
Warning:
Objects cache the results of the previous calculation. Such results will be returned upon
later invocations of calculate. When the results depend on arguments which could change
between invocations, the lazy object must register itself as observer of such objects for the
calculations to be performed again when they change.
Should this method be redefined in derived classes, LazyObject::calculate() should be called
in the overriding method.
This method must leave the instrument in a consistent state when the expiration condition is met.
Reimplemented in BarrierOption (p. 183), BinaryOption (p. 198), QuantoVanillaOption (p. 573),
Swap (p. 622), and VanillaOption (p. 666).
In case a pricing engine is not used, this method must be overridden to perform the actual calcu-
lations and set any needed results. In case a pricing engine is used, the default implementation
can be used.
Implements LazyObject (p. 444).
Reimplemented in BarrierOption (p. 183), BinaryOption (p. 198), ForwardVanillaOption
(p. 366), QuantoVanillaOption (p. 573), Stock (p. 615), Swap (p. 622), Swaption (p. 626), and
VanillaOption (p. 666).
The documentation for this class was generated from the following file:
• ql/instrument.hpp
The documentation for this class was generated from the following files:
• ql/dataformatters.hpp
• ql/dataformatters.cpp
PricingEngine
VanillaEngine
IntegralEngine
The documentation for this class was generated from the following files:
• ql/PricingEngines/vanillaengines.hpp
• ql/PricingEngines/integralengines.cpp
Public Attributes
Protected Attributes
• bool isOutOfRange_
• RandomAccessIterator1 position_
• RandomAccessIterator1 xBegin_
• RandomAccessIterator1 xEnd_
• RandomAccessIterator2 yBegin_
• Size n_
Precondition:
The sequence of values for x must have been sorted for the result to make sense.
• ql/Math/interpolation.hpp
#include <interpolation2D.hpp>
Inheritance diagram for Interpolation2D:
Todo
Bicubic interpolation and bicubic spline
Public Types
Public Attributes
Protected Attributes
• bool isOutOfRange_
• RandomAccessIteratorX xPos_
• RandomAccessIteratorY yPos_
• RandomAccessIteratorX xBegin_
• RandomAccessIteratorX xEnd_
• RandomAccessIteratorY yBegin_
• RandomAccessIteratorY yEnd_
• const MatricialData & data_
Precondition:
The sequence of values for x must have been sorted for the result to make sense.
• ql/Math/interpolation2D.hpp
The documentation for this class was generated from the following files:
• ql/Math/normaldistribution.hpp
• ql/Math/normaldistribution.cpp
Friends
• class rStarFinder
The documentation for this class was generated from the following files:
• ql/Pricers/jamshidianswaption.hpp
• ql/Pricers/jamshidianswaption.cpp
Tree
BinomialTree
EqualProbabilitiesBinomialTree
JarrowRudd
The documentation for this class was generated from the following files:
• ql/Lattices/binomialtree.hpp
• ql/Lattices/binomialtree.cpp
Calendar
Johannesburg
Johannesburg calendar
Holidays:
• Saturdays
• Sundays
• New Year’s Day, January 1st (possibly moved to Monday)
• Good Friday
• Family Day, Easter Monday
• Human Rights Day, March 21st (possibly moved to Monday)
• Freedom Day, April 27th (possibly moved to Monday)
• Workers Day, May 1st (possibly moved to Monday)
• Youth Day, June 16th (possibly moved to Monday)
• National Women’s Day, August 9th (possibly moved to Monday)
• Heritage Day, September 24th (possibly moved to Monday)
• Day of Reconciliation, December 16th (possibly moved to Monday)
• Christmas December 25th
The documentation for this class was generated from the following file:
• ql/Calendars/johannesburg.hpp
Calendar
JointCalendar
Joint calendar.
Depending on the chosen rule, this calendar has a set of business days given by either the union
or the intersection of the sets of business days of the given calendars.
The documentation for this class was generated from the following files:
• ql/Calendars/jointcalendar.hpp
• ql/Calendars/jointcalendar.cpp
Observable
Index Observer
Xibor
JPYLibor
The documentation for this class was generated from the following file:
• ql/Indexes/jpylibor.hpp
Note:
This is not Knuth’s original implementation which is available at
http://www-cs-faculty.stanford.edu/∼knuth/programs.html, but rather a slightly
modified version wrapped in a C++ class. Such modifications did not affect the code but
only the data structures used, which were converted to their standard C++ equivalents.
Public Types
• typedef MonteCarlo::Sample< double > sample_type
returns a sample with weight 1.0 containing a random number uniformly chosen from (0.0,1.0)
The documentation for this class was generated from the following files:
• ql/RandomNumbers/knuthuniformrng.hpp
• ql/RandomNumbers/knuthuniformrng.cpp
The documentation for this class was generated from the following file:
• ql/Math/kronrodintegral.hpp
NumericalMethod
Lattice
ShortRateTree
• void rollback (const Handle< DiscretizedAsset > &asset, Time to) const
• void rollAlmostBack (const Handle< DiscretizedAsset > &asset, Time to) const
• virtual Size size (Size i) const =0
• virtual DiscountFactor discount (Size i, Size index) const =0
Discount factor at time t_i and node indexed by index.
Protected Attributes
• std::vector< Array > statePrices_
11.223.2.1 void rollback (const Handle< DiscretizedAsset > & asset, Time to) const
[virtual]
Roll back a DiscretizedAsset(p. 308) object until a certain time, performing any needed adjustment
Implements NumericalMethod (p. 522).
11.223.2.2 void rollAlmostBack (const Handle< DiscretizedAsset > & asset, Time to) const
[virtual]
Roll-back a DiscretizedAsset(p. 308) object until a certain time, but do not perform the final
adjustment.
Implements NumericalMethod (p. 522).
The documentation for this class was generated from the following files:
• ql/Lattices/lattice.hpp
• ql/Lattices/lattice.cpp
NumericalMethod
Lattice
Lattice2D
ShortRateTree
Two-dimensional lattice.
This lattice is based on two trinomial trees and primarly used for the G2 short-rate model.
Protected Attributes
• Handle< Tree > tree1_
• Handle< Tree > tree2_
The documentation for this class was generated from the following files:
• ql/Lattices/lattice2d.hpp
• ql/Lattices/lattice2d.cpp
Protected Attributes
• TimeGrid timeGrid_
• Size timeSteps_
• Handle< Lattices::Lattice > lattice_
This method must be implemented in derived classes. An instance of Observer does not call this
method directly: instead, it will be called by the observables the instance registered with when
they need to notify any changes.
Reimplemented from GenericModelEngine (p. 382).
The documentation for this class was generated from the following file:
• ql/PricingEngines/latticeshortratemodelengine.hpp
#include <lazyobject.hpp>
Inheritance diagram for LazyObject:
Observable Observer
LazyObject
Instrument PiecewiseFlatForward
Calculations
These methods do not modify the structure of the object and are therefore declared as const. Data
members which will be calculated on demand need to be declared as mutable.
• void recalculate ()
• void freeze ()
• void unfreeze ()
• virtual void calculate () const
• virtual void performCalculations () const =0
Observer interface
• void update ()
Protected Attributes
• bool calculated_
• bool frozen_
This method must be implemented in derived classes. An instance of Observer does not call this
method directly: instead, it will be called by the observables the instance registered with when
they need to notify any changes.
Implements Observer (p. 527).
This method force the recalculation of any results which would otherwise be cached. It is not
declared as const since it needs to call the non-const notifyObservers method.
Note:
Explicit invocation of this method is not necessary if the object registered itself as observer
with the structures on which such results depend. It is strongly advised to follow this policy
when possible.
This method constrains the object to return the presently cached results on successive invocations,
even if arguments upon which they depend should change.
This method reverts the effect of the freeze method, thus re-enabling recalculations.
This method performs all needed calculations by calling the performCalculations method.
Warning:
Objects cache the results of the previous calculation. Such results will be returned upon
later invocations of calculate. When the results depend on arguments which could change
between invocations, the lazy object must register itself as observer of such objects for the
calculations to be performed again when they change.
Should this method be redefined in derived classes, LazyObject::calculate()(p. 444) should
be called in the overriding method.
This method must implement any calculations which must be (re)done in order to calculate the
desired results.
Implemented in Instrument (p. 424), BarrierOption (p. 183), BinaryOption (p. 198), Forward-
VanillaOption (p. 366), QuantoVanillaOption (p. 573), Stock (p. 615), Swap (p. 622), Swaption
(p. 626), and VanillaOption (p. 666).
The documentation for this class was generated from the following file:
• ql/Patterns/lazyobject.hpp
CostFunction
LeastSquareFunction
Design a least square function as a cost function using the interface provided by LeastSquare-
Problem(p. 447) class. Array(p. 173) vector class requires function DotProduct() that computes
dot product and - operator. M matrix class requires function transpose() that computes transpose
and ∗ operator with vector class.
• virtual ∼LeastSquareFunction ()
Destructor.
Protected Attributes
• LeastSquareProblem & lsp_
least square problem
The documentation for this class was generated from the following file:
• ql/Optimization/leastsquare.hpp
• virtual void targetAndValue (const Array &x, Array &target, Array &fct2fit)=0
compute the target vector and the values of the fonction to fit
compute the target vector, the values of the fonction to fit and the matrix of derivatives
The documentation for this class was generated from the following file:
• ql/Optimization/leastsquare.hpp
Public Types
• typedef MonteCarlo::Sample< double > sample_type
returns a sample with weight 1.0 containing a random number uniformly chosen from (0.0,1.0)
The documentation for this class was generated from the following files:
• ql/RandomNumbers/lecuyeruniformrng.hpp
• ql/RandomNumbers/lecuyeruniformrng.cpp
Public Types
• typedef RandomAccessIterator x_iterator
iterates over vi j with j fixed.
Element access
Iterator access
Inspectors
The documentation for this class was generated from the following file:
• ql/Math/lexicographicalview.hpp
The documentation for this class was generated from the following file:
• ql/Math/interpolationtraits.hpp
Interpolation<RandomAccessIterator1,RandomAccessIterator2>
LinearInterpolation
Public Attributes
• typedef< RandomAccessIterator1 >::value_type argument_type
• typedef< RandomAccessIterator2 >::value_type result_type
Precondition:
The sequence of values for x must have been sorted for the result to make sense.
• ql/Math/linearinterpolation.hpp
LineSearch
ArmijoLineSearch
• virtual ∼LineSearch ()
Destructor.
• double lastFunctionValue ()
return last cost function value
• double lastGradientNorm2 ()
return square norm of last gradient
• bool succeed ()
• virtual double operator() (const Problem &P, double t_ini)=0
Perform line search.
• double update (Array ¶ms, const Array &direction, double beta, const Constraint
&constraint)
Protected Attributes
• Array xtd_
new x and its gradient
• Array gradient_
new x and its gradient
• double qt_
cost function value and gradient norm corresponding to xtd_
• double qpt_
cost function value and gradient norm corresponding to xtd_
• bool succeed_
flag to know if linesearch succeed
The documentation for this class was generated from the following file:
• ql/Optimization/linesearch.hpp
Observable Observer
Link
Precondition:
Class "Type" must inherit from Observable
• void update ()
Observer interface.
11.234.2.1 Link (const Handle< Type > & h = Handle< Type >(), bool registerAsObserver =
true) [explicit]
Warning:
see the documentation of the linkTo method for issues relatives to registerAsObserver.
11.234.3.1 void linkTo (const Handle< Type > & h, bool registerAsObserver = true)
Warning:
registerAsObserver is left as a backdoor in case the programmer cannot guarantee that the
object pointed to will remain alive for the whole lifetime of the handle—namely, it should be
set to false when the passed handle was created with owns = false (the latter should only
happen in a controlled environment, so that the programmer is aware of it). Failure to do so
can very likely result in a program crash. If the programmer does want the relinkable handle
to register as observer of such a handle, it is his responsibility to ensure that the relinkable
handle gets destroyed before the pointed object does.
The documentation for this class was generated from the following file:
• ql/relinkablehandle.hpp
#include <localconstantvol.hpp>
Inheritance diagram for LocalConstantVol:
Observable
LocalVolTermStructure Observer
LocalConstantVol
LocalVolTermStructure interface
Observer interface
• void update ()
Visitability
This method must be implemented in derived classes. An instance of Observer does not call this
method directly: instead, it will be called by the observables the instance registered with when
they need to notify any changes.
Implements Observer (p. 527).
The documentation for this class was generated from the following file:
• ql/Volatilities/localconstantvol.hpp
#include <localvolcurve.hpp>
Inheritance diagram for LocalVolCurve:
Observable
LocalVolTermStructure Observer
LocalVolCurve
LocalVolTermStructure interface
Observer interface
• void update ()
Visitability
This method must be implemented in derived classes. An instance of Observer does not call this
method directly: instead, it will be called by the observables the instance registered with when
they need to notify any changes.
Implements Observer (p. 527).
The relation Z T
σ2L (t)dt = σ2B T
0
holds, where σL (t) is the local volatility at time t and σB (T) is the Black volatility for maturity T.
From the above, the formula r
d 2
σL (t) = σ (t)t
dt B
can be deduced which is here implemented.
Implements LocalVolTermStructure (p. 464).
The documentation for this class was generated from the following file:
• ql/Volatilities/localvolcurve.hpp
#include <localvolsurface.hpp>
Inheritance diagram for LocalVolSurface:
Observable
LocalVolTermStructure Observer
LocalVolSurface
LocalVolTermStructure interface
Observer interface
• void update ()
Visitability
This method must be implemented in derived classes. An instance of Observer does not call this
method directly: instead, it will be called by the observables the instance registered with when
they need to notify any changes.
Implements Observer (p. 527).
The documentation for this class was generated from the following files:
• ql/Volatilities/localvolsurface.hpp
• ql/Volatilities/localvolsurface.cpp
#include <voltermstructure.hpp>
Inheritance diagram for LocalVolTermStructure:
Observable
LocalVolTermStructure
Local Volatility
• double localVol (const Date &d, double underlyingLevel, bool extrapolate=false) const
• double localVol (Time t, double underlyingLevel, bool extrapolate=false) const
Dates
Visitability
The documentation for this class was generated from the following files:
• ql/voltermstructure.hpp
• ql/voltermstructure.cpp
The documentation for this class was generated from the following file:
• ql/Math/interpolationtraits.hpp
Interpolation<RandomAccessIterator1,RandomAccessIterator2>
LogLinearInterpolation
Public Attributes
• typedef< RandomAccessIterator1 >::value_type argument_type
• typedef< RandomAccessIterator2 >::value_type result_type
Precondition:
The sequence of values for x must have been sorted for the result to make sense.
• ql/Math/loglinearinterpolation.hpp
Calendar
London
London calendar
Holidays:
• Saturdays
• Sundays
• New Year’s Day, January 1st (possibly moved to Monday)
• Good Friday
• Easter Monday
• Early May Bank Holiday, first Monday of May
• Spring Bank Holiday, last Monday of May
• Summer Bank Holiday, last Monday of August
• Christmas, December 25th (possibly moved to Monday or Tuesday)
• Boxing Day, December 26th (possibly moved to Monday or Tuesday)
The documentation for this class was generated from the following file:
• ql/Calendars/london.hpp
• ql/Utilities/iteratorcategories.hpp
helper class
This class provides a more comfortable interface to the argument list of Schedule’s constructor.
The documentation for this class was generated from the following file:
• ql/scheduler.hpp
Observable
MarketElement
The documentation for this class was generated from the following file:
• ql/marketelement.hpp
Public Types
• typedef double ∗ iterator
• typedef const double ∗ const_iterator
• typedef double ∗ row_iterator
• typedef const double ∗ const_row_iterator
• typedef Utilities::stepping_iterator< double ∗ > column_iterator
• typedef Utilities::stepping_iterator< const double ∗ > const_column_iterator
• Matrix ()
creates a null matrix
Algebraic operators
Iterator access
Element access
Inspectors
Utilities
Related Functions
• Disposable< Matrix > operator+ (const Matrix &, const Matrix &)
• Disposable< Matrix > operator- (const Matrix &, const Matrix &)
• Disposable< Matrix > operator ∗ (const Matrix &, double)
• Disposable< Matrix > operator ∗ (double, const Matrix &)
• Disposable< Matrix > operator/ (const Matrix &, double)
• Disposable< Array > operator ∗ (const Array &, const Matrix &)
• Disposable< Array > operator ∗ (const Matrix &, const Array &)
• Disposable< Matrix > operator ∗ (const Matrix &, const Matrix &)
• Disposable< Matrix > transpose (const Matrix &)
• Disposable< Matrix > outerProduct (const Array &v1, const Array &v2)
• template<class Iterator1, class Iterator2> Disposable< Matrix > outerProduct (Iterator1
v1begin, Iterator1 v1end, Iterator2 v2begin, Iterator2 v2end)
• Disposable< Matrix > pseudoSqrt (const Matrix &realSymmetricMatrix, Salvaging-
Algorithm sa=None)
returns the pseudo square root of a real symmetric matrix
Precondition:
all matrices involved in an algebraic expression must have the same size.
• ql/Math/matrix.hpp
MaxBasketPathPricer_old
The documentation for this class was generated from the following files:
• ql/MonteCarlo/maxbasketpathpricer.hpp
• ql/MonteCarlo/maxbasketpathpricer.cpp
PricingEngine
MCBarrierEngine
Protected Types
• typedef McSimulation< MonteCarlo::SingleAsset< RNG >, S >::path_generator_type
path_generator_type
• typedef McSimulation< MonteCarlo::SingleAsset< RNG >, S >::path_pricer_type path_-
pricer_type
• typedef McSimulation< MonteCarlo::SingleAsset< RNG >, S >::stats_type stats_type
Protected Attributes
• Size maxTimeStepsPerYear_
• Size requiredSamples_
• Size maxSamples_
• double requiredTolerance_
• bool isBiased_
• long seed_
The documentation for this class was generated from the following file:
• ql/PricingEngines/barrierengines.hpp
McBasket
The documentation for this class was generated from the following files:
• ql/Pricers/mcbasket.hpp
• ql/Pricers/mcbasket.cpp
PricingEngine
MCBinaryEngine
Protected Types
• typedef McSimulation< MonteCarlo::SingleAsset< RNG >, S >::path_generator_type
path_generator_type
• typedef McSimulation< MonteCarlo::SingleAsset< RNG >, S >::path_pricer_type path_-
pricer_type
• typedef McSimulation< MonteCarlo::SingleAsset< RNG >, S >::stats_type stats_type
• typedef RNG::ursg_type my_sequence_type
Protected Attributes
• Size maxTimeStepsPerYear_
• Size requiredSamples_
• Size maxSamples_
• double requiredTolerance_
• bool isBiased_
• long seed_
The documentation for this class was generated from the following file:
• ql/PricingEngines/binaryengines.hpp
McCliquetOption
The documentation for this class was generated from the following files:
• ql/Pricers/mccliquetoption.hpp
• ql/Pricers/mccliquetoption.cpp
McDiscreteArithmeticAPO
Todo
Continous Averaging version
The documentation for this class was generated from the following files:
• ql/Pricers/mcdiscretearithmeticapo.hpp
• ql/Pricers/mcdiscretearithmeticapo.cpp
McDiscreteArithmeticASO
Todo
Continous Averaging version
The documentation for this class was generated from the following files:
• ql/Pricers/mcdiscretearithmeticaso.hpp
• ql/Pricers/mcdiscretearithmeticaso.cpp
McEuropean
Deprecated
use VanillaOption with McEuropeanEngine
The documentation for this class was generated from the following files:
• ql/Pricers/mceuropean.hpp
• ql/Pricers/mceuropean.cpp
PricingEngine
MCVanillaEngine<RNG,S>
MCEuropeanEngine
Public Types
• typedef MCVanillaEngine< RNG, S >::path_generator_type path_generator_type
• typedef MCVanillaEngine< RNG, S >::path_pricer_type path_pricer_type
• typedef MCVanillaEngine< RNG, S >::stats_type stats_type
The documentation for this class was generated from the following file:
• ql/PricingEngines/mceuropeanengine.hpp
McEverest
The documentation for this class was generated from the following file:
• ql/Pricers/mceverest.hpp
McHimalaya
The documentation for this class was generated from the following files:
• ql/Pricers/mchimalaya.hpp
• ql/Pricers/mchimalaya.cpp
McMaxBasket
The documentation for this class was generated from the following files:
• ql/Pricers/mcmaxbasket.hpp
• ql/Pricers/mcmaxbasket.cpp
McPagoda
The documentation for this class was generated from the following file:
• ql/Pricers/mcpagoda.hpp
McPerformanceOption
The documentation for this class was generated from the following files:
• ql/Pricers/mcperformanceoption.hpp
• ql/Pricers/mcperformanceoption.cpp
Protected Attributes
• Handle< MonteCarlo::MonteCarloModel< MC, S > > mcModel_
The documentation for this class was generated from the following file:
• ql/Pricers/mcpricer.hpp
Public Types
• typedef MonteCarlo::MonteCarloModel< MC, S >::path_generator_type path_-
generator_type
• typedef MonteCarlo::MonteCarloModel< MC, S >::path_pricer_type path_pricer_type
• typedef MonteCarlo::MonteCarloModel< MC, S >::stats_type stats_type
Protected Attributes
• Handle< MonteCarlo::MonteCarloModel< MC, S > > mcModel_
• bool antitheticVariate_
• bool controlVariate_
The documentation for this class was generated from the following file:
• ql/PricingEngines/mcengine.hpp
PricingEngine
MCVanillaEngine
Protected Types
• typedef McSimulation< MonteCarlo::SingleAsset< RNG >, S >::path_generator_type
path_generator_type
• typedef McSimulation< MonteCarlo::SingleAsset< RNG >, S >::path_pricer_type path_-
pricer_type
• typedef McSimulation< MonteCarlo::SingleAsset< RNG >, S >::stats_type stats_type
Protected Attributes
• Size maxTimeStepsPerYear_
• Size requiredSamples_
• Size maxSamples_
• double requiredTolerance_
• long seed_
The documentation for this class was generated from the following file:
• ql/PricingEngines/mcengine.hpp
Public Types
• typedef MonteCarlo::Sample< double > sample_type
returns a sample with weight 1.0 containing a random number on (0.0, 1.0)-real-interval
The documentation for this class was generated from the following files:
• ql/RandomNumbers/mt19937uniformrng.hpp
• ql/RandomNumbers/mt19937uniformrng.cpp
Method
Protected Attributes
• Array initialValue_
initial value of unknowns
• int iterationNumber_
current iteration step in the Optimization process
• EndCriteria endCriteria_
optimization end criteria
• int functionEvaluation_
number of evaluation of cost function and its gradient
• int gradientEvaluation_
number of evaluation of cost function and its gradient
• double functionValue_
function and gradient norm values of the last step
• double squaredNorm_
function and gradient norm values of the last step
• Array x_
current values of the local minimum and the search direction
• Array searchDirection_
current values of the local minimum and the search direction
The documentation for this class was generated from the following file:
• ql/Optimization/method.hpp
Calendar
Milan
Milan calendar
Holidays:
• Saturdays
• Sundays
• New Year’s Day, January 1st
• Epiphany, January 6th
• Easter Monday
• Liberation Day, April 25th
• Labour Day, May 1st
• Republic Day, June 2nd (since 2000)
• Assumption, August 15th
• All Saint’s Day, November 1st
• Immaculate Conception, December 8th
• Christmas, December 25th
• St. Stephen, December 26th
The documentation for this class was generated from the following file:
• ql/Calendars/milan.hpp
MixedScheme
// copy constructor/assignment
// (these will be provided by the compiler if none is defined)
Operator(const Operator&);
Operator& operator=(const Operator&);
// inspectors
Size size();
// modifiers
void setTime(Time t);
// operator interface
arrayType applyTo(const arrayType&);
arrayType solveFor(const arrayType&);
static Operator identity(Size size);
// operator algebra
Operator operator*(double, const Operator&);
Operator operator+(const Operator&, const Operator&);
Operator operator+(const Operator&, const Operator&);
Warning:
The differential operator must be linear for this evolver to work.
Todo
add Douglas Scheme
Protected Types
• typedef Operator::arrayType arrayType
• typedef Operator operatorType
• typedef BoundaryCondition< Operator > bcType
Protected Attributes
• Operator L_
• Operator I_
• Operator explicitPart_
• Operator implicitPart_
• Time dt_
• double theta_
• std::vector< Handle< bcType > > bcs_
Friends
• class FiniteDifferenceModel< MixedScheme< Operator > >
The documentation for this class was generated from the following file:
• ql/FiniteDifferences/mixedscheme.hpp
Observer Observable
Model
OneFactorModel TwoFactorModel
BlackKarasinski OneFactorAffineModel G2
CoxIngersollRoss Vasicek
ExtendedCoxIngersollRoss HullWhite
Protected Attributes
• std::vector< Parameter > arguments_
• Handle< Optimization::Constraint > constraint_
Friends
• class CalibrationFunction
This method must be implemented in derived classes. An instance of Observer does not call this
method directly: instead, it will be called by the observables the instance registered with when
they need to notify any changes.
Implements Observer (p. 527).
11.267.2.2 void calibrate (const std::vector< Handle< CalibrationHelper > > & instruments,
Optimization::Method & method, const Optimization::Constraint & constraint =
Optimization::Constraint())
• ql/ShortRateModels/model.hpp
• ql/ShortRateModels/model.cpp
Examples:
DiscreteHedging.cpp.
Public Types
• typedef mc_traits::rsg_type rsg_type
• typedef mc_traits::path_generator_type path_generator_type
• typedef mc_traits::path_pricer_type path_pricer_type
• typedef path_generator_type::sample_type sample_type
• typedef path_pricer_type::result_type result_type
• typedef stats_traits stats_type
The documentation for this class was generated from the following file:
• ql/MonteCarlo/montecarlomodel.hpp
The documentation for this class was generated from the following files:
• ql/Math/normaldistribution.hpp
• ql/Math/normaldistribution.cpp
Todo
make it time-aware
inspectors
The documentation for this class was generated from the following file:
• ql/MonteCarlo/multipath.hpp
RAG{
RAG();
RAG(Matrix& covariance,
long seed);
Sample<Array> next();
};
Public Types
• typedef Sample< MultiPath > sample_type
The documentation for this class was generated from the following file:
• ql/MonteCarlo/multipathgenerator.hpp
RAG{
RAG();
RAG(Matrix& covariance,
long seed);
Sample<Array> next();
};
Public Types
• typedef Sample< MultiPath > sample_type
The documentation for this class was generated from the following file:
• ql/MonteCarlo/multipathgenerator.hpp
Deprecated
use SequenceStatistics(p. 591) instead
Inspectors
Modifiers
• void reset ()
resets the data to a null set
The documentation for this class was generated from the following files:
• ql/Math/multivariateaccumulator.hpp
• ql/Math/multivariateaccumulator.cpp
NeumannBC
Warning:
The value passed must not be the value of the derivative. Instead, it must be comprehensive
of the grid step between the first two points–i.e., it must be the difference between f[0] and
f[1].
Todo
generalize to time-dependent conditions.
This method sets the current time for time-dependent boundary conditions.
Implements BoundaryCondition< TridiagonalOperator > (p. 225).
The documentation for this class was generated from the following files:
• ql/FiniteDifferences/boundarycondition.hpp
• ql/FiniteDifferences/boundarycondition.cpp
Newton
Note:
This solver requires that the passed function object implement a method double
derivative(double).
The documentation for this class was generated from the following file:
• ql/Solvers1D/newton.hpp
NewtonSafe
Note:
This solver requires that the passed function object implement a method double
derivative(double).
The documentation for this class was generated from the following file:
• ql/Solvers1D/newtonsafe.hpp
Calendar
NewYork
• Saturdays
• Sundays
• New Year’s Day, January 1st (possibly moved to Monday if actually on Sunday, or to Friday
if on Saturday)
• Martin Luther King’s birthday, third Monday in January
• Washington’s birthday, third Monday in February
• Memorial Day, last Monday in May
• Independence Day, July 4th (moved to Monday if Sunday or Friday if Saturday)
• Labor Day, first Monday in September
• Columbus Day, second Monday in October
The documentation for this class was generated from the following file:
• ql/Calendars/newyork.hpp
Constraint
NoConstraint
No constraint.
The documentation for this class was generated from the following file:
• ql/Optimization/constraint.hpp
Default least square method using a given optimization algorithm (default is conjugate gradient).
min { r(x) : x in R∧ n }
where r(x) = ||f(x)||∧ 2 the euclidian norm of f(x) for some vector-valued function f from R∧ n to
R∧ m f = (f1, ..., fm) with fi(x) = bi - phi(x,ti) where bi is the vector of target data and phi is a scalar
function.
Assuming the differentiability of f, the gradient of r is define by grad r(x) = f’(x)∧ t.f(x)
Array(p. 173) vector class has the requirement of the previous class Handle(p. 390) class is need
to manage pointer to optimization method
• NonLinearLeastSquare (Constraint &c, double accuracy, int maxiter, Handle< Method >
om)
Default constructor.
• ∼NonLinearLeastSquare ()
Destructor.
• double residualNorm ()
return the least square residual norm
• double lastValue ()
return last function value
• int exitFlag ()
return exit flag
• int iterationsNumber ()
return the performed number of iterations
The documentation for this class was generated from the following file:
• ql/Optimization/leastsquare.hpp
The documentation for this class was generated from the following file:
• ql/Math/normaldistribution.hpp
The documentation for this class was generated from the following file:
• ql/null.hpp
Calendar
NullCalendar
• ql/Calendars/nullcalendar.hpp
Parameter
NullParameter
• ql/ShortRateModels/parameter.hpp
NumericalMethod
Lattice
ShortRateTree
Protected Attributes
• TimeGrid t_
The documentation for this class was generated from the following file:
• ql/numericalmethod.hpp
#include <observable.hpp>
Inheritance diagram for Observable:
BlackModel
BlackVolTermStructure
CapFlatVolatilityStructure
CapletForwardVolatilityStructure
CashFlow
Index
Link
LocalVolTermStructure
MarketElement
Observable
LazyObject
GenericModelEngine
CalibrationHelper
Model
SwaptionVolatilityStructure
TermStructure
RateHelper
Friends
• class Observer
This method should be called at the end of non-const methods or when the programmer desires
to notify any changes.
The documentation for this class was generated from the following file:
• ql/Patterns/observable.hpp
#include <observable.hpp>
Inheritance diagram for Observer:
BlackModel
IndexedCoupon
ParCoupon
CompositeMarketElement
DerivedMarketElement
Xibor
Link
LazyObject
GenericModelEngine
CalibrationHelper
Model
AffineTermStructure
DriftTermStructure
ExtendedDiscountCurve
ForwardSpreadedTermStructure
ImpliedTermStructure
QuantoTermStructure
RateHelper
ZeroSpreadedTermStructure
BlackConstantVol
BlackVarianceCurve
BlackVarianceSurface
ImpliedVolTermStructure
LocalConstantVol
LocalVolCurve
LocalVolSurface
This method must be implemented in derived classes. An instance of Observer does not call this
method directly: instead, it will be called by the observables the instance registered with when
they need to notify any changes.
Implemented in BlackModel (p. 211), IndexedCoupon (p. 420), ParCoupon (p. 542), Xibor
(p. 676), DerivedMarketElement (p. 297), CompositeMarketElement (p. 267), LazyObject
(p. 444), GenericModelEngine (p. 382), LatticeShortRateModelEngine (p. 442), Link (p. 455),
CalibrationHelper (p. 241), Model (p. 503), AffineTermStructure (p. 160), DriftTermStructure
(p. 319), ExtendedDiscountCurve (p. 341), ForwardSpreadedTermStructure (p. 364), Implied-
TermStructure (p. 410), QuantoTermStructure (p. 571), RateHelper (p. 578), ZeroSpreadedTerm-
Structure (p. 682), BlackConstantVol (p. 208), BlackVarianceCurve (p. 217), BlackVariance-
Surface (p. 219), ImpliedVolTermStructure (p. 412), LocalConstantVol (p. 458), LocalVol-
Curve (p. 460), LocalVolSurface (p. 462), GenericModelEngine< ShortRateModels::One-
FactorAffineModel, Instruments::Swaption::arguments, Instruments::Swaption::results
> (p. 382), GenericModelEngine< BlackModel, Instruments::Swaption::arguments, In-
struments::Swaption::results > (p. 382), GenericModelEngine< ShortRateModels::Model,
Arguments, Results > (p. 382), GenericModelEngine< BlackModel, Instruments::Cap-
Floor::arguments, Instruments::CapFloor::results > (p. 382), GenericModelEngine< ShortRate-
Models::AffineModel, Instruments::CapFloor::arguments, Instruments::CapFloor::results >
(p. 382), GenericModelEngine< ShortRateModels::Model, Instruments::CapFloor::arguments,
Instruments::CapFloor::results > (p. 382), GenericModelEngine< ShortRateModels::Model, In-
struments::Swaption::arguments, Instruments::Swaption::results > (p. 382), LatticeShortRate-
ModelEngine< Instruments::Swaption::arguments, Instruments::Swaption::results > (p. 442),
LatticeShortRateModelEngine< Instruments::CapFloor::arguments, Instruments::Cap-
Floor::results > (p. 442), Link< LocalVolTermStructure > (p. 455), Link< BlackVarianceCurve >
(p. 455), Link< MarketElement > (p. 455), Link< BlackVolTermStructure > (p. 455), and Link<
TermStructure > (p. 455).
The documentation for this class was generated from the following file:
• ql/Patterns/observable.hpp
Observer Observable
Model
OneFactorModel AffineModel
OneFactorAffineModel
CoxIngersollRoss Vasicek
ExtendedCoxIngersollRoss HullWhite
The documentation for this class was generated from the following file:
• ql/ShortRateModels/onefactormodel.hpp
Observer Observable
Model
OneFactorModel
BlackKarasinski OneFactorAffineModel
CoxIngersollRoss Vasicek
ExtendedCoxIngersollRoss HullWhite
The documentation for this class was generated from the following files:
• ql/ShortRateModels/onefactormodel.hpp
• ql/ShortRateModels/onefactormodel.cpp
The documentation for this class was generated from the following file:
• ql/ShortRateModels/onefactormodel.hpp
NumericalMethod
Lattice
OneFactorModel::ShortRateTree
The documentation for this class was generated from the following file:
• ql/ShortRateModels/onefactormodel.hpp
TridiagonalOperator
OneFactorOperator
The documentation for this class was generated from the following file:
• ql/FiniteDifferences/onefactoroperator.hpp
Observable Observer
LazyObject
Instrument
Option
ForwardVanillaOption QuantoVanillaOption
QuantoForwardVanillaOption
Examples:
DiscreteHedging.cpp.
Public Types
• enum Type { Call, Put, Straddle }
The documentation for this class was generated from the following file:
• ql/option.hpp
DiffusionProcess
OrnsteinUhlenbeckProcess
dx = −axt dt + σdWt .
11.293.2.1 double expectation (Time t0, double x0, Time dt) const [virtual]
11.293.2.2 double variance (Time t0, double x0, Time dt) const [virtual]
• ql/diffusionprocess.hpp
Calendar
Oslo
Oslo calendar
Holidays:
• Saturdays
• Sundays
• Holy Thursday
• Good Friday
• Easter Monday
• Ascension
• Whit(Pentecost) Monday
• New Year’s Day, January 1st
• May Day, May 1st
• National Independence Day, May 17st
• Christmas, December 25th
• Boxing Day, December 26th
The documentation for this class was generated from the following file:
• ql/Calendars/oslo.hpp
Error
OutOfMemoryError
Specialized error.
Thrown upon failed allocation.
The documentation for this class was generated from the following file:
• ql/errors.hpp
PagodaPathPricer_old
The documentation for this class was generated from the following files:
• ql/MonteCarlo/pagodapathpricer.hpp
• ql/MonteCarlo/pagodapathpricer.cpp
Parameter
Protected Attributes
• Array params_
• Optimization::Constraint constraint_
The documentation for this class was generated from the following file:
• ql/ShortRateModels/parameter.hpp
The documentation for this class was generated from the following file:
• ql/ShortRateModels/parameter.hpp
Observable
CashFlow
Coupon
FloatingRateCoupon Observer
ParCoupon
ShortFloatingRateCoupon
Warning:
This class does not perform any date adjustment, i.e., the start and end date passed upon
construction should be already rolled to a business day.
CashFlow interface
Coupon interface
FloatingRateCoupon interface
Inspectors
Observer interface
• void update ()
Visitability
Note:
The amount is not discounted, i.e., it is the actual amount paid at the cash flow date.
This method must be implemented in derived classes. An instance of Observer does not call this
method directly: instead, it will be called by the observables the instance registered with when
they need to notify any changes.
Implements Observer (p. 527).
The documentation for this class was generated from the following files:
• ql/CashFlows/parcoupon.hpp
• ql/CashFlows/parcoupon.cpp
Examples:
DiscreteHedging.cpp.
inspectors
The documentation for this class was generated from the following file:
• ql/MonteCarlo/path.hpp
Public Types
• typedef Sample< Path > sample_type
inspectors
The documentation for this class was generated from the following file:
• ql/MonteCarlo/pathgenerator.hpp
Deprecated
use PathGenerator(p. 544) instead
Examples:
DiscreteHedging.cpp.
Public Types
• typedef Sample< Path > sample_type
inspectors
11.302.2.1 PathGenerator_old (double drift, double variance, const TimeGrid & times, long
seed = 0)
Warning:
the initial time is assumed to be zero and must not be included in the passed vector
The documentation for this class was generated from the following file:
• ql/MonteCarlo/pathgenerator.hpp
Protected Attributes
• RelinkableHandle< TermStructure > riskFreeTS_
The documentation for this class was generated from the following file:
• ql/MonteCarlo/pathpricer.hpp
Deprecated
use PathPricer(p. 546) instead
Examples:
DiscreteHedging.cpp.
Protected Attributes
• DiscountFactor discount_
• bool useAntitheticVariance_
The documentation for this class was generated from the following file:
• ql/MonteCarlo/pathpricer.hpp
Payoff
StrikedTypePayoff
The documentation for this class was generated from the following file:
• ql/payoff.hpp
Performance option.
A performance option is a variant of a cliquet option: the payoff of each forward-starting (a.k.a.
deferred strike) options is $ max(S/X- 1) $.
The documentation for this class was generated from the following files:
• ql/Pricers/performanceoption.hpp
• ql/Pricers/performanceoption.cpp
PerformanceOptionPathPricer_old
The documentation for this class was generated from the following files:
• ql/MonteCarlo/performanceoptionpathpricer.hpp
• ql/MonteCarlo/performanceoptionpathpricer.cpp
Related Functions
The documentation for this class was generated from the following file:
• ql/date.hpp
Parameter
PiecewiseConstantParameter
The documentation for this class was generated from the following file:
• ql/ShortRateModels/parameter.hpp
Observable Observer
TermStructure LazyObject
PiecewiseFlatForward
Warning:
The bootstrapping algorithm will raise an exception if any two instruments have the same
maturity date.
TermStructure interface
Friends
• class FFObjFunction
11.310.2.1 PiecewiseFlatForward (const Date & todaysDate, const std::vector< Date > &
dates, const std::vector< Rate > & forwards, const DayCounter & dayCounter)
In this constructor, the first date must be the reference date of the curve, the other dates are
the nodes of the term structure. The forward rate at index i is used in the period ti−1 < t ≤ ti .
Therefore, forwards[0] is used only to compute the zero yield for t = 0.
The documentation for this class was generated from the following files:
• ql/TermStructures/piecewiseflatforward.hpp
• ql/TermStructures/piecewiseflatforward.cpp
Payoff
StrikedTypePayoff
PlainVanillaPayoff
The former PlainPayoff has been renamed PlainVanillaPayoff(p. 555) to stress that fact that now
nobody elses derives from it
Examples:
DiscreteHedging.cpp.
The documentation for this class was generated from the following file:
• ql/payoff.hpp
Constraint
PositiveConstraint
• ql/Optimization/constraint.hpp
Error
PostconditionNotSatisfiedError
Specialized error.
Thrown upon an unsatisfied postcondition.
The documentation for this class was generated from the following file:
• ql/errors.hpp
Error
PreconditionNotSatisfiedError
Specialized error.
Thrown upon an unsatisfied precondition.
The documentation for this class was generated from the following file:
• ql/errors.hpp
GenericEngine
The documentation for this class was generated from the following file:
• ql/pricingengine.hpp
The documentation for this class was generated from the following files:
• ql/Math/primenumbers.hpp
• ql/Math/primenumbers.cpp
Protected Attributes
• CostFunction & costFunction_
Unconstrained cost function.
The documentation for this class was generated from the following file:
• ql/Optimization/problem.hpp
Public Types
• typedef UnaryFunction::result_type value_type
• typedef const value_type ∗ pointer
• typedef const value_type & reference
Dereferencing
Random access
Difference
Comparisons
Public Attributes
• typedef< Iterator >::difference_type difference_type
Related Functions
The documentation for this class was generated from the following file:
• ql/Utilities/processingiterator.hpp
Protected Attributes
• Handle< GenericEngine< ArgumentsType, ResultsType > > originalEngine_
• ArgumentsType ∗ originalArguments_
• const ResultsType ∗ originalResults_
The documentation for this class was generated from the following file:
• ql/PricingEngines/quantoengines.hpp
#include <quantoforwardvanillaoption.hpp>
Inheritance diagram for QuantoForwardVanillaOption:
Observable Observer
LazyObject
Instrument
Option
VanillaOption
QuantoVanillaOption
QuantoForwardVanillaOption
Public Types
When a derived argument structure is defined for an instrument, this method should be overrid-
den to fill it. This is mandatory in case a pricing engine is used.
Reimplemented from QuantoVanillaOption (p. 573).
The documentation for this class was generated from the following files:
• ql/Instruments/quantoforwardvanillaoption.hpp
• ql/Instruments/quantoforwardvanillaoption.cpp
Public Attributes
• double correlation
• RelinkableHandle< TermStructure > foreignRiskFreeTS
• RelinkableHandle< BlackVolTermStructure > exchRateVolTS
The documentation for this class was generated from the following file:
• ql/Instruments/quantovanillaoption.hpp
Public Attributes
• double qvega
• double qrho
• double qlambda
The documentation for this class was generated from the following file:
• ql/Instruments/quantovanillaoption.hpp
Observable
TermStructure
ZeroYieldStructure Observer
QuantoTermStructure
Note:
This term structure will remain linked to the original structures, i.e., any changes in the latters
will be reflected in this structure as well.
TermStructure interface
• DayCounter dayCounter () const
the day counter used for date/time conversion
Observer interface
• void update ()
This method must be implemented in derived classes. An instance of Observer does not call this
method directly: instead, it will be called by the observables the instance registered with when
they need to notify any changes.
Implements Observer (p. 527).
The documentation for this class was generated from the following file:
• ql/TermStructures/quantotermstructure.hpp
Observable Observer
LazyObject
Instrument
Option
VanillaOption
QuantoVanillaOption
QuantoForwardVanillaOption
Public Types
• typedef QuantoOptionArguments< VanillaOption::arguments > arguments
• typedef QuantoOptionResults< VanillaOption::results > results
greeks
Protected Attributes
• RelinkableHandle< TermStructure > foreignRiskFreeTS_
• RelinkableHandle< BlackVolTermStructure > exchRateVolTS_
• RelinkableHandle< MarketElement > correlation_
• double qvega_
• double qrho_
• double qlambda_
When a derived argument structure is defined for an instrument, this method should be overrid-
den to fill it. This is mandatory in case a pricing engine is used.
Reimplemented from VanillaOption (p. 665).
Reimplemented in QuantoForwardVanillaOption (p. 567).
This method must leave the instrument in a consistent state when the expiration condition is met.
Reimplemented from VanillaOption (p. 666).
In case a pricing engine is not used, this method must be overridden to perform the actual calcu-
lations and set any needed results. In case a pricing engine is used, the default implementation
can be used.
Reimplemented from VanillaOption (p. 666).
The documentation for this class was generated from the following files:
• ql/Instruments/quantovanillaoption.hpp
• ql/Instruments/quantovanillaoption.cpp
Deprecated
use RandomSequenceGenerator(p. 575) instead.
Public Types
• typedef MonteCarlo::Sample< Array > sample_type
The documentation for this class was generated from the following file:
• ql/RandomNumbers/randomarraygenerator.hpp
Warning:
do not use with low-discrepancy sequence generator
Public Types
• typedef MonteCarlo::Sample< Array > sample_type
The documentation for this class was generated from the following file:
• ql/RandomNumbers/randomsequencegenerator.hpp
The documentation for this class was generated from the following files:
• ql/dataformatters.hpp
• ql/dataformatters.cpp
#include <ratehelpers.hpp>
Inheritance diagram for RateHelper:
Observer Observable
RateHelper
RateHelper interface
Observer interface
• void update ()
Protected Attributes
Warning:
Being a pointer and not a Handle(p. 390), the term structure is not guaranteed to remain
allocated for the whole life of the rate helper. It is responsibility of the programmer to ensure
that the pointer remains valid. It is advised that rate helpers be used only in term structure
constructors, setting the term structure to this, i.e., the one being constructed.
This method must be implemented in derived classes. An instance of Observer does not call this
method directly: instead, it will be called by the observables the instance registered with when
they need to notify any changes.
Implements Observer (p. 527).
The documentation for this class was generated from the following files:
• ql/TermStructures/ratehelpers.hpp
• ql/TermStructures/ratehelpers.cpp
RelinkableHandle
Precondition:
Class "Type" must inherit from Observable
11.329.2.1 RelinkableHandle (const Handle< Type > & h = Handle< Type >(), bool
registerAsObserver = true) [explicit]
Warning:
see the documentation of Link(p. 455) for issues relatives to registerAsObserver.
11.329.3.1 void linkTo (const Handle< Type > & h, bool registerAsObserver = true)
Warning:
see the documentation of Link(p. 455) for issues relatives to registerAsObserver.
The documentation for this class was generated from the following file:
• ql/relinkablehandle.hpp
Results
Greeks Value
results results
The documentation for this class was generated from the following file:
• ql/argsandresults.hpp
Ridder
The documentation for this class was generated from the following file:
• ql/Solvers1D/ridder.hpp
11.332.2.1 double percentile (double percentile, DataIterator begin, DataIterator end) const
Precondition:
percentile must be in range (0%-100%]
11.332.2.2 double gaussianPercentile (double percentile, double mean, double std) const
Precondition:
percentile must be in range (0%-100%) extremes excluded
Precondition:
y must be in range [90%-100%)
Precondition:
percentile must be in range [90%-100%)
11.332.2.5 double valueAtRisk (double percentile, DataIterator begin, DataIterator end) const
Precondition:
y must be in range [90%-100%)
11.332.2.6 double gaussianValueAtRisk (double percentile, double mean, double std) const
Precondition:
percentile must be in range [90%-100%)
Precondition:
percentile must be in range 90%-100%
The documentation for this class was generated from the following file:
• ql/Math/riskmeasures.hpp
Deprecated
use IncrementalGaussianStatistics or Statistics instead
Modifiers
• void reset ()
Precondition:
weights must be positive or null
The documentation for this class was generated from the following file:
• ql/riskstatistics.hpp
weighted sample
Public Types
• typedef T value_type
Public Attributes
• T value
• double weight
The documentation for this struct was generated from the following file:
• ql/MonteCarlo/sample.hpp
Payment schedule.
Iterators
• typedef std::vector< Date >::const_iterator const_iterator
• const_iterator begin () const
• const_iterator end () const
Date access
Other inspectors
The documentation for this class was generated from the following files:
• ql/scheduler.hpp
• ql/scheduler.cpp
Secant
The documentation for this class was generated from the following file:
• ql/Solvers1D/secant.hpp
Examples:
EuropeanOption.cpp.
The documentation for this class was generated from the following file:
• ql/Math/segmentintegral.hpp
Public Types
• typedef StatisticsType statistics_type
Modifiers
Protected Attributes
• Size dimension_
• std::vector< statistics_type > stats_
• std::vector< double > results_
• Matrix quadraticSum_
The documentation for this class was generated from the following file:
• ql/Math/sequencestatistics.hpp
Warning:
This class does not perform any date adjustment, i.e., the start and end date passed upon
construction should be already rolled to a business day.
inhibit calculation
Unlike ParCoupon(p. 541), this coupon can’t calculate its fixing for future dates, either.
The documentation for this class was generated from the following file:
• ql/CashFlows/shortindexedcoupon.hpp
Observable
CashFlow
Coupon
FloatingRateCoupon Observer
ParCoupon
ShortFloatingRateCoupon
Warning:
This class does not perform any date adjustment, i.e., the start and end date passed upon
construction should be already rolled to a business day.
Visitability
The documentation for this class was generated from the following files:
• ql/CashFlows/shortfloatingcoupon.hpp
• ql/CashFlows/shortfloatingcoupon.cpp
StandardStepCondition
ShoutCondition
Todo
Unify the intrinsicValues/Payoff thing
The documentation for this class was generated from the following file:
• ql/FiniteDifferences/shoutcondition.hpp
Observable
CashFlow
SimpleCashFlow
CashFlow interface
Visitability
Note:
The amount is not discounted, i.e., it is the actual amount paid at the cash flow date.
• ql/CashFlows/simplecashflow.hpp
DayCounter
SimpleDayCounter
Warning:
this day counter should be used together with NullCalendar, which ensures that dates at
whole-month distances share the same day of month. It is not guaranteed to work with any
other calendar.
The documentation for this class was generated from the following file:
• ql/DayCounters/simpledaycounter.hpp
Observable
MarketElement
SimpleMarketElement
Modifiers
The documentation for this class was generated from the following file:
• ql/marketelement.hpp
Observable Observer
LazyObject
Instrument
Swap
SimpleSwap
11.345.2.1 SimpleSwap (bool payFixedRate, const Date & startDate, const Date &
maturity, const Calendar & calendar, RollingConvention rollingConvention,
double nominal, int fixedFrequency, Rate fixedRate, bool fixedIsAdjusted,
const DayCounter & fixedDayCount, int floatingFrequency, const Handle<
Indexes::Xibor > & index, int indexFixingDays, Spread spread, const
RelinkableHandle< TermStructure > & termStructure, const Date & fixedStubDate
= Date(), bool fixedFromEnd = false, bool fixedLongFinal = false, const Date &
floatStubDate = Date(), bool floatFromEnd = false, bool floatLongFinal = false,
const std::string & isinCode = "", const std::string & description = "")
Deprecated
use the constructor taking two Schedules
When a derived argument structure is defined for an instrument, this method should be overrid-
den to fill it. This is mandatory in case a pricing engine is used.
Reimplemented from Instrument (p. 423).
The documentation for this class was generated from the following files:
• ql/Instruments/simpleswap.hpp
• ql/Instruments/simpleswap.cpp
Arguments
SimpleSwap::arguments
arguments
Public Attributes
• bool payFixed
• double nominal
• std::vector< Time > fixedResetTimes
• std::vector< Time > fixedPayTimes
• std::vector< double > fixedCoupons
• std::vector< Time > floatingAccrualTimes
• std::vector< Time > floatingResetTimes
• std::vector< Time > floatingPayTimes
• std::vector< Spread > floatingSpreads
The documentation for this class was generated from the following files:
• ql/Instruments/simpleswap.hpp
• ql/Instruments/simpleswap.cpp
Results
Value
SimpleSwap::results
• ql/Instruments/simpleswap.hpp
Method
Simplex
Constructor taking as input lambda as the characteristic length and tol as the precision
The documentation for this class was generated from the following files:
• ql/Optimization/simplex.hpp
• ql/Optimization/simplex.cpp
TrapezoidIntegral
SimpsonIntegral
The documentation for this class was generated from the following file:
• ql/Math/simpsonintegral.hpp
BarrierOption
BinaryOption
DiscreteGeometricAPO
SingleAssetOption
DiscreteGeometricASO
EuropeanOption
FdBsmOption
Black-Scholes-Merton option.
Protected Attributes
• double underlying_
• PlainVanillaPayoff payoff_
• Spread dividendYield_
• Rate riskFreeRate_
• Time residualTime_
• double volatility_
• bool hasBeenCalculated_
• double rho_
• double dividendRho_
• double vega_
• double theta_
• bool rhoComputed_
• bool dividendRhoComputed_
• bool vegaComputed_
• bool thetaComputed_
Friends
• class VolatilityFunction
• class DivYieldFunction
Warning:
Options with a gamma that changes sign have values that are not monotonic in the volatility,
e.g binary options. In these cases impliedVolatility can fail and in any case is meaningless.
Another possible source of failure is to have a targetValue that is not attainable with any
volatility, e.g. a targetValue lower than the intrinsic value in the case of American options.
The documentation for this class was generated from the following files:
• ql/Pricers/singleassetoption.hpp
• ql/Pricers/singleassetoption.cpp
Public Types
• typedef MonteCarlo::Sample< Array > sample_type
The documentation for this class was generated from the following files:
• ql/RandomNumbers/sobolrsg.hpp
• ql/RandomNumbers/sobolrsg.cpp
CuriouslyRecurringTemplate<Impl>
Solver1D
Before calling solveImpl, the base class will set its protected data members so that:
• fxMin_ and fxMax_ contain the values of the function in xMin_ and xMax_;
• root_ is a valid initial guess. The implementation of solveImpl can safely assume all of the
above.
• template<class F> double solve (const F &f, double accuracy, double guess, double step)
const
• template<class F> double solve (const F &f, double accuracy, double guess, double xMin,
double xMax) const
• void setMaxEvaluations (Size evaluations)
• void setLowerBound (double lowerBound)
sets the lower bound for the function domain
Protected Attributes
• double root_
• double xMin_
• double xMax_
• double fxMin_
• double fxMax_
• Size maxEvaluations_
• Size evaluationNumber_
11.352.2.1 double solve (const F & f, double accuracy, double guess, double step) const
This method returns the zero of the function f , determined with the given accuracy (i.e., x is
considered a zero if | f (x)| < accuracy). This method contains a bracketing routine to which an
initial guess must be supplied as well as a step used to scan the range of the possible bracketing
values.
11.352.2.2 double solve (const F & f, double accuracy, double guess, double xMin, double
xMax) const
This method returns the zero of the function f , determined with the given accuracy (i.e., x is
considered a zero if | f (x)| < accuracy). An initial guess must be supplied, as well as two values
xmin and xmax which must bracket the zero (i.e., either f (xmin ) ≤ 0 ≤ f (xmax ), or f (xmax ) ≤ 0 ≤ f (xmin )
must be true).
This method sets the maximum number of function evaluations for the bracketing routine. An
error is thrown if a bracket is not found after this number of evaluations.
The documentation for this class was generated from the following file:
• ql/solver1d.hpp
DiffusionProcess
SquareRootProcess
The documentation for this class was generated from the following file:
• ql/diffusionprocess.hpp
Method
SteepestDescent
• virtual ∼SteepestDescent ()
destructor
The documentation for this class was generated from the following files:
• ql/Optimization/steepestdescent.hpp
• ql/Optimization/steepestdescent.cpp
StepCondition
AmericanCondition ShoutCondition
The documentation for this class was generated from the following file:
• ql/FiniteDifferences/stepcondition.hpp
#include <steppingiterator.hpp>
Dereferencing
Random access
Difference
Comparisons
Public Attributes
• typedef< RandomAccessIterator >::difference_type difference_type
• typedef< RandomAccessIterator >::pointer pointer
• typedef< RandomAccessIterator >::reference reference
Related Functions
The documentation for this class was generated from the following file:
• ql/Utilities/steppingiterator.hpp
Observable Observer
LazyObject
Instrument
Stock
In case a pricing engine is not used, this method must be overridden to perform the actual calcu-
lations and set any needed results. In case a pricing engine is used, the default implementation
can be used.
Reimplemented from Instrument (p. 424).
The documentation for this class was generated from the following files:
• ql/Instruments/stock.hpp
• ql/Instruments/stock.cpp
Calendar
Stockholm
Stockholm calendar
Holidays:
• Saturdays
• Sundays
• Good Friday
• Easter Monday
• Ascension
• Whit(Pentecost) Monday
• Midsummer Eve (Friday between June 18-24)
• New Year’s Day, January 1st
• Epiphany, January 6th
• May Day, May 1st
• National Day, June 6th
• Christmas Eve, December 24th
• Christmas Day, December 25th
The documentation for this class was generated from the following file:
• ql/Calendars/stockholm.hpp
Payoff
StrikedTypePayoff
We need an intermediate class for all those payoff that have both a strike and a type but are not
necessarily plain-vanilla
Protected Attributes
• Option::Type type_
• double strike_
The documentation for this class was generated from the following file:
• ql/payoff.hpp
The documentation for this class was generated from the following files:
• ql/dataformatters.hpp
• ql/dataformatters.cpp
Payoff
StrikedTypePayoff
SupersharePayoff
The documentation for this class was generated from the following file:
• ql/payoff.hpp
The documentation for this class was generated from the following files:
• ql/Math/svd.hpp
• ql/Math/svd.cpp
Observable Observer
LazyObject
Instrument
Swap
SimpleSwap
Instrument interface
Additional interface
Protected Attributes
• std::vector< Handle< CashFlow > > firstLeg_
• std::vector< Handle< CashFlow > > secondLeg_
• RelinkableHandle< TermStructure > termStructure_
• double firstLegBPS_
• double secondLegBPS_
Unstable
This method was not tested enough to guarantee its functionality.
This method must leave the instrument in a consistent state when the expiration condition is met.
Reimplemented from Instrument (p. 424).
In case a pricing engine is not used, this method must be overridden to perform the actual calcu-
lations and set any needed results. In case a pricing engine is used, the default implementation
can be used.
Reimplemented from Instrument (p. 424).
The documentation for this class was generated from the following files:
• ql/Instruments/swap.hpp
• ql/Instruments/swap.cpp
Observer Observable
RateHelper
SwapRateHelper
Swap rate.
Warning:
This class assumes that the settlement date does not change between calls of setTerm-
Structure()(p. 624).
Protected Attributes
• int n_
• TimeUnit units_
• int settlementDays_
• Calendar calendar_
• RollingConvention convention_
• int fixedFrequency_
• int floatingFrequency_
• bool fixedIsAdjusted_
• DayCounter fixedDayCount_
• Date settlement_
• Handle< Instruments::SimpleSwap > swap_
• RelinkableHandle< TermStructure > termStructureHandle_
Warning:
Being a pointer and not a Handle(p. 390), the term structure is not guaranteed to remain
allocated for the whole life of the rate helper. It is responsibility of the programmer to ensure
that the pointer remains valid. It is advised that rate helpers be used only in term structure
constructors, setting the term structure to this, i.e., the one being constructed.
• ql/TermStructures/ratehelpers.hpp
• ql/TermStructures/ratehelpers.cpp
#include <swaption.hpp>
Inheritance diagram for Swaption:
Observable Observer
LazyObject
Instrument
Option
Swaption
• Swaption (const Handle< SimpleSwap > &swap, const Exercise &exercise, const
RelinkableHandle< TermStructure > &termStructure, const Handle< PricingEngine >
&engine)
• bool isExpired () const
returns whether the instrument is still tradable.
When a derived argument structure is defined for an instrument, this method should be overrid-
den to fill it. This is mandatory in case a pricing engine is used.
Reimplemented from Instrument (p. 423).
In case a pricing engine is not used, this method must be overridden to perform the actual calcu-
lations and set any needed results. In case a pricing engine is used, the default implementation
can be used.
Reimplemented from Instrument (p. 424).
The documentation for this class was generated from the following files:
• ql/Instruments/swaption.hpp
• ql/Instruments/swaption.cpp
Arguments
arguments
Swaption::arguments
Public Attributes
• Rate fairRate
• Rate fixedRate
• double fixedBPS
• Exercise::Type exerciseType
• std::vector< Time > exerciseTimes
The documentation for this class was generated from the following files:
• ql/Instruments/swaption.hpp
• ql/Instruments/swaption.cpp
Results
Value
Swaption::results
• ql/Instruments/swaption.hpp
Observable
SwaptionVolatilityStructure
SwaptionVolatilityMatrix
Todo
Either add correct copy behavior or inhibit copy. Right now, a copied instance would end up
with its own copy of the exercise date and length vector but an interpolation pointing to the
original ones.
The documentation for this class was generated from the following file:
• ql/Volatilities/swaptionvolmatrix.hpp
Observable
SwaptionVolatilityStructure
SwaptionVolatilityMatrix
• double volatility (const Date &start, const Period &length, Rate strike) const
returns the volatility for a given starting date and length
• virtual std::pair< Time, Time > convertDates (const Date &start, const Period &length)
const
implements the conversion between dates and times
The documentation for this class was generated from the following file:
• ql/swaptionvolstructure.hpp
Calendar
Sydney
• Saturdays
• Sundays
• New Year’s Day, January 1st
• Australia Day, January 26th (possibly moved to Monday)
• Good Friday
• Easter Monday
• ANZAC Day. April 25th (possibly moved to Monday)
• Queen’s Birthday, second Monday in June
• Bank Holiday, first Monday in August
• Labour Day, first Monday in October
• Christmas, December 25th (possibly moved to Monday or Tuesday)
• Boxing Day, December 26th (possibly moved to Monday or Tuesday)
The documentation for this class was generated from the following file:
• ql/Calendars/sydney.hpp
S = U · D · UT ,
where · is the standard matrix product and T is the transpose operator. This class implements the
Schur decomposition using the symmetric threshold Jacobi algorithm. For details on the different
Jacobi transfomations you can start from the great book on matrix computations by Golub and
Van Loan: Matrix(p. 471) computation, second edition The Johns Hopkins University Press
The documentation for this class was generated from the following files:
• ql/Math/symmetricschurdecomposition.hpp
• ql/Math/symmetricschurdecomposition.cpp
Calendar
TARGET
TARGET calendar
Holidays:
• Saturdays
• Sundays
• New Year’s Day, January 1st
• Good Friday (since 2000)
• Easter Monday (since 2000)
• Labour Day, May 1st (since 2000)
• Christmas, December 25th
• Day of Goodwill, December 26th (since 2000)
• December 31st (1998, 1999, and 2001)
The documentation for this class was generated from the following file:
• ql/Calendars/target.hpp
Observable
TermStructure
Term structure.
This abstract class defines the interface of concrete rate structures which will be derived from this
one.
Rates are assumed to be annual continuos compounding.
Todo
add derived class ParSwapTermStructure similar to ZeroYieldTermStructure, Discount-
Structure(p. 303), ForwardRateStructure(p. 361)
allow for different compounding rules and compounding frequencies
• Rate forward (const Date &, const Date &, bool extrapolate=false) const
discrete forward rate between two dates
Dates
The documentation for this class was generated from the following file:
• ql/termstructure.hpp
TermStructureConsistentModel
The documentation for this class was generated from the following file:
• ql/ShortRateModels/model.hpp
Parameter
TermStructureFittingParameter
The documentation for this class was generated from the following file:
• ql/ShortRateModels/parameter.hpp
DayCounter
Thirty360
Public Types
• enum Convention { USA, European, Italian }
The documentation for this class was generated from the following files:
• ql/DayCounters/thirty360.hpp
• ql/DayCounters/thirty360.cpp
Tree
BinomialTree
Tian
Protected Attributes
• double up_
• double down_
• double pu_
• double pd_
The documentation for this class was generated from the following files:
• ql/Lattices/binomialtree.hpp
• ql/Lattices/binomialtree.cpp
Map interface
• typedef super::iterator iterator
• typedef super::const_iterator const_iterator
• typedef super::reverse_iterator reverse_iterator
• typedef super::const_reverse_iterator const_reverse_iterator
• bool hasDate (const Date &) const
membership
Algebra
Other methods
The documentation for this class was generated from the following files:
• ql/CashFlows/timebasket.hpp
• ql/CashFlows/timebasket.cpp
Todo
What was the rationale for limiting the grid to positive times? Investigate and see whether
we can use it for negative ones as well.
• ql/grid.hpp
• ql/grid.cpp
Calendar
Tokyo
Tokyo calendar
Holidays:
• Saturdays
• Sundays
• New Year’s Day, January 1st
• Bank Holiday, January 2nd
• Bank Holiday, January 3rd
• Coming of Age Day, 2nd Monday in January
• National Foundation Day, February 11th
• Vernal Equinox
• Greenery Day, April 29th
• Constitution Memorial Day, May 3rd
• Holiday for a Nation, May 4th
• Children’s Day, May 5th
• Marine Day, 3rd Monday in July
• Respect for the Aged Day, 3rd Monday in September
• Autumnal Equinox
• Health and Sports Day, 2nd Monday in October
• National Culture Day, November 3rd
• Labor Thanksgiving Day, November 23rd
• Emperor’s Birthday, December 23rd
• Bank Holiday, December 31st
Holidays falling on a Sunday are observed on the Monday following except for the Bank Holidays
associated with the New Year
The documentation for this class was generated from the following file:
• ql/Calendars/tokyo.hpp
Calendar
Toronto
Toronto calendar
Holidays:
• Saturdays
• Sundays
• New Year’s Day, January 1st (possibly moved to Monday)
• Good Friday
• Easter Monday
• Victoria Day, The Monday on or preceding 24 May
• Canada Day, July 1st (possibly moved to Monday)
• Provincial Holiday, first Monday of August
• Labour Day, first Monday of September
• Thanksgiving Day, second Monday of October
• Remembrance Day, November 11th
• Christmas, December 25th (possibly moved to Monday or Tuesday)
• Boxing Day, December 26th (possibly moved to Monday or Tuesday)
The documentation for this class was generated from the following file:
• ql/Calendars/toronto.hpp
#include <trapezoidintegral.hpp>
Inheritance diagram for TrapezoidIntegral:
TrapezoidIntegral
SimpsonIntegral
Public Types
• template<class F> double defaultIteration (const F &f, double a, double b, double I, Size
N) const
• template<class F> double midPointIteration (const F &f, double a, double b, double I, Size
N) const
Protected Attributes
• double accuracy_
• Method method_
• Size maxIterations_
The documentation for this class was generated from the following file:
• ql/Math/trapezoidintegral.hpp
Tree
BinomialTree TrinomialTree
The documentation for this class was generated from the following file:
• ql/Lattices/tree.hpp
PricingEngine
TreeCapFloor
The documentation for this class was generated from the following files:
• ql/Pricers/treecapfloor.hpp
• ql/Pricers/treecapfloor.cpp
PricingEngine
TreeSwaption
The documentation for this class was generated from the following files:
• ql/Pricers/treeswaption.hpp
• ql/Pricers/treeswaption.cpp
TridiagonalOperator
Warning:
to use real time-dependant algebra, you must overload the corresponding operators in the
inheriting time-dependent class
Operator interface
• Disposable< Array > applyTo (const Array &v) const
apply operator to a given array
• Disposable< Array > SOR (const Array &rhs, double tol) const
solve linear system with SOR approach
Public Types
• typedef Array arrayType
Inspectors
• bool isTimeDependent ()
• const Array & lowerDiagonal () const
• const Array & diagonal () const
• const Array & upperDiagonal () const
Modifiers
Utilities
Protected Attributes
• Array diagonal_
• Array lowerDiagonal_
• Array upperDiagonal_
• Handle< TimeSetter > timeSetter_
Friends
• Disposable< TridiagonalOperator > operator+ (const TridiagonalOperator &)
• Disposable< TridiagonalOperator > operator- (const TridiagonalOperator &)
• Disposable< TridiagonalOperator > operator+ (const TridiagonalOperator &, const
TridiagonalOperator &)
• Disposable< TridiagonalOperator > operator- (const TridiagonalOperator &, const
TridiagonalOperator &)
• Disposable< TridiagonalOperator > operator ∗ (double, const TridiagonalOperator &)
• Disposable< TridiagonalOperator > operator ∗ (const TridiagonalOperator &, double)
• Disposable< TridiagonalOperator > operator/ (const TridiagonalOperator &, double)
The documentation for this class was generated from the following files:
• ql/FiniteDifferences/tridiagonaloperator.hpp
• ql/FiniteDifferences/tridiagonaloperator.cpp
The documentation for this class was generated from the following file:
• ql/FiniteDifferences/tridiagonaloperator.hpp
Tree
BinomialTree
EqualJumpsBinomialTree
Trigeorgis
The documentation for this class was generated from the following files:
• ql/Lattices/binomialtree.hpp
• ql/Lattices/binomialtree.cpp
Friends
• class TrinomialTree
The documentation for this class was generated from the following file:
• ql/Lattices/trinomialtree.hpp
Tree
TrinomialTree
Warning:
The diffusion term of the SDE must be independent of the underlying process.
Protected Attributes
• std::vector< Handle< TrinomialBranching > > branchings_
• double x0_
• std::vector< double > dx_
• TimeGrid timeGrid_
The documentation for this class was generated from the following files:
• ql/Lattices/trinomialtree.hpp
• ql/Lattices/trinomialtree.cpp
Observer Observable
Model
TwoFactorModel
G2
The documentation for this class was generated from the following files:
• ql/ShortRateModels/twofactormodel.hpp
• ql/ShortRateModels/twofactormodel.cpp
rt = f (t, xt , yt )
and
y
yt = µ y (t, yt )dt + σ y (t, yt )dWt
where W x and W y are two brownian motions satisfying
y
dWtx dWt = ρdt
The documentation for this class was generated from the following file:
• ql/ShortRateModels/twofactormodel.hpp
NumericalMethod
Lattice
Lattice2D
TwoFactorModel::ShortRateTree
The documentation for this class was generated from the following file:
• ql/ShortRateModels/twofactormodel.hpp
Observable
CashFlow
Coupon
FloatingRateCoupon Observer
IndexedCoupon
UpFrontIndexedCoupon
Warning:
This class does not perform any date adjustment, i.e., the start and end date passed upon
construction should be already rolled to a business day.
FloatingRateCoupon interface
Visitability
The documentation for this class was generated from the following file:
• ql/CashFlows/upfrontindexedcoupon.hpp
Observable
Index Observer
Xibor
USDLibor
The documentation for this class was generated from the following file:
• ql/Indexes/usdlibor.hpp
Results
Value
results results
pricing results
Public Attributes
• double value
• double errorEstimate
The documentation for this class was generated from the following file:
• ql/instrument.hpp
AmericanMCVanillaEngine
AnalyticEuropeanEngine
IntegralEngine
MCVanillaEngine
• ql/PricingEngines/vanillaengines.hpp
Observable Observer
LazyObject
Instrument
Option
VanillaOption
ForwardVanillaOption QuantoVanillaOption
QuantoForwardVanillaOption
Instrument interface
greeks
Protected Attributes
• double delta_
• double gamma_
• double theta_
• double vega_
• double rho_
• double dividendRho_
• double strikeSensitivity_
• Option::Type type_
• RelinkableHandle< MarketElement > underlying_
• double strike_
• Exercise exercise_
• RelinkableHandle< TermStructure > riskFreeTS_
• RelinkableHandle< TermStructure > dividendTS_
• RelinkableHandle< BlackVolTermStructure > volTS_
Warning:
Options with a gamma that changes sign have values that are not monotonic in the volatility,
e.g binary options. In these cases impliedVolatility can fail and in any case it is almost
meaningless. Another possible source of failure is to have a targetValue that is not attainable
with any volatility, e.g. a targetValue lower than the intrinsic value in the case of American
options.
When a derived argument structure is defined for an instrument, this method should be overrid-
den to fill it. This is mandatory in case a pricing engine is used.
Reimplemented from Instrument (p. 423).
Reimplemented in ForwardVanillaOption (p. 366), QuantoForwardVanillaOption (p. 567), and
QuantoVanillaOption (p. 573).
This method must leave the instrument in a consistent state when the expiration condition is met.
Reimplemented from Instrument (p. 424).
Reimplemented in QuantoVanillaOption (p. 573).
In case a pricing engine is not used, this method must be overridden to perform the actual calcu-
lations and set any needed results. In case a pricing engine is used, the default implementation
can be used.
Reimplemented from Instrument (p. 424).
Reimplemented in ForwardVanillaOption (p. 366), and QuantoVanillaOption (p. 573).
The documentation for this class was generated from the following files:
• ql/Instruments/vanillaoption.hpp
• ql/Instruments/vanillaoption.cpp
Arguments
VanillaOption::arguments
Public Attributes
• Handle< Payoff > payoff
• double underlying
• RelinkableHandle< TermStructure > riskFreeTS
• RelinkableHandle< TermStructure > dividendTS
• RelinkableHandle< BlackVolTermStructure > volTS
• Exercise::Type exerciseType
• std::vector< Time > stoppingTimes
• Time maturity
The documentation for this class was generated from the following files:
• ql/Instruments/vanillaoption.hpp
• ql/Instruments/vanillaoption.cpp
Results
Value Greeks
VanillaOption::results
results results
The documentation for this class was generated from the following file:
• ql/Instruments/vanillaoption.hpp
Observer Observable
Model
OneFactorModel AffineModel
OneFactorAffineModel
Vasicek
HullWhite
The documentation for this class was generated from the following files:
• ql/ShortRateModels/OneFactorModels/vasicek.hpp
• ql/ShortRateModels/OneFactorModels/vasicek.cpp
The documentation for this class was generated from the following file:
• ql/ShortRateModels/OneFactorModels/vasicek.hpp
The documentation for this class was generated from the following file:
• ql/Patterns/visitor.hpp
Calendar
Warsaw
Warsaw calendar
Holidays:
• Saturdays
• Sundays
• Easter Monday
• Corpus Christi
• New Year’s Day, January 1st
• May Day, May 1st
• Constitution Day, May 3rd
• Assumption of the Blessed Virgin Mary, August 15th
• All Saints Day, November 1st
• Independence Day, November 11th
• Christmas, December 25th
• 2nd Day of Christmas, December 26th
The documentation for this class was generated from the following file:
• ql/Calendars/warsaw.hpp
Calendar
Wellington
Wellington calendar
Holidays:
• Saturdays
• Sundays
• New Year’s Day, January 1st (possibly moved to Monday or Tuesday)
• Day after New Year’s Day, January 2st (possibly moved to Monday or Tuesday)
• Anniversary Day, Monday nearest January 22nd
• Waitangi Day. February 6th
• Good Friday
• Easter Monday
• ANZAC Day. April 25th
• Queen’s Birthday, first Monday in June
• Labour Day, fourth Monday in October
• Christmas, December 25th (possibly moved to Monday or Tuesday)
• Boxing Day, December 26th (possibly moved to Monday or Tuesday)
Note:
The holiday rules for Wellington(p. 674) were documented by David Gilbert for IDB
(http://www.jrefinery.com/ibd/)
The documentation for this class was generated from the following file:
• ql/Calendars/wellington.hpp
#include <xibor.hpp>
Inheritance diagram for Xibor:
Index Observer
Xibor
• Xibor (const std::string &familyName, int n, TimeUnit units, int settlementDays, Cur-
rency currency, const Calendar &calendar, bool isAdjusted, RollingConvention rolling-
Convention, const DayCounter &dayCounter, const RelinkableHandle< TermStructure >
&h)
Index interface
Observer interface
• void update ()
Inspectors
Note:
any date passed as arguments must be a value date, i.e., the real calendar date advanced by
a number of settlement days.
This method must be implemented in derived classes. An instance of Observer does not call this
method directly: instead, it will be called by the observables the instance registered with when
they need to notify any changes.
Implements Observer (p. 527).
Warning:
This method is used for output and comparison between indexes. It is not meant to be used
for writing switch-on-type code.
• ql/Indexes/xibor.hpp
• ql/Indexes/xibor.cpp
Public Types
• typedef std::map< std::string, History > HistoryMap
The documentation for this class was generated from the following files:
• ql/Indexes/xibormanager.hpp
• ql/Indexes/xibormanager.cpp
Observable
Index Observer
Xibor
ZARLibor
Todo
check settlement days
The documentation for this class was generated from the following file:
• ql/Indexes/zarlibor.hpp
Observable
TermStructure
ZeroYieldStructure
ZeroCurve
The documentation for this class was generated from the following files:
• ql/TermStructures/zerocurve.hpp
• ql/TermStructures/zerocurve.cpp
Observable
TermStructure
ZeroYieldStructure Observer
ZeroSpreadedTermStructure
Note:
This term structure will remain linked to the original structure, i.e., any changes in the latter
will be reflected in this structure as well.
TermStructure interface
Observer interface
• void update ()
This method must be implemented in derived classes. An instance of Observer does not call this
method directly: instead, it will be called by the observables the instance registered with when
they need to notify any changes.
Implements Observer (p. 527).
11.410.2.2 Rate forwardImpl (Time, bool extrapolate = false) const [protected, virtual]
Warning:
This method must disappear should the spread become a curve
• ql/TermStructures/zerospreadedtermstructure.hpp
#include <termstructure.hpp>
Inheritance diagram for ZeroYieldStructure:
Observable
TermStructure
ZeroYieldStructure
Returns the discount factor for the given date calculating it from the zero yield.
Implements TermStructure (p. 635).
11.411.2.2 Rate forwardImpl (Time, bool extrapolate = false) const [protected, virtual]
Returns the instantaneous forward rate for the given date calculating it from the zero yield.
Implements TermStructure (p. 635).
Reimplemented in ZeroSpreadedTermStructure (p. 682).
Returns the forward rate at a specified compound frequency for the given date calculating it from
the zero yield.
Implements TermStructure (p. 636).
The documentation for this class was generated from the following file:
• ql/termstructure.hpp
Calendar
Zurich
Zurich calendar
Holidays:
• Saturdays
• Sundays
• New Year’s Day, January 1st
• Berchtoldstag, January 2nd
• Good Friday
• Easter Monday
• Ascension Day
• Whit Monday
• Labour Day, May 1st
• National Day, August 1st
• Christmas, December 25th
• St. Stephen’s Day, December 26th
The documentation for this class was generated from the following file:
• ql/Calendars/zurich.hpp
ql/qldefines.hpp
ql/null.hpp
argsandresults.hpp
Namespaces
• namespace QuantLib
Defines
• #define QL_MIN_VOLATILITY 0.0
• #define QL_MIN_DIVYIELD 1.0e-7
• #define QL_MAX_VOLATILITY 4.0
• #define QL_MAX_DIVYIELD 4.0
688 QuantLib File Documentation
array.hpp
Namespaces
• namespace QuantLib
ql/termstructure.hpp ql/Math/normaldistribution.hpp
blackmodel.hpp
Namespaces
• namespace QuantLib
ql/handle.hpp ql/date.hpp
ql/Patterns/bridge.hpp
ql/calendar.hpp
calendar.cpp
Namespaces
• namespace QuantLib
calendar class
#include <ql/date.hpp>
#include <ql/Patterns/bridge.hpp>
Include dependency graph for calendar.hpp:
ql/handle.hpp ql/date.hpp
ql/Patterns/bridge.hpp
calendar.hpp
Namespaces
• namespace QuantLib::Calendars
• namespace QuantLib
Budapest calendar.
#include <ql/Calendars/budapest.hpp>
Include dependency graph for budapest.cpp:
ql/handle.hpp ql/date.hpp
ql/Patterns/bridge.hpp
ql/calendar.hpp
ql/Calendars/budapest.hpp
budapest.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Calendars
Budapest calendar.
#include <ql/calendar.hpp>
Include dependency graph for budapest.hpp:
ql/handle.hpp ql/date.hpp
ql/Patterns/bridge.hpp
ql/calendar.hpp
budapest.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Calendars
Frankfurt calendar.
#include <ql/Calendars/frankfurt.hpp>
Include dependency graph for frankfurt.cpp:
ql/handle.hpp ql/date.hpp
ql/Patterns/bridge.hpp
ql/calendar.hpp
ql/Calendars/frankfurt.hpp
frankfurt.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Calendars
Frankfurt calendar.
#include <ql/calendar.hpp>
Include dependency graph for frankfurt.hpp:
ql/handle.hpp ql/date.hpp
ql/Patterns/bridge.hpp
ql/calendar.hpp
frankfurt.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Calendars
Helsinki calendar.
#include <ql/Calendars/helsinki.hpp>
Include dependency graph for helsinki.cpp:
ql/handle.hpp ql/date.hpp
ql/Patterns/bridge.hpp
ql/calendar.hpp
ql/Calendars/helsinki.hpp
helsinki.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Calendars
Helsinki calendar.
#include <ql/calendar.hpp>
Include dependency graph for helsinki.hpp:
ql/handle.hpp ql/date.hpp
ql/Patterns/bridge.hpp
ql/calendar.hpp
helsinki.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Calendars
Johannesburg calendar.
#include <ql/Calendars/johannesburg.hpp>
Include dependency graph for johannesburg.cpp:
ql/handle.hpp ql/date.hpp
ql/Patterns/bridge.hpp
ql/calendar.hpp
ql/Calendars/johannesburg.hpp
johannesburg.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Calendars
Johannesburg calendar.
#include <ql/calendar.hpp>
Include dependency graph for johannesburg.hpp:
ql/handle.hpp ql/date.hpp
ql/Patterns/bridge.hpp
ql/calendar.hpp
johannesburg.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Calendars
Joint calendar.
#include <ql/Calendars/jointcalendar.hpp>
Include dependency graph for jointcalendar.cpp:
ql/handle.hpp ql/date.hpp
ql/Patterns/bridge.hpp
ql/calendar.hpp vector
ql/Calendars/jointcalendar.hpp
jointcalendar.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Calendars
Joint calendar.
#include <ql/calendar.hpp>
#include <vector>
Include dependency graph for jointcalendar.hpp:
ql/handle.hpp ql/date.hpp
ql/Patterns/bridge.hpp
ql/calendar.hpp vector
jointcalendar.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Calendars
London calendar.
#include <ql/Calendars/london.hpp>
Include dependency graph for london.cpp:
ql/handle.hpp ql/date.hpp
ql/Patterns/bridge.hpp
ql/calendar.hpp
ql/Calendars/london.hpp
london.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Calendars
London calendar.
#include <ql/calendar.hpp>
Include dependency graph for london.hpp:
ql/handle.hpp ql/date.hpp
ql/Patterns/bridge.hpp
ql/calendar.hpp
london.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Calendars
Milan calendar.
#include <ql/Calendars/milan.hpp>
Include dependency graph for milan.cpp:
ql/handle.hpp ql/date.hpp
ql/Patterns/bridge.hpp
ql/calendar.hpp
ql/Calendars/milan.hpp
milan.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Calendars
Milan calendar.
#include <ql/calendar.hpp>
Include dependency graph for milan.hpp:
ql/handle.hpp ql/date.hpp
ql/Patterns/bridge.hpp
ql/calendar.hpp
milan.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Calendars
ql/handle.hpp ql/date.hpp
ql/Patterns/bridge.hpp
ql/calendar.hpp
ql/Calendars/newyork.hpp
newyork.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Calendars
ql/handle.hpp ql/date.hpp
ql/Patterns/bridge.hpp
ql/calendar.hpp
newyork.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Calendars
ql/handle.hpp ql/date.hpp
ql/Patterns/bridge.hpp
ql/calendar.hpp
nullcalendar.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Calendars
Oslo calendar.
#include <ql/Calendars/oslo.hpp>
Include dependency graph for oslo.cpp:
ql/handle.hpp ql/date.hpp
ql/Patterns/bridge.hpp
ql/calendar.hpp
ql/Calendars/oslo.hpp
oslo.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Calendars
Oslo calendar.
#include <ql/calendar.hpp>
Include dependency graph for oslo.hpp:
ql/handle.hpp ql/date.hpp
ql/Patterns/bridge.hpp
ql/calendar.hpp
oslo.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Calendars
Stockholm calendar.
#include <ql/Calendars/stockholm.hpp>
Include dependency graph for stockholm.cpp:
ql/handle.hpp ql/date.hpp
ql/Patterns/bridge.hpp
ql/calendar.hpp
ql/Calendars/stockholm.hpp
stockholm.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Calendars
Stockholm calendar.
#include <ql/calendar.hpp>
Include dependency graph for stockholm.hpp:
ql/handle.hpp ql/date.hpp
ql/Patterns/bridge.hpp
ql/calendar.hpp
stockholm.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Calendars
Sydney calendar.
#include <ql/Calendars/sydney.hpp>
Include dependency graph for sydney.cpp:
ql/handle.hpp ql/date.hpp
ql/Patterns/bridge.hpp
ql/calendar.hpp
ql/Calendars/sydney.hpp
sydney.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Calendars
Sydney calendar.
#include <ql/calendar.hpp>
Include dependency graph for sydney.hpp:
ql/handle.hpp ql/date.hpp
ql/Patterns/bridge.hpp
ql/calendar.hpp
sydney.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Calendars
TARGET calendar.
#include <ql/Calendars/target.hpp>
Include dependency graph for target.cpp:
ql/handle.hpp ql/date.hpp
ql/Patterns/bridge.hpp
ql/calendar.hpp
ql/Calendars/target.hpp
target.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Calendars
TARGET calendar.
#include <ql/calendar.hpp>
Include dependency graph for target.hpp:
ql/handle.hpp ql/date.hpp
ql/Patterns/bridge.hpp
ql/calendar.hpp
target.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Calendars
Tokyo calendar.
#include <ql/Calendars/tokyo.hpp>
Include dependency graph for tokyo.cpp:
ql/handle.hpp ql/date.hpp
ql/Patterns/bridge.hpp
ql/calendar.hpp
ql/Calendars/tokyo.hpp
tokyo.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Calendars
Tokyo calendar.
#include <ql/calendar.hpp>
Include dependency graph for tokyo.hpp:
ql/handle.hpp ql/date.hpp
ql/Patterns/bridge.hpp
ql/calendar.hpp
tokyo.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Calendars
Toronto calendar.
#include <ql/Calendars/toronto.hpp>
Include dependency graph for toronto.cpp:
ql/handle.hpp ql/date.hpp
ql/Patterns/bridge.hpp
ql/calendar.hpp
ql/Calendars/toronto.hpp
toronto.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Calendars
Toronto calendar.
#include <ql/calendar.hpp>
Include dependency graph for toronto.hpp:
ql/handle.hpp ql/date.hpp
ql/Patterns/bridge.hpp
ql/calendar.hpp
toronto.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Calendars
Warsaw calendar.
#include <ql/Calendars/warsaw.hpp>
Include dependency graph for warsaw.cpp:
ql/handle.hpp ql/date.hpp
ql/Patterns/bridge.hpp
ql/calendar.hpp
ql/Calendars/warsaw.hpp
warsaw.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Calendars
Warsaw calendar.
#include <ql/calendar.hpp>
Include dependency graph for warsaw.hpp:
ql/handle.hpp ql/date.hpp
ql/Patterns/bridge.hpp
ql/calendar.hpp
warsaw.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Calendars
Wellington calendar.
#include <ql/Calendars/wellington.hpp>
Include dependency graph for wellington.cpp:
ql/handle.hpp ql/date.hpp
ql/Patterns/bridge.hpp
ql/calendar.hpp
ql/Calendars/wellington.hpp
wellington.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Calendars
Wellington calendar.
#include <ql/calendar.hpp>
Include dependency graph for wellington.hpp:
ql/handle.hpp ql/date.hpp
ql/Patterns/bridge.hpp
ql/calendar.hpp
wellington.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Calendars
Zurich calendar.
#include <ql/Calendars/zurich.hpp>
Include dependency graph for zurich.cpp:
ql/handle.hpp ql/date.hpp
ql/Patterns/bridge.hpp
ql/calendar.hpp
ql/Calendars/zurich.hpp
zurich.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Calendars
Zurich calendar.
#include <ql/calendar.hpp>
Include dependency graph for zurich.hpp:
ql/handle.hpp ql/date.hpp
ql/Patterns/bridge.hpp
ql/calendar.hpp
zurich.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Calendars
ql/Patterns/observable.hpp ql/Patterns/bridge.hpp
ql/daycounter.hpp
capvolstructures.hpp
Namespaces
• namespace QuantLib
ql/Patterns/observable.hpp ql/Patterns/visitor.hpp
cashflow.hpp
Namespaces
• namespace QuantLib::CashFlows
• namespace QuantLib
ql/CashFlows/basispointsensitivity.hpp
basispointsensitivity.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::CashFlows
basispointsensitivity.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::CashFlows
ql/CashFlows/fixedratecoupon.hpp ql/CashFlows/shortfloatingcoupon.hpp
cashflowvectors.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::CashFlows
ql/date.hpp
ql/Indexes/xibor.hpp
cashflowvectors.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::CashFlows
coupon.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::CashFlows
ql/CashFlows/coupon.hpp
fixedratecoupon.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::CashFlows
ql/CashFlows/coupon.hpp
floatingratecoupon.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::CashFlows
ql/CashFlows/floatingratecoupon.hpp ql/Indexes/xibor.hpp
ql/CashFlows/indexedcoupon.hpp
inarrearindexedcoupon.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::CashFlows
ql/qldefines.hpp
ql/CashFlows/floatingratecoupon.hpp ql/Indexes/xibor.hpp
ql/CashFlows/indexedcoupon.hpp
ql/CashFlows/shortindexedcoupon.hpp
indexcashflowvectors.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::CashFlows
indexed coupon
#include <ql/CashFlows/floatingratecoupon.hpp>
#include <ql/Indexes/xibor.hpp>
Include dependency graph for indexedcoupon.hpp:
ql/CashFlows/floatingratecoupon.hpp ql/Indexes/xibor.hpp
indexedcoupon.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::CashFlows
ql/CashFlows/parcoupon.hpp
parcoupon.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::CashFlows
ql/CashFlows/floatingratecoupon.hpp ql/Indexes/xibor.hpp
parcoupon.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::CashFlows
ql/CashFlows/shortfloatingcoupon.hpp ql/Indexes/xibormanager.hpp
shortfloatingcoupon.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::CashFlows
ql/CashFlows/floatingratecoupon.hpp ql/Indexes/xibor.hpp
ql/CashFlows/parcoupon.hpp
shortfloatingcoupon.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::CashFlows
ql/CashFlows/floatingratecoupon.hpp ql/Indexes/xibor.hpp
ql/CashFlows/indexedcoupon.hpp
shortindexedcoupon.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::CashFlows
ql/Patterns/observable.hpp ql/Patterns/visitor.hpp
ql/cashflow.hpp
simplecashflow.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::CashFlows
ql/CashFlows/timebasket.hpp
timebasket.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::CashFlows
timebasket.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::CashFlows
ql/CashFlows/floatingratecoupon.hpp ql/Indexes/xibor.hpp
ql/CashFlows/indexedcoupon.hpp
upfrontindexedcoupon.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::CashFlows
Known currencies.
#include <ql/qldefines.hpp>
Include dependency graph for currency.hpp:
ql/qldefines.hpp
currency.hpp
Namespaces
• namespace QuantLib
ql/qldefines.hpp
ql/Math/matrix.hpp ql/currency.hpp
ql/dataformatters.hpp ql/null.hpp
dataformatters.cpp
Namespaces
• namespace QuantLib
ql/qldefines.hpp
ql/currency.hpp ql/Math/matrix.hpp
dataformatters.hpp
Namespaces
• namespace QuantLib
ql/qldefines.hpp
ql/dataformatters.hpp ql/null.hpp
dataparsers.cpp
Namespaces
• namespace QuantLib
ql/date.hpp vector
dataparsers.hpp
Namespaces
• namespace QuantLib
ql/qldefines.hpp
ql/currency.hpp ql/Math/matrix.hpp
ql/dataformatters.hpp
date.cpp
Namespaces
• namespace QuantLib
date.hpp
Namespaces
• namespace QuantLib
ql/handle.hpp ql/date.hpp
ql/Patterns/bridge.hpp
daycounter.hpp
Namespaces
• namespace QuantLib::DayCounters
• namespace QuantLib
ql/handle.hpp ql/date.hpp
ql/Patterns/bridge.hpp
ql/daycounter.hpp
actual360.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::DayCounters
ql/handle.hpp ql/date.hpp
ql/Patterns/bridge.hpp
ql/daycounter.hpp
actual365.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::DayCounters
ql/DayCounters/actualactual.hpp ql/dataformatters.hpp
actualactual.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::DayCounters
ql/handle.hpp ql/date.hpp
ql/Patterns/bridge.hpp
ql/daycounter.hpp
actualactual.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::DayCounters
ql/handle.hpp ql/date.hpp
ql/Patterns/bridge.hpp
ql/daycounter.hpp
ql/DayCounters/simpledaycounter.hpp ql/DayCounters/thirty360.hpp
simpledaycounter.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::DayCounters
ql/handle.hpp ql/date.hpp
ql/Patterns/bridge.hpp
ql/daycounter.hpp
simpledaycounter.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::DayCounters
ql/handle.hpp ql/date.hpp
ql/Patterns/bridge.hpp
ql/daycounter.hpp
ql/DayCounters/thirty360.hpp
thirty360.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::DayCounters
ql/handle.hpp ql/date.hpp
ql/Patterns/bridge.hpp
ql/daycounter.hpp
thirty360.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::DayCounters
Diffusion process.
#include <ql/diffusionprocess.hpp>
#include <ql/Volatilities/localvolsurface.hpp>
#include <ql/Volatilities/localvolcurve.hpp>
#include <ql/Volatilities/localconstantvol.hpp>
Include dependency graph for diffusionprocess.cpp:
ql/diffusionprocess.hpp
ql/Volatilities/localvolsurface.hpp
diffusionprocess.cpp
ql/Volatilities/localvolcurve.hpp
ql/Volatilities/localconstantvol.hpp
Namespaces
• namespace QuantLib
Diffusion process.
#include <ql/termstructure.hpp>
#include <ql/voltermstructure.hpp>
Include dependency graph for diffusionprocess.hpp:
ql/termstructure.hpp ql/voltermstructure.hpp
diffusionprocess.hpp
Namespaces
• namespace QuantLib
typeinfo ql/errors.hpp
ql/handle.hpp ql/date.hpp
ql/numericalmethod.hpp ql/exercise.hpp
ql/discretizedasset.hpp
discretizedasset.cpp
Namespaces
• namespace QuantLib
typeinfo ql/errors.hpp
ql/handle.hpp ql/date.hpp
ql/numericalmethod.hpp ql/exercise.hpp
discretizedasset.hpp
Namespaces
• namespace QuantLib
ql/qldefines.hpp
disposable.hpp
Namespaces
• namespace QuantLib
errors.hpp
Namespaces
• namespace QuantLib
Defines
Value:
if (!(condition)) \
throw QuantLib::AssertionFailedError(\
QuantLib::Error::where(__FILE__,__LINE__) + description); \
else
Value:
if (!(condition)) \
throw QuantLib::PreconditionNotSatisfiedError(\
QuantLib::Error::where(__FILE__,__LINE__) + description); \
else
Examples:
DiscreteHedging.cpp, and swapvaluation.cpp.
Value:
if (!(condition)) \
throw QuantLib::PostconditionNotSatisfiedError(\
QuantLib::Error::where(__FILE__,__LINE__) + description); \
else
ql/handle.hpp ql/date.hpp
ql/instrument.hpp
ql/option.hpp vector
ql/exercise.hpp
exercise.cpp
Namespaces
• namespace QuantLib
ql/instrument.hpp
ql/option.hpp vector
exercise.hpp
Namespaces
• namespace QuantLib
ql/FiniteDifferences/fdtypedefs.hpp ql/discretizedasset.hpp
americancondition.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::FiniteDifferences
ql/null.hpp ql/FiniteDifferences/tridiagonaloperator.hpp
ql/FiniteDifferences/boundarycondition.hpp
boundarycondition.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::FiniteDifferences
ql/null.hpp ql/FiniteDifferences/tridiagonaloperator.hpp
boundarycondition.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::FiniteDifferences
ql/handle.hpp ql/array.hpp
ql/FiniteDifferences/tridiagonaloperator.hpp
ql/FiniteDifferences/bsmoperator.hpp
bsmoperator.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::FiniteDifferences
ql/handle.hpp ql/array.hpp
ql/FiniteDifferences/tridiagonaloperator.hpp
bsmoperator.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::FiniteDifferences
ql/qldefines.hpp
ql/FiniteDifferences/stepcondition.hpp ql/FiniteDifferences/boundarycondition.hpp
ql/FiniteDifferences/finitedifferencemodel.hpp
ql/FiniteDifferences/mixedscheme.hpp
cranknicolson.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::FiniteDifferences
D− matricial representation
#include <ql/FiniteDifferences/tridiagonaloperator.hpp>
Include dependency graph for dminus.hpp:
ql/handle.hpp ql/array.hpp
ql/FiniteDifferences/tridiagonaloperator.hpp
dminus.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::FiniteDifferences
D+ matricial representation
#include <ql/FiniteDifferences/tridiagonaloperator.hpp>
Include dependency graph for dplus.hpp:
ql/handle.hpp ql/array.hpp
ql/FiniteDifferences/tridiagonaloperator.hpp
dplus.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::FiniteDifferences
D+ D− matricial representation
#include <ql/FiniteDifferences/tridiagonaloperator.hpp>
Include dependency graph for dplusdminus.hpp:
ql/handle.hpp ql/array.hpp
ql/FiniteDifferences/tridiagonaloperator.hpp
dplusdminus.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::FiniteDifferences
D0 matricial representation
#include <ql/FiniteDifferences/tridiagonaloperator.hpp>
Include dependency graph for dzero.hpp:
ql/handle.hpp ql/array.hpp
ql/FiniteDifferences/tridiagonaloperator.hpp
dzero.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::FiniteDifferences
ql/qldefines.hpp
ql/FiniteDifferences/stepcondition.hpp ql/FiniteDifferences/boundarycondition.hpp
ql/FiniteDifferences/finitedifferencemodel.hpp
ql/FiniteDifferences/mixedscheme.hpp
expliciteuler.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::FiniteDifferences
ql/qldefines.hpp
ql/FiniteDifferences/stepcondition.hpp ql/FiniteDifferences/boundarycondition.hpp
ql/FiniteDifferences/finitedifferencemodel.hpp
ql/FiniteDifferences/mixedscheme.hpp
ql/FiniteDifferences/cranknicolson.hpp
fdtypedefs.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::FiniteDifferences
ql/qldefines.hpp
ql/FiniteDifferences/stepcondition.hpp ql/FiniteDifferences/boundarycondition.hpp
finitedifferencemodel.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::FiniteDifferences
ql/qldefines.hpp
ql/FiniteDifferences/stepcondition.hpp ql/FiniteDifferences/boundarycondition.hpp
ql/FiniteDifferences/finitedifferencemodel.hpp
ql/FiniteDifferences/mixedscheme.hpp
impliciteuler.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::FiniteDifferences
ql/qldefines.hpp
ql/FiniteDifferences/stepcondition.hpp ql/FiniteDifferences/boundarycondition.hpp
ql/FiniteDifferences/finitedifferencemodel.hpp
mixedscheme.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::FiniteDifferences
ql/FiniteDifferences/tridiagonaloperator.hpp ql/ShortRateModels/onefactormodel.hpp
ql/FiniteDifferences/onefactoroperator.hpp
onefactoroperator.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::FiniteDifferences
ql/FiniteDifferences/tridiagonaloperator.hpp ql/ShortRateModels/onefactormodel.hpp
onefactoroperator.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::FiniteDifferences
ql/FiniteDifferences/fdtypedefs.hpp ql/discretizedasset.hpp
shoutcondition.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::FiniteDifferences
ql/qldefines.hpp
ql/Math/matrix.hpp ql/currency.hpp
ql/grid.hpp
ql/numericalmethod.hpp
stepcondition.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::FiniteDifferences
tridiagonal operator
#include <ql/FiniteDifferences/tridiagonaloperator.hpp>
#include <ql/dataformatters.hpp>
Include dependency graph for tridiagonaloperator.cpp:
ql/handle.hpp ql/array.hpp
ql/dataformatters.hpp
tridiagonaloperator.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::FiniteDifferences
tridiagonal operator
#include <ql/array.hpp>
#include <ql/handle.hpp>
Include dependency graph for tridiagonaloperator.hpp:
ql/handle.hpp ql/array.hpp
tridiagonaloperator.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::FiniteDifferences
ql/array.hpp
valueatcenter.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::FiniteDifferences
ql/array.hpp
valueatcenter.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::FiniteDifferences
ql/functions/daycounters.hpp
daycounters.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Functions
ql/DayCounters/actual360.hpp
ql/DayCounters/actual365.hpp
daycounters.hpp
ql/DayCounters/actualactual.hpp
ql/DayCounters/thirty360.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Functions
math functions
#include <ql/functions/mathf.hpp>
#include <ql/Math/loglinearinterpolation.hpp>
#include <ql/Math/bilinearinterpolation.hpp>
#include <ql/Math/bicubicsplineinterpolation.hpp>
#include <ql/Math/riskmeasures.hpp>
#include <ql/Math/primenumbers.hpp>
#include <ql/RandomNumbers/mt19937uniformrng.hpp>
Include dependency graph for mathf.cpp:
ql/functions/mathf.hpp
ql/Math/loglinearinterpolation.hpp
ql/Math/bilinearinterpolation.hpp
ql/Math/bicubicsplineinterpolation.hpp mathf.cpp
ql/Math/riskmeasures.hpp
ql/Math/primenumbers.hpp
ql/RandomNumbers/mt19937uniformrng.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Functions
math functions
#include <ql/Math/matrix.hpp>
#include <vector>
Include dependency graph for mathf.hpp:
ql/array.hpp ql/Utilities/steppingiterator.hpp
ql/Math/matrix.hpp vector
mathf.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Functions
Volatility functions.
#include <ql/functions/vols.hpp>
#include <ql/Math/bilinearinterpolation.hpp>
#include <ql/Volatilities/localconstantvol.hpp>
#include <ql/Volatilities/localvolcurve.hpp>
#include <ql/Volatilities/blackvariancesurface.hpp>
Include dependency graph for vols.cpp:
ql/functions/vols.hpp
ql/Math/bilinearinterpolation.hpp
ql/Volatilities/localconstantvol.hpp vols.cpp
ql/Volatilities/localvolcurve.hpp
ql/Volatilities/blackvariancesurface.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Functions
Volatility functions.
#include <ql/Math/matrix.hpp>
#include <ql/daycounter.hpp>
#include <vector>
Include dependency graph for vols.hpp:
vols.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Functions
Grid classes with useful constructors for trees and finite diffs.
#include <ql/grid.hpp>
Include dependency graph for grid.cpp:
ql/qldefines.hpp
ql/currency.hpp ql/Math/matrix.hpp
ql/grid.hpp
grid.cpp
Namespaces
• namespace QuantLib
Grid classes with useful constructors for trees and finite diffs.
#include <ql/dataformatters.hpp>
#include <list>
#include <vector>
Include dependency graph for grid.hpp:
ql/qldefines.hpp
ql/currency.hpp ql/Math/matrix.hpp
grid.hpp
Namespaces
• namespace QuantLib
Reference-counted pointer.
#include <ql/errors.hpp>
#include <typeinfo>
Include dependency graph for handle.hpp:
ql/errors.hpp typeinfo
handle.hpp
Namespaces
• namespace QuantLib
history class
#include <ql/null.hpp>
#include <ql/Utilities/filteringiterator.hpp>
#include <ql/dataformatters.hpp>
#include <vector>
Include dependency graph for history.hpp:
ql/qldefines.hpp ql/Utilities/steppingiterator.hpp
ql/dataformatters.hpp vector
history.hpp
Namespaces
• namespace QuantLib
ql/daycounter.hpp ql/calendar.hpp
index.hpp
Namespaces
• namespace QuantLib::Indexes
• namespace QuantLib
ql/calendar.hpp ql/daycounter.hpp
ql/index.hpp ql/termstructure.hpp
audlibor.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Indexes
ql/calendar.hpp ql/daycounter.hpp
ql/index.hpp ql/termstructure.hpp
cadlibor.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Indexes
ql/calendar.hpp ql/daycounter.hpp
ql/index.hpp ql/termstructure.hpp
chflibor.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Indexes
Euribor index
#include <ql/Indexes/xibor.hpp>
#include <ql/Calendars/target.hpp>
#include <ql/DayCounters/actual360.hpp>
Include dependency graph for euribor.hpp:
ql/calendar.hpp ql/daycounter.hpp
ql/index.hpp ql/termstructure.hpp
euribor.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Indexes
ql/calendar.hpp ql/daycounter.hpp
ql/index.hpp ql/termstructure.hpp
gbplibor.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Indexes
ql/calendar.hpp ql/daycounter.hpp
ql/index.hpp ql/termstructure.hpp
jpylibor.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Indexes
ql/calendar.hpp ql/daycounter.hpp
ql/index.hpp ql/termstructure.hpp
usdlibor.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Indexes
ql/Indexes/xibor.hpp ql/Indexes/xibormanager.hpp
xibor.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Indexes
ql/index.hpp ql/termstructure.hpp
xibor.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Indexes
ql/Indexes/xibormanager.hpp
xibormanager.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Indexes
xibormanager.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Indexes
ql/calendar.hpp ql/daycounter.hpp
ql/index.hpp ql/termstructure.hpp
zarlibor.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Indexes
ql/Patterns/observable.hpp
ql/Patterns/lazyobject.hpp ql/pricingengine.hpp
instrument.hpp
Namespaces
• namespace QuantLib::Instruments
• namespace QuantLib
ql/Volatilities/blackconstantvol.hpp ql/Instruments/vanillaoption.hpp
ql/Instruments/barrieroption.hpp
barrieroption.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Instruments
ql/Instruments/vanillaoption.hpp
barrieroption.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Instruments
ql/Volatilities/blackconstantvol.hpp ql/Instruments/vanillaoption.hpp
ql/Instruments/binaryoption.hpp
binaryoption.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Instruments
ql/Instruments/vanillaoption.hpp
binaryoption.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Instruments
capfloor.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Instruments
capfloor.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Instruments
ql/Instruments/vanillaoption.hpp
ql/Instruments/forwardvanillaoption.hpp
forwardvanillaoption.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Instruments
ql/Instruments/vanillaoption.hpp
forwardvanillaoption.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Instruments
ql/Instruments/vanillaoption.hpp
ql/Instruments/quantovanillaoption.hpp ql/Instruments/forwardvanillaoption.hpp
ql/Instruments/quantoforwardvanillaoption.hpp
quantoforwardvanillaoption.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Instruments
ql/Instruments/vanillaoption.hpp
ql/Instruments/quantovanillaoption.hpp ql/Instruments/forwardvanillaoption.hpp
quantoforwardvanillaoption.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Instruments
ql/Instruments/vanillaoption.hpp
ql/Instruments/quantovanillaoption.hpp
quantovanillaoption.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Instruments
ql/Instruments/vanillaoption.hpp
quantovanillaoption.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Instruments
ql/Instruments/simpleswap.hpp
ql/CashFlows/cashflowvectors.hpp
simpleswap.cpp
ql/CashFlows/fixedratecoupon.hpp
ql/CashFlows/floatingratecoupon.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Instruments
simpleswap.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Instruments
ql/Patterns/observable.hpp ql/pricingengine.hpp
ql/relinkablehandle.hpp ql/Patterns/lazyobject.hpp
ql/marketelement.hpp ql/instrument.hpp
ql/Instruments/stock.hpp
stock.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Instruments
ql/Patterns/observable.hpp ql/pricingengine.hpp
ql/relinkablehandle.hpp ql/Patterns/lazyobject.hpp
ql/marketelement.hpp ql/instrument.hpp
stock.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Instruments
ql/Instruments/swap.hpp ql/CashFlows/basispointsensitivity.hpp
swap.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Instruments
swap.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Instruments
Swaption.
#include <ql/Instruments/swaption.hpp>
#include <ql/CashFlows/fixedratecoupon.hpp>
#include <ql/CashFlows/parcoupon.hpp>
#include <ql/Solvers1D/brent.hpp>
Include dependency graph for swaption.cpp:
ql/Instruments/swaption.hpp
ql/CashFlows/fixedratecoupon.hpp
swaption.cpp
ql/CashFlows/parcoupon.hpp
ql/Solvers1D/brent.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Instruments
Swaption class.
#include <ql/exercise.hpp>
#include <ql/numericalmethod.hpp>
#include <ql/Instruments/simpleswap.hpp>
Include dependency graph for swaption.hpp:
swaption.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Instruments
vanillaoption.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Instruments
vanillaoption.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Instruments
ql/diffusionprocess.hpp ql/Lattices/tree.hpp
ql/Lattices/binomialtree.hpp
binomialtree.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Lattices
ql/diffusionprocess.hpp ql/Lattices/tree.hpp
binomialtree.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Lattices
ql/errors.hpp typeinfo
ql/grid.hpp
ql/numericalmethod.hpp
ql/Lattices/tree.hpp ql/Lattices/lattice.hpp
ql/Lattices/bsmlattice.hpp
bsmlattice.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Lattices
ql/qldefines.hpp
ql/Math/matrix.hpp ql/currency.hpp
ql/grid.hpp
ql/numericalmethod.hpp
ql/Lattices/tree.hpp ql/Lattices/lattice.hpp
bsmlattice.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Lattices
Lattice class.
#include <ql/Lattices/lattice.hpp>
#include <ql/discretizedasset.hpp>
Include dependency graph for lattice.cpp:
typeinfo ql/errors.hpp
ql/handle.hpp ql/date.hpp
ql/numericalmethod.hpp ql/exercise.hpp
ql/Lattices/lattice.hpp ql/discretizedasset.hpp
lattice.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Lattices
ql/qldefines.hpp
ql/Math/matrix.hpp ql/currency.hpp
ql/grid.hpp
ql/numericalmethod.hpp
lattice.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Lattices
ql/grid.hpp ql/handle.hpp
ql/diffusionprocess.hpp ql/Lattices/tree.hpp
ql/Lattices/lattice2d.hpp
lattice2d.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Lattices
ql/grid.hpp ql/handle.hpp
ql/diffusionprocess.hpp ql/Lattices/tree.hpp
lattice2d.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Lattices
Tree class.
#include <ql/numericalmethod.hpp>
Include dependency graph for tree.hpp:
ql/qldefines.hpp
ql/Math/matrix.hpp ql/currency.hpp
ql/grid.hpp
ql/numericalmethod.hpp
tree.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Lattices
ql/diffusionprocess.hpp ql/Lattices/tree.hpp
ql/Lattices/trinomialtree.hpp
trinomialtree.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Lattices
ql/diffusionprocess.hpp ql/Lattices/tree.hpp
trinomialtree.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Lattices
ql/errors.hpp typeinfo
ql/handle.hpp list
ql/Patterns/observable.hpp
ql/relinkablehandle.hpp
marketelement.hpp
Namespaces
• namespace QuantLib
ql/handle.hpp ql/array.hpp
ql/Math/interpolation2D.hpp ql/Math/cubicspline.hpp
bicubicsplineinterpolation.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Math
ql/errors.hpp
ql/Math/interpolation2D.hpp
bilinearinterpolation.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Math
ql/Math/chisquaredistribution.hpp ql/Math/normaldistribution.hpp
chisquaredistribution.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Math
ql/qldefines.hpp
ql/currency.hpp ql/Math/matrix.hpp
ql/dataformatters.hpp
chisquaredistribution.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Math
ql/errors.hpp
ql/array.hpp ql/handle.hpp
cubicspline.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Math
ql/qldefines.hpp
ql/Math/gaussianstatistics.hpp
ql/Math/statistics.hpp
ql/Math/sequencestatistics.hpp
ql/Math/discrepancystatistics.hpp
discrepancystatistics.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Math
ql/qldefines.hpp
ql/Math/gaussianstatistics.hpp
ql/Math/statistics.hpp
ql/Math/sequencestatistics.hpp
discrepancystatistics.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Math
Error function.
#include <ql/Math/errorfunction.hpp>
#include <float.h>
Include dependency graph for errorfunction.cpp:
ql/qldefines.hpp functional
ql/Math/errorfunction.hpp float.h
errorfunction.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Math
Error function.
#include <ql/qldefines.hpp>
#include <functional>
Include dependency graph for errorfunction.hpp:
ql/qldefines.hpp functional
errorfunction.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Math
ql/qldefines.hpp functional
functional.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Math
Gamma function.
#include <ql/Math/gammadistribution.hpp>
Include dependency graph for gammadistribution.cpp:
ql/Math/gammadistribution.hpp
gammadistribution.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Math
Gamma distribution.
#include <ql/errors.hpp>
#include <ql/types.hpp>
#include <functional>
Include dependency graph for gammadistribution.hpp:
gammadistribution.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Math
ql/qldefines.hpp
ql/Math/matrix.hpp ql/currency.hpp
ql/dataformatters.hpp
ql/Math/normaldistribution.hpp
gaussianstatistics.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Math
statistics tool
#include <ql/Math/generalstatistics.hpp>
#include <ql/Math/functional.hpp>
Include dependency graph for generalstatistics.cpp:
ql/qldefines.hpp ql/Utilities/steppingiterator.hpp
ql/dataformatters.hpp vector
ql/Math/generalstatistics.hpp
generalstatistics.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Math
statistics tool
#include <ql/null.hpp>
#include <ql/dataformatters.hpp>
#include <vector>
Include dependency graph for generalstatistics.hpp:
ql/qldefines.hpp ql/Utilities/steppingiterator.hpp
ql/null.hpp ql/Math/matrix.hpp
ql/dataformatters.hpp vector
generalstatistics.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Math
ql/qldefines.hpp ql/Utilities/steppingiterator.hpp
ql/null.hpp ql/Math/matrix.hpp
ql/dataformatters.hpp
ql/Math/incrementalstatistics.hpp
incrementalstatistics.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Math
ql/qldefines.hpp ql/Utilities/steppingiterator.hpp
ql/null.hpp ql/Math/matrix.hpp
ql/dataformatters.hpp
incrementalstatistics.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Math
ql/errors.hpp
interpolation.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Math
ql/errors.hpp
interpolation2D.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Math
interpolationtraits.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Math
ql/errors.hpp ql/types.hpp
kronrodintegral.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Math
iterator
ql/Utilities/steppingiterator.hpp
lexicographicalview.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Math
ql/errors.hpp
ql/Math/interpolation.hpp
linearinterpolation.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Math
typeinfo ql/errors.hpp
ql/Math/linearinterpolation.hpp vector
loglinearinterpolation.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Math
ql/qldefines.hpp
ql/Math/matrix.hpp ql/currency.hpp
ql/Math/symmetricschurdecomposition.hpp ql/dataformatters.hpp
matrix.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Math
ql/array.hpp ql/Utilities/steppingiterator.hpp
matrix.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Math
ql/qldefines.hpp ql/Utilities/steppingiterator.hpp
ql/null.hpp ql/Math/matrix.hpp
ql/dataformatters.hpp vector
ql/Math/multivariateaccumulator.hpp
multivariateaccumulator.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Math
ql/qldefines.hpp ql/Utilities/steppingiterator.hpp
ql/null.hpp ql/Math/matrix.hpp
ql/dataformatters.hpp vector
multivariateaccumulator.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Math
ql/qldefines.hpp
ql/Math/matrix.hpp ql/currency.hpp
ql/dataformatters.hpp
ql/Math/normaldistribution.hpp
normaldistribution.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Math
ql/qldefines.hpp
ql/Math/matrix.hpp ql/currency.hpp
ql/dataformatters.hpp
normaldistribution.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Math
ql/qldefines.hpp
ql/types.hpp vector
ql/Math/primenumbers.hpp
primenumbers.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Math
ql/qldefines.hpp
ql/types.hpp vector
primenumbers.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Math
Risk functions.
#include <ql/null.hpp>
#include <ql/Math/normaldistribution.hpp>
Include dependency graph for riskmeasures.hpp:
ql/qldefines.hpp
ql/Math/errorfunction.hpp ql/dataformatters.hpp
ql/null.hpp ql/Math/normaldistribution.hpp
riskmeasures.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Math
ql/errors.hpp ql/types.hpp
segmentintegral.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Math
ql/qldefines.hpp
ql/Math/gaussianstatistics.hpp
ql/Math/statistics.hpp
sequencestatistics.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Math
Defines
• #define DEFINE_SEQUENCE_STAT_CONST_METHOD_VOID(METHOD)
• #define DEFINE_SEQUENCE_STAT_CONST_METHOD_DOUBLE(METHOD)
Value:
Value:
ql/qldefines.hpp ql/Utilities/steppingiterator.hpp
ql/Math/matrix.hpp ql/currency.hpp
ql/Math/gaussianstatistics.hpp
statistics.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Math
ql/array.hpp ql/Utilities/steppingiterator.hpp
ql/Math/matrix.hpp
ql/Math/svd.hpp
svd.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Math
ql/array.hpp ql/Utilities/steppingiterator.hpp
ql/Math/matrix.hpp
svd.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Math
ql/array.hpp ql/Utilities/steppingiterator.hpp
ql/Math/matrix.hpp
ql/Math/symmetricschurdecomposition.hpp
symmetriceigenvalues.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Math
ql/array.hpp ql/Utilities/steppingiterator.hpp
ql/Math/matrix.hpp
ql/Math/symmetricschurdecomposition.hpp vector
symmetricschurdecomposition.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Math
ql/array.hpp ql/Utilities/steppingiterator.hpp
ql/Math/matrix.hpp
symmetricschurdecomposition.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Math
ql/qldefines.hpp
ql/null.hpp
trapezoidintegral.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Math
ql/MonteCarlo/arithmeticapopathpricer.hpp ql/Pricers/singleassetoption.hpp
arithmeticapopathpricer.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::MonteCarlo
arithmeticapopathpricer.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::MonteCarlo
ql/MonteCarlo/arithmeticasopathpricer.hpp ql/Pricers/singleassetoption.hpp
arithmeticasopathpricer.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::MonteCarlo
ql/MonteCarlo/pathpricer.hpp ql/MonteCarlo/path.hpp
arithmeticasopathpricer.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::MonteCarlo
ql/MonteCarlo/barrierpathpricer.hpp
barrierpathpricer.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::MonteCarlo
ql/Instruments/barrieroption.hpp
ql/MonteCarlo/pathpricer.hpp
ql/MonteCarlo/path.hpp
barrierpathpricer.hpp
ql/RandomNumbers/rngtypedefs.hpp
ql/diffusionprocess.hpp
ql/payoff.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::MonteCarlo
vector ql/calendar.hpp
ql/MonteCarlo/basketpathpricer.hpp ql/Pricers/singleassetoption.hpp
basketpathpricer.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::MonteCarlo
basketpathpricer.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::MonteCarlo
ql/MonteCarlo/binarypathpricer.hpp
binarypathpricer.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::MonteCarlo
ql/Instruments/binaryoption.hpp
ql/MonteCarlo/pathpricer.hpp
ql/MonteCarlo/path.hpp
binarypathpricer.hpp
ql/RandomNumbers/rngtypedefs.hpp
ql/diffusionprocess.hpp
ql/payoff.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::MonteCarlo
Browian bridge.
#include <ql/MonteCarlo/path.hpp>
#include <ql/MonteCarlo/sample.hpp>
Include dependency graph for brownianbridge.hpp:
ql/qldefines.hpp
typeinfo ql/errors.hpp
ql/grid.hpp ql/MonteCarlo/sample.hpp
ql/MonteCarlo/path.hpp
brownianbridge.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::MonteCarlo
ql/MonteCarlo/cliquetoptionpathpricer.hpp ql/Pricers/singleassetoption.hpp
cliquetoptionpathpricer.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::MonteCarlo
ql/MonteCarlo/pathpricer.hpp ql/MonteCarlo/path.hpp
cliquetoptionpathpricer.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::MonteCarlo
ql/MonteCarlo/europeanpathpricer.hpp ql/Pricers/singleassetoption.hpp
europeanpathpricer.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::MonteCarlo
europeanpathpricer.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::MonteCarlo
ql/MonteCarlo/pathpricer.hpp ql/MonteCarlo/multipath.hpp
ql/MonteCarlo/everestpathpricer.hpp
everestpathpricer.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::MonteCarlo
ql/MonteCarlo/pathpricer.hpp ql/MonteCarlo/multipath.hpp
everestpathpricer.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::MonteCarlo
ql/MonteCarlo/geometricapopathpricer.hpp ql/Pricers/singleassetoption.hpp
geometricapopathpricer.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::MonteCarlo
geometricapopathpricer.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::MonteCarlo
ql/MonteCarlo/geometricasopathpricer.hpp ql/Pricers/singleassetoption.hpp
geometricasopathpricer.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::MonteCarlo
ql/MonteCarlo/pathpricer.hpp ql/MonteCarlo/path.hpp
geometricasopathpricer.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::MonteCarlo
ql/array.hpp ql/Utilities/steppingiterator.hpp
ql/Math/matrix.hpp
getcovariance.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::MonteCarlo
ql/MonteCarlo/pathpricer.hpp ql/MonteCarlo/multipath.hpp
ql/MonteCarlo/himalayapathpricer.hpp
himalayapathpricer.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::MonteCarlo
ql/MonteCarlo/pathpricer.hpp ql/MonteCarlo/multipath.hpp
himalayapathpricer.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::MonteCarlo
ql/MonteCarlo/pathpricer.hpp ql/MonteCarlo/multipath.hpp
ql/MonteCarlo/maxbasketpathpricer.hpp
maxbasketpathpricer.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::MonteCarlo
ql/MonteCarlo/pathpricer.hpp ql/MonteCarlo/multipath.hpp
maxbasketpathpricer.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::MonteCarlo
ql/MonteCarlo/pathgenerator.hpp
ql/MonteCarlo/multipathgenerator.hpp
ql/MonteCarlo/pathpricer.hpp
ql/RandomNumbers/mt19937uniformrng.hpp
ql/RandomNumbers/inversecumgaussianrng.hpp mctraits.hpp
ql/RandomNumbers/randomsequencegenerator.hpp
ql/RandomNumbers/sobolrsg.hpp
ql/RandomNumbers/inversecumgaussianrsg.hpp
ql/Math/normaldistribution.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::MonteCarlo
ql/RandomNumbers/rngtypedefs.hpp ql/MonteCarlo/montecarlomodel.hpp
mctypedefs.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::MonteCarlo
montecarlomodel.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::MonteCarlo
ql/qldefines.hpp
ql/Math/matrix.hpp ql/currency.hpp
ql/grid.hpp
ql/MonteCarlo/path.hpp
multipath.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::MonteCarlo
ql/qldefines.hpp
typeinfo ql/errors.hpp
ql/grid.hpp ql/MonteCarlo/sample.hpp
ql/MonteCarlo/path.hpp
ql/MonteCarlo/multipath.hpp
multipathgenerator.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::MonteCarlo
ql/MonteCarlo/pathpricer.hpp ql/MonteCarlo/multipath.hpp
ql/MonteCarlo/pagodapathpricer.hpp
pagodapathpricer.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::MonteCarlo
ql/MonteCarlo/pathpricer.hpp ql/MonteCarlo/multipath.hpp
pagodapathpricer.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::MonteCarlo
ql/qldefines.hpp
ql/Math/matrix.hpp ql/currency.hpp
ql/grid.hpp
path.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::MonteCarlo
pathgenerator.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::MonteCarlo
pathpricer.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::MonteCarlo
ql/MonteCarlo/performanceoptionpathpricer.hpp ql/Pricers/singleassetoption.hpp
performanceoptionpathpricer.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::MonteCarlo
performanceoptionpathpricer.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::MonteCarlo
weighted sample
#include <ql/qldefines.hpp>
Include dependency graph for sample.hpp:
ql/qldefines.hpp
sample.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::MonteCarlo
null values
#include <ql/qldefines.hpp>
Include dependency graph for null.hpp:
ql/qldefines.hpp
null.hpp
Namespaces
• namespace QuantLib
ql/qldefines.hpp
ql/Math/matrix.hpp ql/currency.hpp
ql/grid.hpp
numericalmethod.hpp
Namespaces
• namespace QuantLib
ql/Patterns/bridge.hpp ql/array.hpp
ql/Optimization/method.hpp
ql/Optimization/problem.hpp
ql/Optimization/linesearch.hpp
ql/Optimization/armijo.hpp
armijo.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Optimization
ql/Patterns/bridge.hpp ql/array.hpp
ql/Optimization/method.hpp
ql/Optimization/problem.hpp
ql/Optimization/linesearch.hpp
armijo.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Optimization
ql/Patterns/bridge.hpp ql/array.hpp
ql/Optimization/method.hpp
ql/Optimization/problem.hpp
ql/Optimization/linesearch.hpp
ql/Optimization/armijo.hpp
ql/Optimization/conjugategradient.hpp
conjugategradient.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Optimization
ql/Patterns/bridge.hpp ql/array.hpp
ql/Optimization/method.hpp
ql/Optimization/problem.hpp
ql/Optimization/linesearch.hpp
ql/Optimization/armijo.hpp
conjugategradient.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Optimization
ql/handle.hpp ql/array.hpp
ql/Patterns/bridge.hpp
constraint.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Optimization
ql/array.hpp
costfunction.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Optimization
Namespaces
• namespace QuantLib
• namespace QuantLib::Optimization
ql/Math/matrix.hpp ql/Optimization/conjugategradient.hpp
leastsquare.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Optimization
ql/Patterns/bridge.hpp ql/array.hpp
ql/Optimization/method.hpp
ql/Optimization/problem.hpp
linesearch.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Optimization
ql/Patterns/bridge.hpp ql/array.hpp
method.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Optimization
ql/Patterns/bridge.hpp ql/array.hpp
ql/Optimization/method.hpp
problem.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Optimization
ql/Patterns/bridge.hpp ql/array.hpp
ql/Optimization/method.hpp
ql/Optimization/problem.hpp vector
ql/Optimization/simplex.hpp
simplex.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Optimization
ql/Patterns/bridge.hpp ql/array.hpp
ql/Optimization/method.hpp
ql/Optimization/problem.hpp vector
simplex.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Optimization
ql/Patterns/bridge.hpp ql/array.hpp
ql/Optimization/method.hpp
ql/Optimization/problem.hpp
ql/Optimization/linesearch.hpp
ql/Optimization/armijo.hpp
ql/Optimization/steepestdescent.hpp
steepestdescent.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Optimization
ql/Patterns/bridge.hpp ql/array.hpp
ql/Optimization/method.hpp
ql/Optimization/problem.hpp
ql/Optimization/linesearch.hpp
ql/Optimization/armijo.hpp
steepestdescent.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Optimization
ql/Patterns/observable.hpp
ql/Patterns/lazyobject.hpp ql/pricingengine.hpp
ql/instrument.hpp
option.hpp
Namespaces
• namespace QuantLib
ql/errors.hpp typeinfo
ql/handle.hpp
bridge.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Patterns
ql/qldefines.hpp
curiouslyrecurring.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Patterns
ql/errors.hpp typeinfo
ql/handle.hpp list
ql/Patterns/observable.hpp
lazyobject.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Patterns
observer/observable pattern
#include <ql/handle.hpp>
#include <list>
Include dependency graph for observable.hpp:
ql/errors.hpp typeinfo
ql/handle.hpp list
observable.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Patterns
ql/qldefines.hpp
visitor.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Patterns
ql/Patterns/observable.hpp
ql/Patterns/lazyobject.hpp ql/pricingengine.hpp
ql/instrument.hpp
ql/option.hpp functional
payoff.hpp
Namespaces
• namespace QuantLib
ql/Pricers/capfloorpricer.hpp ql/ShortRateModels/model.hpp
ql/Pricers/analyticalcapfloor.hpp
analyticalcapfloor.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Pricers
ql/Pricers/capfloorpricer.hpp ql/ShortRateModels/model.hpp
analyticalcapfloor.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Pricers
ql/Pricers/barrieroptionpricer.hpp
ql/Instruments/barrieroption.hpp
ql/TermStructures/flatforward.hpp barrieroptionpricer.cpp
ql/Volatilities/blackconstantvol.hpp
ql/DayCounters/simpledaycounter.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Pricers
barrieroptionpricer.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Pricers
ql/Pricers/binaryoptionpricer.hpp
ql/DayCounters/simpledaycounter.hpp
binaryoptionpricer.cpp
ql/TermStructures/flatforward.hpp
ql/Volatilities/blackconstantvol.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Pricers
ql/Pricers/singleassetoption.hpp ql/PricingEngines/binaryengines.hpp
binaryoptionpricer.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Pricers
ql/blackmodel.hpp ql/Pricers/capfloorpricer.hpp
ql/Pricers/blackcapfloor.hpp
blackcapfloor.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Pricers
ql/blackmodel.hpp ql/Pricers/capfloorpricer.hpp
blackcapfloor.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Pricers
ql/blackmodel.hpp ql/Pricers/swaptionpricer.hpp
ql/Pricers/blackswaption.hpp
blackswaption.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Pricers
ql/blackmodel.hpp ql/Pricers/swaptionpricer.hpp
blackswaption.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Pricers
ql/Pricers/capfloorpricer.hpp
capfloorpricer.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Pricers
capfloorpricer.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Pricers
Cliquet option.
#include <ql/Pricers/cliquetoption.hpp>
Namespaces
• namespace QuantLib
• namespace QuantLib::Pricers
functional ql/qldefines.hpp
ql/Pricers/singleassetoption.hpp
ql/Pricers/europeanoption.hpp
continuousgeometricapo.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Pricers
functional ql/qldefines.hpp
ql/Pricers/singleassetoption.hpp
ql/Pricers/discretegeometricapo.hpp numeric
discretegeometricapo.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Pricers
functional ql/qldefines.hpp
ql/Pricers/singleassetoption.hpp
discretegeometricapo.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Pricers
functional ql/qldefines.hpp
ql/Pricers/singleassetoption.hpp
ql/Pricers/discretegeometricaso.hpp numeric
discretegeometricaso.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Pricers
functional ql/qldefines.hpp
ql/Pricers/singleassetoption.hpp
discretegeometricaso.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Pricers
european option
#include <ql/Pricers/europeanoption.hpp>
Include dependency graph for europeanoption.cpp:
functional ql/qldefines.hpp
ql/Pricers/singleassetoption.hpp
ql/Pricers/europeanoption.hpp
europeanoption.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Pricers
european option
#include <ql/Pricers/singleassetoption.hpp>
#include <ql/Math/normaldistribution.hpp>
Include dependency graph for europeanoption.hpp:
functional ql/qldefines.hpp
ql/Pricers/singleassetoption.hpp
europeanoption.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Pricers
american option
#include <ql/Pricers/fdstepconditionoption.hpp>
#include <ql/FiniteDifferences/americancondition.hpp>
Include dependency graph for fdamericanoption.hpp:
ql/Pricers/fdstepconditionoption.hpp ql/FiniteDifferences/americancondition.hpp
fdamericanoption.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Pricers
ql/dataformatters.hpp ql/Math/errorfunction.hpp
ql/Pricers/singleassetoption.hpp ql/Math/normaldistribution.hpp
ql/Pricers/fdmultiperiodoption.hpp
ql/Pricers/fdbermudanoption.hpp
fdbermudanoption.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Pricers
ql/Pricers/fdbsmoption.hpp ql/FiniteDifferences/fdtypedefs.hpp
ql/Pricers/fdmultiperiodoption.hpp
fdbermudanoption.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Pricers
ql/Pricers/fdbsmoption.hpp ql/FiniteDifferences/valueatcenter.hpp
fdbsmoption.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Pricers
ql/Pricers/singleassetoption.hpp
ql/FiniteDifferences/bsmoperator.hpp fdbsmoption.hpp
ql/FiniteDifferences/boundarycondition.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Pricers
Defines
• #define QL_NUM_OPT_MIN_GRID_POINTS 10
This is a safety check to be sure we have enough grid points.
• #define QL_NUM_OPT_GRID_POINTS_PER_YEAR 2
This is a safety check to be sure we have enough grid points.
ql/Pricers/fdbsmoption.hpp ql/FiniteDifferences/fdtypedefs.hpp
ql/Pricers/fdmultiperiodoption.hpp
ql/Pricers/fddividendoption.hpp
ql/Pricers/fddividendamericanoption.hpp
fddividendamericanoption.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Pricers
ql/Pricers/fdbsmoption.hpp ql/FiniteDifferences/fdtypedefs.hpp
ql/Pricers/fdmultiperiodoption.hpp
ql/Pricers/fddividendoption.hpp
fddividendamericanoption.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Pricers
functional ql/qldefines.hpp
ql/Pricers/singleassetoption.hpp
ql/Pricers/europeanoption.hpp
ql/Pricers/fddividendeuropeanoption.hpp
fddividendeuropeanoption.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Pricers
functional ql/qldefines.hpp
ql/Pricers/singleassetoption.hpp
ql/Pricers/europeanoption.hpp
fddividendeuropeanoption.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Pricers
ql/Pricers/fddividendoption.hpp
ql/Math/cubicspline.hpp
ql/Pricers/fddividendeuropeanoption.hpp fddividendoption.cpp
ql/FiniteDifferences/valueatcenter.hpp
iterator
Namespaces
• namespace QuantLib
• namespace QuantLib::Pricers
ql/Pricers/fdbsmoption.hpp ql/FiniteDifferences/fdtypedefs.hpp
ql/Pricers/fdmultiperiodoption.hpp
fddividendoption.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Pricers
ql/Pricers/fdmultiperiodoption.hpp ql/discretizedasset.hpp
ql/Pricers/fddividendoption.hpp ql/FiniteDifferences/shoutcondition.hpp
ql/Pricers/fddividendshoutoption.hpp
fddividendshoutoption.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Pricers
ql/Pricers/fdmultiperiodoption.hpp ql/discretizedasset.hpp
ql/Pricers/fddividendoption.hpp ql/FiniteDifferences/shoutcondition.hpp
fddividendshoutoption.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Pricers
ql/Pricers/fdeuropean.hpp ql/FiniteDifferences/valueatcenter.hpp
fdeuropean.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Pricers
ql/Pricers/fdbsmoption.hpp ql/FiniteDifferences/fdtypedefs.hpp
fdeuropean.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Pricers
ql/Pricers/europeanoption.hpp
ql/FiniteDifferences/americancondition.hpp
fdmultiperiodoption.cpp
ql/Pricers/fdmultiperiodoption.hpp
ql/FiniteDifferences/valueatcenter.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Pricers
ql/Pricers/fdbsmoption.hpp ql/FiniteDifferences/fdtypedefs.hpp
fdmultiperiodoption.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Pricers
shout option
#include <ql/Pricers/fdstepconditionoption.hpp>
#include <ql/FiniteDifferences/shoutcondition.hpp>
Include dependency graph for fdshoutoption.hpp:
ql/Pricers/fdstepconditionoption.hpp ql/FiniteDifferences/shoutcondition.hpp
fdshoutoption.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Pricers
fdstepconditionoption.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Pricers
ql/Pricers/fdbsmoption.hpp ql/FiniteDifferences/fdtypedefs.hpp
fdstepconditionoption.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Pricers
ql/Pricers/jamshidianswaption.hpp ql/Solvers1D/brent.hpp
jamshidianswaption.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Pricers
ql/Pricers/swaptionpricer.hpp ql/ShortRateModels/onefactormodel.hpp
jamshidianswaption.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Pricers
mcbasket.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Pricers
ql/Pricers/mcpricer.hpp ql/MonteCarlo/mctypedefs.hpp
mcbasket.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Pricers
ql/Pricers/mccliquetoption.hpp ql/MonteCarlo/cliquetoptionpathpricer.hpp
mccliquetoption.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Pricers
mccliquetoption.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Pricers
ql/Pricers/mcdiscretearithmeticapo.hpp
ql/Pricers/discretegeometricapo.hpp
mcdiscretearithmeticapo.cpp
ql/MonteCarlo/arithmeticapopathpricer.hpp
ql/MonteCarlo/geometricapopathpricer.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Pricers
mcdiscretearithmeticapo.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Pricers
ql/Pricers/mcdiscretearithmeticaso.hpp
ql/Pricers/discretegeometricaso.hpp
mcdiscretearithmeticaso.cpp
ql/MonteCarlo/arithmeticasopathpricer.hpp
ql/MonteCarlo/geometricasopathpricer.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Pricers
mcdiscretearithmeticaso.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Pricers
ql/Pricers/mceuropean.hpp ql/MonteCarlo/europeanpathpricer.hpp
mceuropean.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Pricers
mceuropean.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Pricers
ql/MonteCarlo/everestpathpricer.hpp ql/Pricers/mceverest.hpp
mceverest.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Pricers
ql/Pricers/mcpricer.hpp ql/MonteCarlo/mctypedefs.hpp
mceverest.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Pricers
mchimalaya.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Pricers
ql/dataformatters.hpp ql/MonteCarlo/montecarlomodel.hpp
ql/Pricers/mcpricer.hpp
mchimalaya.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Pricers
ql/MonteCarlo/maxbasketpathpricer.hpp ql/Pricers/mcmaxbasket.hpp
mcmaxbasket.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Pricers
ql/Pricers/mcpricer.hpp ql/MonteCarlo/mctypedefs.hpp
mcmaxbasket.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Pricers
mcpagoda.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Pricers
ql/Pricers/mcpricer.hpp ql/MonteCarlo/mctypedefs.hpp
mcpagoda.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Pricers
ql/Pricers/mcperformanceoption.hpp ql/MonteCarlo/performanceoptionpathpricer.hpp
mcperformanceoption.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Pricers
mcperformanceoption.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Pricers
ql/dataformatters.hpp ql/MonteCarlo/montecarlomodel.hpp
mcpricer.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Pricers
functional ql/qldefines.hpp
ql/Pricers/singleassetoption.hpp
ql/Pricers/europeanoption.hpp
ql/Pricers/performanceoption.hpp
performanceoption.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Pricers
Performance option.
#include <ql/Pricers/europeanoption.hpp>
Include dependency graph for performanceoption.hpp:
functional ql/qldefines.hpp
ql/Pricers/singleassetoption.hpp
ql/Pricers/europeanoption.hpp
performanceoption.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Pricers
ql/Pricers/singleassetoption.hpp ql/Solvers1D/brent.hpp
singleassetoption.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Pricers
ql/handle.hpp ql/date.hpp
ql/instrument.hpp
vector ql/option.hpp
ql/exercise.hpp ql/payoff.hpp
singleassetoption.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Pricers
Swaption pricer.
#include <ql/Pricers/swaptionpricer.hpp>
Include dependency graph for swaptionpricer.cpp:
ql/Pricers/swaptionpricer.hpp
swaptionpricer.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Pricers
swaptionpricer.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Pricers
treecapfloor.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Pricers
ql/PricingEngines/latticeshortratemodelengine.hpp ql/Instruments/capfloor.hpp
treecapfloor.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Pricers
ql/PricingEngines/genericengine.hpp
ql/Pricers/treeswaption.hpp ql/Pricers/swaptionpricer.hpp
treeswaption.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Pricers
ql/PricingEngines/latticeshortratemodelengine.hpp ql/Instruments/swaption.hpp
treeswaption.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Pricers
ql/qldefines.hpp
ql/null.hpp
ql/argsandresults.hpp
pricingengine.hpp
Namespaces
• namespace QuantLib
ql/PricingEngines/americanmcengines.hpp
americanmcengines.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::PricingEngines
ql/grid.hpp
ql/Math/svd.hpp
ql/MonteCarlo/mctypedefs.hpp americanmcengines.hpp
ql/MonteCarlo/europeanpathpricer.hpp
ql/PricingEngines/vanillaengines.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::PricingEngines
12.348 ql/PricingEngines/analyticamericanbinaryengine.cpp
File Reference
ql/PricingEngines/binaryengines.hpp
analyticamericanbinaryengine.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::PricingEngines
12.349 ql/PricingEngines/analyticeuropeanbinaryengine.cpp
File Reference
ql/PricingEngines/binaryengines.hpp
analyticeuropeanbinaryengine.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::PricingEngines
ql/PricingEngines/vanillaengines.hpp
analyticeuropeanengine.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::PricingEngines
ql/Instruments/barrieroption.hpp
ql/MonteCarlo/barrierpathpricer.hpp
barrierengines.hpp
ql/PricingEngines/genericengine.hpp
ql/PricingEngines/mcengine.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::PricingEngines
ql/exercise.hpp
ql/handle.hpp
ql/termstructure.hpp
ql/voltermstructure.hpp
binaryengines.hpp
ql/MonteCarlo/binarypathpricer.hpp
ql/MonteCarlo/mctraits.hpp
ql/PricingEngines/genericengine.hpp
ql/PricingEngines/mcengine.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::PricingEngines
ql/PricingEngines/discretizedvanillaoption.hpp
ql/Lattices/binomialtree.hpp
binomialvanillaengine.cpp
ql/TermStructures/flatforward.hpp
ql/Volatilities/blackconstantvol.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::PricingEngines
ql/PricingEngines/mcengine.hpp
cliquetengines.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::PricingEngines
ql/PricingEngines/discretizedvanillaoption.hpp vector
discretizedvanillaoption.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::PricingEngines
ql/discretizedasset.hpp
ql/Lattices/bsmlattice.hpp
discretizedvanillaoption.hpp
ql/Pricers/singleassetoption.hpp
ql/PricingEngines/vanillaengines.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::PricingEngines
ql/Instruments/forwardvanillaoption.hpp
ql/PricingEngines/genericengine.hpp
forwardengines.hpp
ql/Volatilities/impliedvoltermstructure.hpp
ql/TermStructures/impliedtermstructure.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::PricingEngines
ql/Patterns/observable.hpp ql/types.hpp
ql/Patterns/lazyobject.hpp ql/pricingengine.hpp
ql/instrument.hpp
ql/option.hpp
genericengine.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::PricingEngines
ql/PricingEngines/vanillaengines.hpp ql/Math/segmentintegral.hpp
integralengines.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::PricingEngines
ql/ShortRateModels/model.hpp ql/PricingEngines/genericengine.hpp
latticeshortratemodelengine.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::PricingEngines
ql/grid.hpp
ql/MonteCarlo/montecarlomodel.hpp
mcengine.hpp
ql/MonteCarlo/europeanpathpricer.hpp
ql/PricingEngines/vanillaengines.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::PricingEngines
ql/Instruments/quantovanillaoption.hpp
ql/PricingEngines/genericengine.hpp quantoengines.hpp
ql/TermStructures/quantotermstructure.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::PricingEngines
vanillaengines.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::PricingEngines
qldefines.hpp
Namespaces
• namespace QuantLib
Defines
• #define QL_HEX_VERSION 0x000304f0
version hexadecimal number
• #define QL_DUMMY_RETURN(x)
specific per-compiler definitions Is a dummy return statement required?
• #define QL_ALLOW_TEMPLATE_METHOD_CALLS 1
Blame Microsoft for this one...
• #define QL_TEMPLATE_METAPROGRAMMING_WORKS 1
• #define QL_SPECIALIZE_ITERATOR_TRAITS(T)
• #define QL_REVERSE_ITERATOR(iterator, type) std::reverse_iterator< iterator >
Blame Microsoft for this one...
• #define QL_FULL_ITERATOR_SUPPORT
ql/qldefines.hpp
ql/MonteCarlo/sample.hpp
boxmullergaussianrng.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::RandomNumbers
ql/qldefines.hpp
ql/MonteCarlo/sample.hpp
centrallimitgaussianrng.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::RandomNumbers
haltonrsg.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::RandomNumbers
haltonrsg.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::RandomNumbers
ql/qldefines.hpp
ql/MonteCarlo/sample.hpp
inversecumgaussianrng.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::RandomNumbers
ql/array.hpp ql/MonteCarlo/sample.hpp
inversecumgaussianrsg.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::RandomNumbers
ql/qldefines.hpp
ql/MonteCarlo/sample.hpp vector
ql/RandomNumbers/knuthuniformrng.hpp
knuthuniformrng.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::RandomNumbers
ql/qldefines.hpp
ql/MonteCarlo/sample.hpp vector
knuthuniformrng.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::RandomNumbers
ql/qldefines.hpp
ql/RandomNumbers/lecuyeruniformrng.hpp
lecuyeruniformrng.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::RandomNumbers
ql/qldefines.hpp
lecuyeruniformrng.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::RandomNumbers
ql/qldefines.hpp
ql/RandomNumbers/mt19937uniformrng.hpp
mt19937uniformrng.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::RandomNumbers
ql/qldefines.hpp
mt19937uniformrng.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::RandomNumbers
ql/qldefines.hpp ql/Utilities/steppingiterator.hpp
ql/MonteCarlo/sample.hpp ql/Math/matrix.hpp
ql/dataformatters.hpp
randomarraygenerator.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::RandomNumbers
ql/array.hpp ql/MonteCarlo/sample.hpp
randomsequencegenerator.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::RandomNumbers
ql/MonteCarlo/mctraits.hpp
rngtypedefs.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::RandomNumbers
sobolrsg.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::RandomNumbers
sobolrsg.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::RandomNumbers
ql/errors.hpp typeinfo
ql/handle.hpp list
ql/Patterns/observable.hpp
relinkablehandle.hpp
Namespaces
• namespace QuantLib
date scheduler
#include <ql/scheduler.hpp>
#include <ql/dataformatters.hpp>
Include dependency graph for scheduler.cpp:
ql/scheduler.hpp
scheduler.cpp
Namespaces
• namespace QuantLib
date scheduler
#include <ql/calendar.hpp>
#include <ql/null.hpp>
#include <vector>
Include dependency graph for scheduler.hpp:
ql/handle.hpp ql/date.hpp
ql/Patterns/bridge.hpp ql/null.hpp
ql/calendar.hpp vector
scheduler.hpp
Namespaces
• namespace QuantLib
ql/ShortRateModels/calibrationhelper.hpp ql/Solvers1D/brent.hpp
calibrationhelper.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::ShortRateModels
ql/blackmodel.hpp ql/pricingengine.hpp
calibrationhelper.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::ShortRateModels
12.387 ql/ShortRateModels/CalibrationHelpers/caphelper.cpp
File Reference
ql/ShortRateModels/CalibrationHelpers/caphelper.hpp
ql/CashFlows/cashflowvectors.hpp
caphelper.cpp
ql/Instruments/swap.hpp
ql/Pricers/blackcapfloor.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::ShortRateModels
• namespace QuantLib::ShortRateModels::CalibrationHelpers
12.388 ql/ShortRateModels/CalibrationHelpers/caphelper.hpp
File Reference
caphelper.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::ShortRateModels
• namespace QuantLib::ShortRateModels::CalibrationHelpers
12.389 ql/ShortRateModels/CalibrationHelpers/swaptionhelper.cpp
File Reference
ql/CashFlows/floatingratecoupon.hpp
ql/ShortRateModels/CalibrationHelpers/swaptionhelper.hpp swaptionhelper.cpp
ql/Pricers/blackswaption.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::ShortRateModels
• namespace QuantLib::ShortRateModels::CalibrationHelpers
12.390 ql/ShortRateModels/CalibrationHelpers/swaptionhelper.hpp
File Reference
ql/ShortRateModels/calibrationhelper.hpp ql/Instruments/swaption.hpp
swaptionhelper.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::ShortRateModels
• namespace QuantLib::ShortRateModels::CalibrationHelpers
ql/ShortRateModels/model.hpp
model.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::ShortRateModels
ql/option.hpp
ql/Lattices/lattice.hpp
ql/ShortRateModels/parameter.hpp model.hpp
ql/ShortRateModels/calibrationhelper.hpp
ql/Optimization/problem.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::ShortRateModels
onefactormodel.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::ShortRateModels
onefactormodel.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::ShortRateModels
12.395 ql/ShortRateModels/OneFactorModels/blackkarasinski.cpp
File Reference
Black-Karasinski model.
#include "ql/ShortRateModels/OneFactorModels/blackkarasinski.hpp"
#include "ql/Lattices/trinomialtree.hpp"
#include "ql/Solvers1D/brent.hpp"
Include dependency graph for blackkarasinski.cpp:
ql/diffusionprocess.hpp ql/Lattices/tree.hpp
ql/ShortRateModels/OneFactorModels/blackkarasinski.hpp ql/Solvers1D/brent.hpp
blackkarasinski.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::ShortRateModels
12.396 ql/ShortRateModels/OneFactorModels/blackkarasinski.hpp
File Reference
Black-Karasinski model.
#include <ql/ShortRateModels/onefactormodel.hpp>
Include dependency graph for blackkarasinski.hpp:
ql/ShortRateModels/onefactormodel.hpp
blackkarasinski.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::ShortRateModels
12.397 ql/ShortRateModels/OneFactorModels/coxingersollross.cpp
File Reference
Cox-Ingersoll-Ross model.
#include "ql/ShortRateModels/OneFactorModels/coxingersollross.hpp"
#include "ql/Lattices/trinomialtree.hpp"
#include "ql/Math/chisquaredistribution.hpp"
Include dependency graph for coxingersollross.cpp:
ql/ShortRateModels/OneFactorModels/coxingersollross.hpp
ql/Lattices/trinomialtree.hpp coxingersollross.cpp
ql/Math/chisquaredistribution.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::ShortRateModels
12.398 ql/ShortRateModels/OneFactorModels/coxingersollross.hpp
File Reference
Cox-Ingersoll-Ross model.
#include <ql/ShortRateModels/onefactormodel.hpp>
Include dependency graph for coxingersollross.hpp:
ql/ShortRateModels/onefactormodel.hpp
coxingersollross.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::ShortRateModels
12.399 ql/ShortRateModels/OneFactorModels/extendedcoxingersollross.cpp
File Reference
ql/ShortRateModels/OneFactorModels/extendedcoxingersollross.hpp
ql/Lattices/trinomialtree.hpp extendedcoxingersollross.cpp
ql/Math/chisquaredistribution.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::ShortRateModels
12.400 ql/ShortRateModels/OneFactorModels/extendedcoxingersollross.hpp
File Reference
ql/ShortRateModels/onefactormodel.hpp
ql/ShortRateModels/OneFactorModels/coxingersollross.hpp
extendedcoxingersollross.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::ShortRateModels
12.401 ql/ShortRateModels/OneFactorModels/hullwhite.cpp
File Reference
ql/ShortRateModels/onefactormodel.hpp ql/Lattices/trinomialtree.hpp
ql/ShortRateModels/OneFactorModels/vasicek.hpp
ql/ShortRateModels/OneFactorModels/hullwhite.hpp ql/blackmodel.hpp
hullwhite.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::ShortRateModels
12.402 ql/ShortRateModels/OneFactorModels/hullwhite.hpp
File Reference
ql/ShortRateModels/onefactormodel.hpp
ql/ShortRateModels/OneFactorModels/vasicek.hpp
hullwhite.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::ShortRateModels
ql/ShortRateModels/onefactormodel.hpp
ql/ShortRateModels/OneFactorModels/vasicek.hpp ql/blackmodel.hpp
vasicek.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::ShortRateModels
ql/ShortRateModels/onefactormodel.hpp
vasicek.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::ShortRateModels
parameter.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::ShortRateModels
ql/ShortRateModels/twofactormodel.hpp
twofactormodel.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::ShortRateModels
twofactormodel.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::ShortRateModels
ql/ShortRateModels/TwoFactorModels/g2.hpp
ql/blackmodel.hpp
g2.cpp
ql/Math/segmentintegral.hpp
ql/Solvers1D/brent.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::ShortRateModels
ql/ShortRateModels/twofactormodel.hpp ql/Instruments/swaption.hpp
g2.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::ShortRateModels
ql/Utilities/steppingiterator.hpp ql/qldefines.hpp
ql/Math/matrix.hpp ql/null.hpp
ql/dataformatters.hpp ql/Patterns/curiouslyrecurring.hpp
solver1d.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Solvers1D
Defines
• #define MAX_FUNCTION_EVALUATIONS 100
ql/Utilities/steppingiterator.hpp ql/qldefines.hpp
ql/Math/matrix.hpp ql/null.hpp
ql/dataformatters.hpp ql/Patterns/curiouslyrecurring.hpp
ql/solver1d.hpp
bisection.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Solvers1D
ql/Utilities/steppingiterator.hpp ql/qldefines.hpp
ql/Math/matrix.hpp ql/null.hpp
ql/dataformatters.hpp ql/Patterns/curiouslyrecurring.hpp
ql/solver1d.hpp
brent.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Solvers1D
ql/Utilities/steppingiterator.hpp ql/qldefines.hpp
ql/Math/matrix.hpp ql/null.hpp
ql/dataformatters.hpp ql/Patterns/curiouslyrecurring.hpp
ql/solver1d.hpp
falseposition.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Solvers1D
ql/Utilities/steppingiterator.hpp ql/qldefines.hpp
ql/Math/matrix.hpp ql/null.hpp
ql/dataformatters.hpp ql/Patterns/curiouslyrecurring.hpp
ql/solver1d.hpp
ql/Solvers1D/newtonsafe.hpp
newton.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Solvers1D
ql/Utilities/steppingiterator.hpp ql/qldefines.hpp
ql/Math/matrix.hpp ql/null.hpp
ql/dataformatters.hpp ql/Patterns/curiouslyrecurring.hpp
ql/solver1d.hpp
newtonsafe.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Solvers1D
ql/Utilities/steppingiterator.hpp ql/qldefines.hpp
ql/Math/matrix.hpp ql/null.hpp
ql/dataformatters.hpp ql/Patterns/curiouslyrecurring.hpp
ql/solver1d.hpp
ridder.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Solvers1D
ql/Utilities/steppingiterator.hpp ql/qldefines.hpp
ql/Math/matrix.hpp ql/null.hpp
ql/dataformatters.hpp ql/Patterns/curiouslyrecurring.hpp
ql/solver1d.hpp
secant.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Solvers1D
ql/Patterns/observable.hpp ql/Patterns/bridge.hpp
ql/daycounter.hpp
swaptionvolstructure.hpp
Namespaces
• namespace QuantLib
Term structure.
#include <ql/calendar.hpp>
#include <ql/daycounter.hpp>
#include <ql/dataformatters.hpp>
#include <ql/marketelement.hpp>
#include <vector>
Include dependency graph for termstructure.hpp:
termstructure.hpp
Namespaces
• namespace QuantLib::TermStructures
• namespace QuantLib
Affine term-structure.
#include <ql/TermStructures/affinetermstructure.hpp>
Include dependency graph for affinetermstructure.cpp:
ql/TermStructures/affinetermstructure.hpp
affinetermstructure.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::TermStructures
ql/dataformatters.hpp
ql/ShortRateModels/model.hpp
affinetermstructure.hpp
ql/Optimization/method.hpp
ql/TermStructures/ratehelpers.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::TermStructures
ql/termstructure.hpp ql/Math/loglinearinterpolation.hpp
ql/TermStructures/extendeddiscountcurve.hpp
compoundforward.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::TermStructures
ql/termstructure.hpp ql/Math/loglinearinterpolation.hpp
compoundforward.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::TermStructures
ql/TermStructures/discountcurve.hpp ql/TermStructures/compoundforward.hpp
discountcurve.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::TermStructures
discountcurve.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::TermStructures
ql/termstructure.hpp ql/voltermstructure.hpp
drifttermstructure.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::TermStructures
ql/TermStructures/extendeddiscountcurve.hpp
extendeddiscountcurve.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::TermStructures
ql/TermStructures/discountcurve.hpp map
extendeddiscountcurve.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::TermStructures
ql/termstructure.hpp
flatforward.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::TermStructures
12.430 ql/TermStructures/forwardspreadedtermstructure.hpp
File Reference
ql/termstructure.hpp
forwardspreadedtermstructure.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::TermStructures
ql/termstructure.hpp
impliedtermstructure.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::TermStructures
ql/TermStructures/ratehelpers.hpp ql/solver1d.hpp
ql/TermStructures/piecewiseflatforward.hpp ql/Solvers1D/brent.hpp
piecewiseflatforward.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::TermStructures
ql/TermStructures/ratehelpers.hpp ql/solver1d.hpp
piecewiseflatforward.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::TermStructures
ql/termstructure.hpp ql/voltermstructure.hpp
quantotermstructure.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::TermStructures
ql/Instruments/simpleswap.hpp
ql/TermStructures/ratehelpers.hpp
ratehelpers.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::TermStructures
ql/Instruments/simpleswap.hpp
ratehelpers.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::TermStructures
ql/TermStructures/zerocurve.hpp
zerocurve.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::TermStructures
zerocurve.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::TermStructures
ql/termstructure.hpp
zerospreadedtermstructure.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::TermStructures
Custom types.
#include <ql/qldefines.hpp>
Include dependency graph for types.hpp:
ql/qldefines.hpp
types.hpp
Namespaces
• namespace QuantLib
iterator
combiningiterator.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Utilities
iterator
ql/Utilities/iteratorcategories.hpp
couplingiterator.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Utilities
iterator
filteringiterator.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Utilities
iterator
iteratorcategories.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Utilities
iterator
processingiterator.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Utilities
iterator
steppingiterator.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Utilities
blackconstantvol.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::VolTermStructures
blackvariancecurve.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::VolTermStructures
blackvariancecurve.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::VolTermStructures
blackvariancesurface.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::VolTermStructures
blackvariancesurface.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::VolTermStructures
capflatvolvector.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Volatilities
ql/marketelement.hpp vector
ql/voltermstructure.hpp
impliedvoltermstructure.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::VolTermStructures
ql/Volatilities/blackconstantvol.hpp
localconstantvol.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::VolTermStructures
ql/Volatilities/blackvariancecurve.hpp
localvolcurve.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::VolTermStructures
ql/voltermstructure.hpp ql/termstructure.hpp
ql/Volatilities/localvolsurface.hpp
localvolsurface.cpp
Namespaces
• namespace QuantLib
• namespace QuantLib::VolTermStructures
ql/voltermstructure.hpp ql/termstructure.hpp
localvolsurface.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::VolTermStructures
swaptionvolmatrix.hpp
Namespaces
• namespace QuantLib
• namespace QuantLib::Volatilities
ql/marketelement.hpp vector
ql/voltermstructure.hpp
voltermstructure.cpp
Namespaces
• namespace QuantLib
ql/marketelement.hpp vector
voltermstructure.hpp
Namespaces
• namespace QuantLib::VolTermStructures
• namespace QuantLib
13.1 AmericanOption.cpp
#include <ql/quantlib.hpp>
std::cout << "Using " << QL_VERSION << std::endl << std::endl;
// our option
Option::Type type(Option::Put);
double underlying = 36;
double strike = 40;
Spread dividendYield = 0.00;
Rate riskFreeRate = 0.06;
double volatility = 0.20;
<< std::endl;
std::cout << "dividend yield = " << dividendYield
<< std::endl;
std::cout << "Volatility = " << volatility
<< std::endl;
std::cout << std::endl;
std::string method;
EuropeanExercise exercise(exerciseDate);
AmericanExercise amExercise(settlementDate, exerciseDate);
BermudanExercise berExercise(exDates);
RelinkableHandle<MarketElement> underlyingH(
Handle<MarketElement>(new SimpleMarketElement(underlying)));
std::vector<Date> dates(4);
dates[0] = settlementDate.plusMonths(1);
dates[1] = exerciseDate;
dates[2] = exerciseDate.plusMonths(6);
dates[3] = exerciseDate.plusMonths(12);
std::vector<double> strikes(4);
strikes[0] = underlying*0.9;
strikes[1] = underlying;
strikes[2] = underlying*1.1;
strikes[3] = underlying*1.2;
Matrix vols(4,4);
vols[0][0] = volatility*1.1; vols[0][1] = volatility;
vols[0][2] = volatility*0.9; vols[0][3] = volatility*0.8;
vols[1][0] = volatility*1.1; vols[1][1] = volatility;
vols[1][2] = volatility*0.9; vols[1][3] = volatility*0.8;
vols[2][0] = volatility*1.1; vols[2][1] = volatility;
vols[2][2] = volatility*0.9; vols[2][3] = volatility*0.8;
vols[3][0] = volatility*1.1; vols[3][1] = volatility;
vols[3][2] = volatility*0.9; vols[3][3] = volatility*0.8;
RelinkableHandle<BlackVolTermStructure> blackSurface(
Handle<BlackVolTermStructure>(
new BlackVarianceSurface(settlementDate, dates, strikes, vols)));
// European option
Instruments::VanillaOption euroOption(
type,
underlyingH,
strike,
flatDividendTS,
flatTermStructure,
exercise,
flatVolTS,
Handle<PricingEngine>(new AnalyticEuropeanEngine()));
// American option
Instruments::VanillaOption option(
type,
underlyingH,
strike,
flatDividendTS,
flatTermStructure,
amExercise,
flatVolTS);
return 0;
} catch (std::exception& e) {
std::cout << e.what() << std::endl;
return 1;
} catch (...) {
13.2 BermudanSwaption.cpp
#include <ql/quantlib.hpp>
using CalibrationHelpers::CapHelper;
using CalibrationHelpers::SwaptionHelper;
Size numRows = 5;
Size numCols = 10;
#if defined(QL_PATCH_DARWIN)
// to be investigated
return;
#endif
}
}
//Deposit rates
DayCounter depositDayCounter = Thirty360();
int settlementDays = 2;
Rate depositRates[12] = {
3.31, 3.32, 3.29, 3.35, 3.315, 3.33,
3.395, 3.41, 3.41, 3.49, 3.54, 3.53};
//Swap rates
Rate swapRates[13] = {
3.6425, 4.0875, 4.38, 4.5815, 4.74325, 4.87375,
4.9775, 5.07, 5.13, 5.1825, 5.36, 5.45125, 5.43875};
int swapYears[13] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 30};
int swFixedLegFrequency = 1;
bool swFixedLegIsAdjusted = false;
DayCounter swFixedLegDayCounter = Thirty360(Thirty360::European);
int swFloatingLegFrequency = 2;
swFixedLegIsAdjusted, swFixedLegDayCounter,
swFloatingLegFrequency));
instruments.push_back(swapHelper);
}
RelinkableHandle<TermStructure> rhTermStructure;
rhTermStructure.linkTo(myTermStructure);
std::vector<Period> swaptionMaturities;
swaptionMaturities.push_back(Period(1, Months));
swaptionMaturities.push_back(Period(3, Months));
swaptionMaturities.push_back(Period(6, Months));
swaptionMaturities.push_back(Period(1, Years));
swaptionMaturities.push_back(Period(2, Years));
swaptionMaturities.push_back(Period(3, Years));
swaptionMaturities.push_back(Period(4, Years));
swaptionMaturities.push_back(Period(5, Years));
swaptionMaturities.push_back(Period(7, Years));
swaptionMaturities.push_back(Period(10, Years));
CalibrationSet swaptions;
Instruments::Swaption bermudanSwaption(atmSwap,
BermudanExercise(bermudanDates), rhTermStructure,
bermudanSwaption.setPricingEngine(
Handle<PricingEngine>(new TreeSwaption(modelHW2, 100)));
std::cout << "HW (num): " << bermudanSwaption.NPV() << std::endl;
bermudanSwaption.setPricingEngine(
Handle<PricingEngine>(new TreeSwaption(modelBK, 100)));
std::cout << "BK: " << bermudanSwaption.NPV() << std::endl;
Instruments::Swaption otmBermudanSwaption(otmSwap,
BermudanExercise(bermudanDates), rhTermStructure,
Handle<PricingEngine>(new TreeSwaption(modelHW, 100)));
otmBermudanSwaption.setPricingEngine(
Handle<PricingEngine>(new TreeSwaption(modelHW2, 100)));
std::cout << "HW (num): " << otmBermudanSwaption.NPV() << std::endl;
otmBermudanSwaption.setPricingEngine(
Handle<PricingEngine>(new TreeSwaption(modelBK, 100)));
std::cout << "BK: " << otmBermudanSwaption.NPV() << std::endl;
Instruments::Swaption itmBermudanSwaption(itmSwap,
BermudanExercise(bermudanDates), rhTermStructure,
Handle<PricingEngine>(new TreeSwaption(modelHW, 100)));
return 0;
} catch (std::exception& e) {
std::cout << e.what() << std::endl;
return 1;
} catch (...) {
std::cout << "unknown error" << std::endl;
return 1;
}
}
13.3 DiscreteHedging.cpp
// Rate and Time are just double, but having their own types allows for
// a stronger check at compile time
using QuantLib::Rate;
using QuantLib::Time;
// Option is a helper class that holds the enumeration {Call, Put, Straddle}
using QuantLib::Option;
// the pricer computes final portfolio’s value for each random variable path
using QuantLib::MonteCarlo::PathPricer_old;
std::cout <<
"samples | trades | Mean \t| Std Dev | Formula |"
" skewness \t| kurt." << std::endl;
double sigma)
: PathPricer_old<Path>(1.0, false), type_(type), underlying_(underlying),
strike_(strike), r_(r), maturity_(maturity), sigma_(sigma) {
QL_REQUIRE(strike_ > 0.0,
"ReplicationPathPricer: strike must be positive");
QL_REQUIRE(underlying_ > 0.0,
"ReplicationPathPricer: underlying must be positive");
QL_REQUIRE(r_ >= 0.0,
"ReplicationPathPricer: risk free rate (r) must"
" be positive or zero");
QL_REQUIRE(maturity_ > 0.0,
"ReplicationPathPricer: maturity must be positive");
QL_REQUIRE(sigma_ >= 0.0,
"ReplicationPathPricer: volatility (sigma)"
" must be positive or zero");
}
// The value() method encapsulates the pricing code
double operator()(const Path& path) const;
private:
Option::Type type_;
double underlying_, strike_;
Rate r_;
Time maturity_;
double sigma_;
};
hedgesNum = 21;
rp.compute(hedgesNum, scenarios);
hedgesNum = 84;
rp.compute(hedgesNum, scenarios);
return 0;
} catch (std::exception& e) {
std::cout << e.what() << std::endl;
return 1;
} catch (...) {
std::cout << "unknown error" << std::endl;
return 1;
}
}
hedge ratio.
*/
double ReplicationPathPricer::operator()(const Path& path) const
{
// let’s start
Time t = 0;
/************************/
/*** the initial deal ***/
/************************/
// option fair price (Black-Scholes) at t=0
EuropeanOption option = EuropeanOption(type_, stock, strike_,
stockDividendYield, r_, maturity_, sigma_);
// sell the option, cash in its premium
money_account += option.value();
// compute delta
double delta = option.delta();
// delta-hedge the option buying stock
double stockAmount = delta;
money_account -= stockAmount*stock;
/**********************************/
/*** hedging during option life ***/
/**********************************/
for(int step = 0; step < n-1; step++){
// time flows
t += dt;
// stock growth:
// path contains the list of Gaussian variations
// and path[n] is the n-th variation
stockLogGrowth += path[step];
stock = underlying_*QL_EXP(stockLogGrowth);
// recalculate delta
delta = option.delta();
// re-hedging
money_account -= (delta - stockAmount)*stock;
stockAmount = delta;
}
/*************************/
/*** option expiration ***/
/*************************/
// last accrual on my money account
money_account *= QL_EXP( r_*dt );
// last stock growth
stockLogGrowth += path[n-1];
stock = underlying_*QL_EXP(stockLogGrowth);
// final Profit&Loss
return money_account;
}
// hedging interval
// double tau = maturity_ / nTimeSteps;
13.4 EuropeanOption.cpp
This example calculates European options using different methods while testing call-put parity.
#include <ql/quantlib.hpp>
std::cout << "Using " << QL_VERSION << std::endl << std::endl;
// our option
Option::Type type(Option::Call);
double underlying = 7;
double strike = 8;
Spread dividendYield = 0.05;
Rate riskFreeRate = 0.05;
std::string method;
double value, discrepancy, rightValue, relativeDiscrepancy;
/************************************/
EuropeanExercise exercise(exerciseDate);
AmericanExercise amExercise(settlementDate, exerciseDate);
BermudanExercise berExercise(exDates);
RelinkableHandle<MarketElement> underlyingH(
Handle<MarketElement>(new SimpleMarketElement(underlying)));
std::vector<Date> dates(4);
dates[0] = settlementDate.plusMonths(1);
dates[1] = exerciseDate;
dates[2] = exerciseDate.plusMonths(6);
dates[3] = exerciseDate.plusMonths(12);
std::vector<double> strikes(4);
strikes[0] = underlying*0.9;
strikes[1] = underlying;
strikes[2] = underlying*1.1;
strikes[3] = underlying*1.2;
Matrix vols(4,4);
vols[0][0] = volatility*1.1; vols[0][1] = volatility; vols[0][2] = volatility*0.9; vols[0][3] = volatility*0.8;
vols[1][0] = volatility*1.1; vols[1][1] = volatility; vols[1][2] = volatility*0.9; vols[1][3] = volatility*0.8;
vols[2][0] = volatility*1.1; vols[2][1] = volatility; vols[2][2] = volatility*0.9; vols[2][3] = volatility*0.8;
vols[3][0] = volatility*1.1; vols[3][1] = volatility; vols[3][2] = volatility*0.9; vols[3][3] = volatility*0.8;
RelinkableHandle<BlackVolTermStructure> blackSurface(
Handle<BlackVolTermStructure>(
new BlackVarianceSurface(settlementDate, dates, strikes, vols)));
Instruments::VanillaOption option(
type,
underlyingH,
strike,
flatDividendTS,
flatTermStructure,
exercise,
flatVolTS,
// blackSurface,
Handle<PricingEngine>(new AnalyticEuropeanEngine()));
// method: Integral
method = "Integral";
option.setPricingEngine(Handle<PricingEngine>(
new IntegralEngine()));
value = option.NPV();
discrepancy = QL_FABS(value-rightValue);
relativeDiscrepancy = discrepancy/rightValue;
std::cout << method << "\t"
<< DoubleFormatter::toString(value, 4) << "\t"
<< "N/A\t\t"
<< DoubleFormatter::toString(discrepancy, 6) << "\t"
<< DoubleFormatter::toString(relativeDiscrepancy, 6)
<< std::endl;
/*
// method: Integral
method = "Binary Cash";
option.setPricingEngine(Handle<PricingEngine>(
new IntegralCashOrNothingEngine(1.0)));
value = option.NPV();
discrepancy = QL_FABS(value-rightValue);
relativeDiscrepancy = discrepancy/rightValue;
std::cout << method << "\t"
<< DoubleFormatter::toString(value, 4) << "\t"
<< "N/A\t\t"
<< DoubleFormatter::toString(discrepancy, 6) << "\t"
<< DoubleFormatter::toString(relativeDiscrepancy, 6)
<< std::endl;
// method: Integral
method = "Binary Asset";
option.setPricingEngine(Handle<PricingEngine>(
new IntegralAssetOrNothingEngine()));
value = option.NPV();
discrepancy = QL_FABS(value-rightValue);
relativeDiscrepancy = discrepancy/rightValue;
std::cout << method << "\t"
<< DoubleFormatter::toString(value, 4) << "\t"
<< "N/A\t\t"
*/
Size timeSteps=800;
value = option.NPV();
double errorEstimate = option.errorEstimate();
discrepancy = QL_FABS(value-rightValue);
relativeDiscrepancy = discrepancy/rightValue;
std::cout << method << "\t"
<< DoubleFormatter::toString(value, 4) << "\t"
<< DoubleFormatter::toString(errorEstimate, 4) << "\t\t"
<< DoubleFormatter::toString(discrepancy, 6) << "\t"
<< DoubleFormatter::toString(relativeDiscrepancy, 6)
<< std::endl;
Handle<PricingEngine> mcengine2(
#if defined(QL_PATCH_MICROSOFT)
/* See above. */
new MCEuropeanEngine<LowDiscrepancy>(timeSteps, false, false,
nSamples, Null<double>(),
Null<int>())
#else
MakeMCEuropeanEngine<LowDiscrepancy>().withStepsPerYear(timeSteps)
.withSamples(nSamples)
#endif
);
option.setPricingEngine(mcengine2);
value = option.NPV();
discrepancy = QL_FABS(value-rightValue);
relativeDiscrepancy = discrepancy/rightValue;
std::cout << method << "\t"
<< DoubleFormatter::toString(value, 4) << "\t"
<< "N/A\t\t"
<< DoubleFormatter::toString(discrepancy, 6) << "\t"
<< DoubleFormatter::toString(relativeDiscrepancy, 6)
<< std::endl;
Handle<AnalyticEuropeanEngine> baseEngine(new
AnalyticEuropeanEngine);
Handle<QuantoEngine<VanillaOption::arguments,
VanillaOption::results> >
quantoEngine(new QuantoEngine<VanillaOption::arguments,
VanillaOption::results>(baseEngine));
value = quantoOption.NPV();
double delta = quantoOption.delta();
double gamma = quantoOption.gamma();
double theta = quantoOption.theta();
double vega = quantoOption.vega();
double rho = quantoOption.rho();
double divRho = quantoOption.dividendRho();
double qvega = quantoOption.qvega();
double qrho = quantoOption.qrho();
double qlambda = quantoOption.qlambda();
std::cout << std::endl << std::endl << "quanto: "
<< DoubleFormatter::toString(value, 4)
<< std::endl;
std::cout << "quanto delta: "
<< DoubleFormatter::toString(delta, 4)
<< std::endl;
std::cout << "quanto gamma: "
<< DoubleFormatter::toString(gamma, 4)
<< std::endl;
std::cout << "quanto theta: "
<< DoubleFormatter::toString(theta, 4)
<< std::endl;
std::cout << "quanto vega: "
<< DoubleFormatter::toString(vega, 4)
<< std::endl;
std::cout << "quanto rho: "
<< DoubleFormatter::toString(rho, 4)
<< std::endl;
std::cout << "quanto divRho: "
<< DoubleFormatter::toString(divRho, 4)
<< std::endl;
std::cout << "quanto qvega: "
<< DoubleFormatter::toString(qvega, 4)
<< std::endl;
std::cout << "quanto qrho: "
<< DoubleFormatter::toString(qrho, 4)
<< std::endl;
std::cout << "quanto qlambda: "
<< DoubleFormatter::toString(qlambda, 4)
<< std::endl;
Handle<ForwardEngine<VanillaOption::arguments,
VanillaOption::results> >
forwardEngine(new ForwardEngine<VanillaOption::arguments,
VanillaOption::results>(baseEngine));
Instruments::ForwardVanillaOption forwardOption(
type,
underlyingH,
flatDividendTS,
flatTermStructure,
exercise,
flatVolTS,
forwardEngine,
1.1, // moneyness
settlementDate.plusMonths(1) // reset Date
);
value = forwardOption.NPV();
delta = forwardOption.delta();
gamma = forwardOption.gamma();
theta = forwardOption.theta();
vega = forwardOption.vega();
rho = forwardOption.rho();
divRho = forwardOption.dividendRho();
std::cout << std::endl << std::endl << "forward: "
<< DoubleFormatter::toString(value, 4)
<< std::endl;
std::cout << "forward delta: "
<< DoubleFormatter::toString(delta, 4)
<< std::endl;
std::cout << "forward gamma: "
<< DoubleFormatter::toString(gamma, 4)
<< std::endl;
std::cout << "forward theta: "
<< DoubleFormatter::toString(theta, 4)
<< std::endl;
std::cout << "forward vega: "
<< DoubleFormatter::toString(vega, 4)
<< std::endl;
std::cout << "forward rho: "
<< DoubleFormatter::toString(rho, 4)
<< std::endl;
std::cout << "forward divRho: "
<< DoubleFormatter::toString(divRho, 4)
<< std::endl;
Handle<ForwardPerformanceEngine<VanillaOption::arguments,
VanillaOption::results> >
forwardPerformanceEngine(
new ForwardPerformanceEngine<VanillaOption::arguments,
VanillaOption::results>(
baseEngine));
forwardOption.setPricingEngine(forwardPerformanceEngine);
value = forwardOption.NPV();
delta = forwardOption.delta();
gamma = forwardOption.gamma();
theta = forwardOption.theta();
vega = forwardOption.vega();
rho = forwardOption.rho();
divRho = forwardOption.dividendRho();
std::cout << std::endl << std::endl << "forward performance: "
<< DoubleFormatter::toString(value, 4)
<< std::endl;
std::cout << "forward performance delta: "
<< DoubleFormatter::toString(delta, 4)
<< std::endl;
std::cout << "forward performance gamma: "
<< DoubleFormatter::toString(gamma, 4)
<< std::endl;
std::cout << "forward performance theta: "
<< DoubleFormatter::toString(theta, 4)
<< std::endl;
std::cout << "forward performance vega: "
<< DoubleFormatter::toString(vega, 4)
<< std::endl;
std::cout << "forward performance rho: "
<< DoubleFormatter::toString(rho, 4)
<< std::endl;
std::cout << "forward performance divRho: "
<< DoubleFormatter::toString(divRho, 4)
<< std::endl;
Handle<QuantoEngine<ForwardVanillaOption::arguments,
ForwardVanillaOption::results> >
quantoForwardEngine(
new QuantoEngine<ForwardVanillaOption::arguments,
ForwardVanillaOption::results>(forwardEngine));
Instruments::QuantoForwardVanillaOption quantoForwardOption(
type,
underlyingH,
strike,
flatDividendTS,
flatTermStructure,
exercise,
flatVolTS,
quantoForwardEngine,
flatTermStructure,
flatVolTS,
RelinkableHandle<MarketElement>(
Handle<MarketElement>(new SimpleMarketElement(correlation))),
1.1, // moneyness
settlementDate.plusMonths(1) // reset Date
);
value = quantoForwardOption.NPV();
delta = quantoForwardOption.delta();
gamma = quantoForwardOption.gamma();
theta = quantoForwardOption.theta();
vega = quantoForwardOption.vega();
rho = quantoForwardOption.rho();
divRho = quantoForwardOption.dividendRho();
qvega = quantoForwardOption.qvega();
qrho = quantoForwardOption.qrho();
qlambda = quantoForwardOption.qlambda();
Handle<QuantoEngine<ForwardVanillaOption::arguments,
ForwardVanillaOption::results> >
quantoForwardPerformanceEngine(
new QuantoEngine<ForwardVanillaOption::arguments,
ForwardVanillaOption::results>(
forwardPerformanceEngine));
quantoForwardOption.setPricingEngine(quantoForwardPerformanceEngine);
value = quantoForwardOption.NPV();
delta = quantoForwardOption.delta();
gamma = quantoForwardOption.gamma();
theta = quantoForwardOption.theta();
vega = quantoForwardOption.vega();
rho = quantoForwardOption.rho();
divRho = quantoForwardOption.dividendRho();
qvega = quantoForwardOption.qvega();
qrho = quantoForwardOption.qrho();
qlambda = quantoForwardOption.qlambda();
std::cout << std::endl << std::endl << "quanto forward performance: "
<< DoubleFormatter::toString(value, 4)
<< std::endl;
std::cout << "quanto forward performance delta: "
<< DoubleFormatter::toString(delta, 4)
<< std::endl;
std::cout << "quanto forward performance gamma: "
<< DoubleFormatter::toString(gamma, 4)
<< std::endl;
std::cout << "quanto forward performance theta: "
<< DoubleFormatter::toString(theta, 4)
<< std::endl;
std::cout << "quanto forward performance vega: "
<< DoubleFormatter::toString(vega, 4)
<< std::endl;
std::cout << "quanto forward performance rho: "
<< DoubleFormatter::toString(rho, 4)
<< std::endl;
std::cout << "quanto forward performance divRho: "
<< DoubleFormatter::toString(divRho, 4)
<< std::endl;
std::cout << "quanto forward performance qvega: "
<< DoubleFormatter::toString(qvega, 4)
<< std::endl;
std::cout << "quanto forward performance qrho: "
<< DoubleFormatter::toString(qrho, 4)
<< std::endl;
std::cout << "quanto forward performance qlambda: "
<< DoubleFormatter::toString(qlambda, 4)
<< std::endl;
return 0;
} catch (std::exception& e) {
std::cout << e.what() << std::endl;
return 1;
} catch (...) {
std::cout << "unknown error" << std::endl;
return 1;
}
}
13.5 history_iterators.cpp
This code exemplifies how to use History iterators to perform gaussianstatistics analyses on
historical data.
// initialize a History
History h(...);
GaussianStatistics s;
s.addSequence(h.vdbegin(),h.vdend());
cout << "Historical mean: " << s.mean() << endl;
cout << "Std. deviation: " << s.standardDeviation() << endl;
History::const_valid_iterator min =
std::min_element(h.vbegin(),h.vend(),lessthan);
cout << "Minimum value: " << min->value()
<< " assumed " << DateFormatter::toString(min->date()) << endl;
13.6 swapvaluation.cpp
This is an example of using the QuantLib Term Structure for pricing a simple swap.
/* This example shows how to set up a Term Structure and then price a simple
swap.
*/
/*********************
*** MARKET DATA ***
*********************/
// deposits
double d1wQuote=0.0382;
double d1mQuote=0.0372;
double d3mQuote=0.0363;
double d6mQuote=0.0353;
double d9mQuote=0.0348;
double d1yQuote=0.0345;
// FRAs
double fra3x6Quote=0.037125;
double fra6x9Quote=0.037125;
double fra6x12Quote=0.037125;
// futures
double fut1Quote=96.2875;
double fut2Quote=96.7875;
double fut3Quote=96.9875;
double fut4Quote=96.6875;
double fut5Quote=96.4875;
double fut6Quote=96.3875;
double fut7Quote=96.2875;
double fut8Quote=96.0875;
// swaps
double s2yQuote=0.037125;
double s3yQuote=0.0398;
double s5yQuote=0.0443;
double s10yQuote=0.05165;
double s15yQuote=0.055175;
/*********************
*** RATE HELPERS ***
*********************/
// RateHelpers are built from the above quotes together with other
// instrument dependant infos.
// setup deposits
DayCounter depositDayCounter = Actual360();
int settlementDays = 2;
// setup swaps
int swFixedLegFrequency = 1;
bool swFixedLegIsAdjusted = false;
DayCounter swFixedLegDayCounter = Thirty360(Thirty360::European);
int swFloatingLegFrequency = 2;
/*********************
** CURVE BUILDING **
*********************/
// A depo-swap curve
std::vector<Handle<RateHelper> > depoSwapInstruments;
depoSwapInstruments.push_back(d1w);
depoSwapInstruments.push_back(d1m);
depoSwapInstruments.push_back(d3m);
depoSwapInstruments.push_back(d6m);
depoSwapInstruments.push_back(d9m);
depoSwapInstruments.push_back(d1y);
depoSwapInstruments.push_back(s2y);
depoSwapInstruments.push_back(s3y);
depoSwapInstruments.push_back(s5y);
depoSwapInstruments.push_back(s10y);
depoSwapInstruments.push_back(s15y);
Handle<TermStructure> depoSwapTermStructure(new
PiecewiseFlatForward(todaysDate, settlementDate,
depoSwapInstruments, termStructureDayCounter));
/*********************
* SWAPS TO BE PRICED *
**********************/
// floating leg
int floatingLegFrequency = 2;
Handle<Xibor> euriborIndex(new Euribor(6, Months,
forecastingTermStructure)); // using the forecasting curve
Spread spread = 0.0;
int lenghtInYears = 5;
bool payFixedRate = true;
SimpleSwap spot5YearSwap(payFixedRate, settlementDate, lenghtInYears,
Years, calendar, roll, nominal, fixedLegFrequency, fixedRate,
fixedLegIsAdjusted, fixedLegDayCounter, floatingLegFrequency,
euriborIndex, fixingDays, spread,
discountingTermStructure); // using the discounting curve
SimpleSwap oneYearForward5YearSwap(payFixedRate,
calendar.advance(settlementDate, 1, Years, ModifiedFollowing),
lenghtInYears, Years,
calendar, roll, nominal, fixedLegFrequency, fixedRate,
/***************
* SWAP PRICING *
****************/
NPV = spot5YearSwap.NPV();
std::cout << "5Y "
<< RateFormatter::toString(fixedRate,2)
<< " NPV: "
<< DoubleFormatter::toString(NPV,2)
<< std::endl;
fairFloatingSpread = spot5YearSwap.fairSpread();
std::cout << "5Y "
<< RateFormatter::toString(fixedRate,2)
<< " fair spread: "
<< RateFormatter::toString(fairFloatingSpread,4)
<< std::endl;
fairFixedRate = spot5YearSwap.fairRate();
std::cout << "5Y fair fixed rate: "
<< RateFormatter::toString(fairFixedRate,4)
<< std::endl;
// let’s check that the 5 years swap has been correctly re-priced
QL_REQUIRE(QL_FABS(fairFixedRate-s5yQuote)<1e-8,
"5 years swap mispriced!");
/*********************
*** MARKET DATA ***
*********************/
// deposits
Handle<MarketElement> d1wRate(new SimpleMarketElement(d1wQuote));
Handle<MarketElement> d1mRate(new SimpleMarketElement(d1mQuote));
Handle<MarketElement> d3mRate(new SimpleMarketElement(d3mQuote));
Handle<MarketElement> d6mRate(new SimpleMarketElement(d6mQuote));
Handle<MarketElement> d9mRate(new SimpleMarketElement(d9mQuote));
Handle<MarketElement> d1yRate(new SimpleMarketElement(d1yQuote));
// FRAs
Handle<MarketElement> fra3x6Rate(new SimpleMarketElement(fra3x6Quote));
Handle<MarketElement> fra6x9Rate(new SimpleMarketElement(fra6x9Quote));
Handle<MarketElement> fra6x12Rate(new SimpleMarketElement(fra6x12Quote));
// futures
Handle<MarketElement> fut1Price(new SimpleMarketElement(fut1Quote));
Handle<MarketElement> fut2Price(new SimpleMarketElement(fut2Quote));
Handle<MarketElement> fut3Price(new SimpleMarketElement(fut3Quote));
Handle<MarketElement> fut4Price(new SimpleMarketElement(fut4Quote));
Handle<MarketElement> fut5Price(new SimpleMarketElement(fut5Quote));
Handle<MarketElement> fut6Price(new SimpleMarketElement(fut6Quote));
Handle<MarketElement> fut7Price(new SimpleMarketElement(fut7Quote));
Handle<MarketElement> fut8Price(new SimpleMarketElement(fut8Quote));
// swaps
Handle<MarketElement> s2yRate(new SimpleMarketElement(s2yQuote));
Handle<MarketElement> s3yRate(new SimpleMarketElement(s3yQuote));
Handle<MarketElement> s5yRate(new SimpleMarketElement(s5yQuote));
Handle<MarketElement> s10yRate(new SimpleMarketElement(s10yQuote));
Handle<MarketElement> s15yRate(new SimpleMarketElement(s15yQuote));
/*********************
*** RATE HELPERS ***
*********************/
// RateHelpers are built from the above quotes together with other
// instrument dependant infos.
// This time quotes are passed in relinkable
// handles which could be relinked to some other data source later.
// setup deposits
d1w =Handle<RateHelper>(new DepositRateHelper(
RelinkableHandle<MarketElement>(d1wRate),
1, Weeks, settlementDays,
calendar, ModifiedFollowing, depositDayCounter));
d1m=Handle<RateHelper>(new DepositRateHelper(
RelinkableHandle<MarketElement>(d1mRate),
1, Months, settlementDays,
calendar, ModifiedFollowing, depositDayCounter));
d3m=Handle<RateHelper>(new DepositRateHelper(
RelinkableHandle<MarketElement>(d3mRate),
3, Months, settlementDays,
calendar, ModifiedFollowing, depositDayCounter));
d6m=Handle<RateHelper>(new DepositRateHelper(
RelinkableHandle<MarketElement>(d6mRate),
6, Months, settlementDays,
// setup swaps
s2y=Handle<RateHelper>(new SwapRateHelper(
RelinkableHandle<MarketElement>(s2yRate),
2, Years, settlementDays,
calendar, ModifiedFollowing, swFixedLegFrequency,
swFixedLegIsAdjusted, swFixedLegDayCounter,
swFloatingLegFrequency));
s3y=Handle<RateHelper>(new SwapRateHelper(
RelinkableHandle<MarketElement>(s3yRate),
3, Years, settlementDays,
calendar, ModifiedFollowing, swFixedLegFrequency,
swFixedLegIsAdjusted, swFixedLegDayCounter,
swFloatingLegFrequency));
s5y=Handle<RateHelper>(new SwapRateHelper(
RelinkableHandle<MarketElement>(s5yRate),
5, Years, settlementDays,
calendar, ModifiedFollowing, swFixedLegFrequency,
swFixedLegIsAdjusted, swFixedLegDayCounter,
swFloatingLegFrequency));
s10y=Handle<RateHelper>(new SwapRateHelper(
RelinkableHandle<MarketElement>(s10yRate),
10, Years, settlementDays,
calendar, ModifiedFollowing, swFixedLegFrequency,
swFixedLegIsAdjusted, swFixedLegDayCounter,
swFloatingLegFrequency));
s15y=Handle<RateHelper>(new SwapRateHelper(
RelinkableHandle<MarketElement>(s15yRate),
15, Years, settlementDays,
calendar, ModifiedFollowing, swFixedLegFrequency,
swFixedLegIsAdjusted, swFixedLegDayCounter,
swFloatingLegFrequency));
// setup FRAs
Handle<RateHelper> fra3x6(new FraRateHelper(
RelinkableHandle<MarketElement>(fra3x6Rate),
3, 6, settlementDays, calendar, ModifiedFollowing,
depositDayCounter));
Handle<RateHelper> fra6x9(new FraRateHelper(
RelinkableHandle<MarketElement>(fra6x9Rate),
6, 9, settlementDays, calendar, ModifiedFollowing,
depositDayCounter));
Handle<RateHelper> fra6x12(new FraRateHelper(
RelinkableHandle<MarketElement>(fra6x12Rate),
6, 12, settlementDays, calendar, ModifiedFollowing,
depositDayCounter));
// setup futures
int futMonths = 3;
Handle<RateHelper> fut1(new FuturesRateHelper(
RelinkableHandle<MarketElement>(fut1Price),
Date(19, December, 2001),
futMonths, calendar, ModifiedFollowing,
depositDayCounter));
Handle<RateHelper> fut2(new FuturesRateHelper(
RelinkableHandle<MarketElement>(fut1Price),
Date(20, March, 2002),
futMonths, calendar, ModifiedFollowing,
depositDayCounter));
Handle<RateHelper> fut3(new FuturesRateHelper(
RelinkableHandle<MarketElement>(fut1Price),
Date(19, June, 2002),
futMonths, calendar, ModifiedFollowing,
depositDayCounter));
Handle<RateHelper> fut4(new FuturesRateHelper(
RelinkableHandle<MarketElement>(fut1Price),
Date(18, September, 2002),
futMonths, calendar, ModifiedFollowing,
depositDayCounter));
Handle<RateHelper> fut5(new FuturesRateHelper(
RelinkableHandle<MarketElement>(fut1Price),
Date(18, December, 2002),
futMonths, calendar, ModifiedFollowing,
depositDayCounter));
Handle<RateHelper> fut6(new FuturesRateHelper(
RelinkableHandle<MarketElement>(fut1Price),
Date(19, March, 2003),
futMonths, calendar, ModifiedFollowing,
depositDayCounter));
Handle<RateHelper> fut7(new FuturesRateHelper(
RelinkableHandle<MarketElement>(fut1Price),
Date(18, June, 2003),
futMonths, calendar, ModifiedFollowing,
depositDayCounter));
Handle<RateHelper> fut8(new FuturesRateHelper(
RelinkableHandle<MarketElement>(fut1Price),
Date(17, September, 2003),
futMonths, calendar, ModifiedFollowing,
depositDayCounter));
/*********************
** CURVE BUILDING **
*********************/
// A depo-futures-swap curve
std::vector<Handle<RateHelper> > depoFutSwapInstruments;
depoFutSwapInstruments.push_back(d1w);
depoFutSwapInstruments.push_back(d1m);
depoFutSwapInstruments.push_back(fut1);
depoFutSwapInstruments.push_back(fut2);
depoFutSwapInstruments.push_back(fut3);
depoFutSwapInstruments.push_back(fut4);
depoFutSwapInstruments.push_back(fut5);
depoFutSwapInstruments.push_back(fut6);
depoFutSwapInstruments.push_back(fut7);
depoFutSwapInstruments.push_back(fut8);
depoFutSwapInstruments.push_back(s3y);
depoFutSwapInstruments.push_back(s5y);
depoFutSwapInstruments.push_back(s10y);
depoFutSwapInstruments.push_back(s15y);
Handle<TermStructure> depoFutSwapTermStructure(new
PiecewiseFlatForward(todaysDate, settlementDate,
depoFutSwapInstruments, termStructureDayCounter));
// A depo-FRA-swap curve
/***************
* SWAP PRICING *
****************/
NPV = spot5YearSwap.NPV();
std::cout << "5Y "
<< RateFormatter::toString(fixedRate,2)
<< " NPV: "
<< DoubleFormatter::toString(NPV,2)
<< std::endl;
fairFloatingSpread = spot5YearSwap.fairSpread();
std::cout << "5Y "
<< RateFormatter::toString(fixedRate,2)
<< " fair spread: "
<< RateFormatter::toString(fairFloatingSpread,4)
<< std::endl;
fairFixedRate = spot5YearSwap.fairRate();
std::cout << "5Y fair fixed rate: "
<< RateFormatter::toString(fairFixedRate,4)
<< std::endl;
// let’s check that the 5 years swap has been correctly re-priced
QL_REQUIRE(QL_FABS(fairFixedRate-s5yQuote)<1e-8,
"5 years swap mispriced!");
<< std::endl;
NPV = spot5YearSwap.NPV();
std::cout << "5Y "
<< RateFormatter::toString(fixedRate,2)
<< " NPV: "
<< DoubleFormatter::toString(NPV,2)
<< std::endl;
fairFloatingSpread = spot5YearSwap.fairSpread();
std::cout << "5Y "
<< RateFormatter::toString(fixedRate,2)
<< " fair spread: "
<< RateFormatter::toString(fairFloatingSpread,4)
<< std::endl;
fairFixedRate = spot5YearSwap.fairRate();
std::cout << "5Y fair fixed rate: "
<< RateFormatter::toString(fairFixedRate,4)
<< std::endl;
// let’s check that the 5 years swap has been correctly re-priced
QL_REQUIRE(QL_FABS(fairFixedRate-s5yRate->value())<1e-8,
"5 years swap mispriced!");
// now let’s say that the 5-years swap rate goes up to 4.60%.
// A smarter market element--say, connected to a data source-- would
// notice the change itself. Since we’re using SimpleMarketElements,
// we’ll have to change the value manually--which forces us to
// downcast the handle and use the SimpleMarketElement
// interface. In any case, the point here is that a change in the
// value contained in the MarketElement triggers a new bootstrapping
// of the curve and a repricing of the swap.
NPV = spot5YearSwap.NPV();
NPV = oneYearForward5YearSwap.NPV();
std::cout << "1Yx5Y "
<< RateFormatter::toString(fixedRate,2)
<< " NPV: "
<< DoubleFormatter::toString(NPV,2)
<< std::endl;
fairFloatingSpread = oneYearForward5YearSwap.fairSpread();
std::cout << "1Yx5Y "
<< RateFormatter::toString(fixedRate,2)
<< " fair spread: "
<< RateFormatter::toString(fairFloatingSpread,4)
<< std::endl;
fairFixedRate = oneYearForward5YearSwap.fairRate();
std::cout << "1Yx5Y fair fixed rate: "
<< RateFormatter::toString(fairFixedRate,4)
<< std::endl;
forecastingTermStructure.linkTo(depoFRASwapTermStructure);
discountingTermStructure.linkTo(depoFRASwapTermStructure);
std::cout << "*** using Depo-FRA-Swap term structure:" << std::endl;
NPV = spot5YearSwap.NPV();
std::cout << "5Y "
<< RateFormatter::toString(fixedRate,2)
<< " NPV: "
<< DoubleFormatter::toString(NPV,2)
<< std::endl;
fairFloatingSpread = spot5YearSwap.fairSpread();
std::cout << "5Y "
<< RateFormatter::toString(fixedRate,2)
<< " fair spread: "
<< RateFormatter::toString(fairFloatingSpread,4)
<< std::endl;
fairFixedRate = spot5YearSwap.fairRate();
std::cout << "5Y fair fixed rate: "
<< RateFormatter::toString(fairFixedRate,4)
<< std::endl;
// let’s check that the 5 years swap has been correctly re-priced
QL_REQUIRE(QL_FABS(fairFixedRate-s5yRate->value())<1e-8,
"5 years swap mispriced!");
NPV = oneYearForward5YearSwap.NPV();
std::cout << "1Yx5Y "
<< RateFormatter::toString(fixedRate,2)
<< " NPV: "
<< DoubleFormatter::toString(NPV,2)
<< std::endl;
fairFloatingSpread = oneYearForward5YearSwap.fairSpread();
std::cout << "1Yx5Y "
<< RateFormatter::toString(fixedRate,2)
<< " fair spread: "
<< RateFormatter::toString(fairFloatingSpread,4)
<< std::endl;
fairFixedRate = oneYearForward5YearSwap.fairRate();
std::cout << "1Yx5Y fair fixed rate: "
<< RateFormatter::toString(fairFixedRate,4)
<< std::endl;
return 0;
} catch (std::exception& e) {
std::cout << e.what() << std::endl;
return 1;
} catch (...) {
std::cout << "unknown error" << std::endl;
return 1;
}
}
Unstable features
Class AmericanMCVanillaEngine(p. 163) This engine is known not to work for deeply out-of-
the-money options. More problems might surface.
Class CoxIngersollRoss(p. 278) This class was not tested enough to guarantee its functionality.
Class ExtendedCoxIngersollRoss(p. 336) This class was not tested enough to guarantee its func-
tionality.
Class G2(p. 371) This class was not tested enough to guarantee its functionality.
Member sensitivity(p. 622)(int basis=2) const This method was not tested enough to guarantee
its functionality.
1192 Unstable features
Deprecated List
Member CLGaussianRng(p. 256)(long seed=0) initialize with a random number generator in-
stead.
Member ICGaussianRng(p. 404)(long seed=0) initialize with a random number generator in-
stead.
Member SimpleSwap(p. 600)(bool payFixedRate, const Date &startDate, const Date &maturity, const Calendar &
use the constructor taking two Schedules
Member FixedRateCouponVector(p. 121)(const std::vector< double > &nominals, const std::vector< Rate > &cou
use the version taking a Schedule as first argument instead
Member FixedRateCouponVector(p. 121)(const std::vector< double > &nominals, const std::vector< Rate > &cou
use the version taking a Schedule as first argument instead
Member FixedRateCouponVector(p. 122)(const std::vector< double > &nominals, const std::vector< Rate > &cou
use the version taking a Schedule as first argument instead
Member FloatingRateCouponVector(p. 122)(const std::vector< double > &nominals, const Date &startDate, cons
use the version taking a Schedule as first argument instead
Member FloatingRateCouponVector(p. 122)(const std::vector< double > &nominals, const Handle< Indexes::Xib
use the version taking a Schedule as first argument instead
Member FloatingRateCouponVector(p. 123)(const std::vector< double > &nominals, const std::vector< Spread >
use the version taking a Schedule as first argument instead
Member IndexedCouponVector(p. 123)(const std::vector< double > &nominals, const Date &startDate, const Dat
use the version taking a Schedule instead
add blackVarianceImpl
QuantLib::Math::GeneralStatistics, 380 QuantLib::BlackVolatilityTerm-
QuantLib::Math::IncrementalStatistics, Structure, 221
416 blackVolImpl
QuantLib::RiskStatistics_old, 586 QuantLib::BlackVarianceTerm-
advance Structure, 220
QuantLib::Calendar, 237 BoxMullerGaussianRng
amount QuantLib::RandomNumbers::Box-
QuantLib::CashFlow, 252 MullerGaussianRng, 227
QuantLib::CashFlows::FixedRate- BRL
Coupon, 354 QuantLib, 115
QuantLib::CashFlows::Indexed- BYB
Coupon, 420 QuantLib, 115
QuantLib::CashFlows::ParCoupon, 542
QuantLib::CashFlows::Short, 593 CAD
QuantLib::CashFlows::SimpleCash- QuantLib, 115
Flow, 596 calculate
applyAfterApplying QuantLib::Instrument, 423
QuantLib::FiniteDifferences::Boundary- QuantLib::Patterns::LazyObject, 444
Condition, 224 Calendar
applyAfterSolving QuantLib::Calendar, 236
QuantLib::FiniteDifferences::Boundary- calibrate
Condition, 224 QuantLib::ShortRateModels::Model,
applyBeforeApplying 503
QuantLib::FiniteDifferences::Boundary- Character functions, 101
Condition, 224 CHF
applyBeforeSolving QuantLib, 115
QuantLib::FiniteDifferences::Boundary- CLGaussianRng
Condition, 224 QuantLib::Random-
ARS Numbers::CLGaussianRng, 256
QuantLib, 115 CLP
ATS QuantLib, 115
QuantLib, 115 CNY
AUD QuantLib, 115
QuantLib, 115 compoundForwardImpl
averageShortfall QuantLib::DiscountStructure, 303
QuantLib::Math::GenericRiskStatistics, QuantLib::ForwardRateStructure, 361
385 QuantLib::TermStructures::Extended-
DiscountCurve, 341
BDT QuantLib::ZeroYieldStructure, 683
QuantLib, 115 COP
BEF QuantLib, 115
QuantLib, 115 Coupon
BGL QuantLib::CashFlows::Coupon, 277
QuantLib, 115 Currency
1196 INDEX
QuantLib::Random- QuantLib::Math::LogLinear-
Numbers::MersenneTwister- Interpolation, 466
UniformRng, 496 operator+=
min QuantLib::Math::Matrix, 473
QuantLib::Math::GeneralStatistics, 379 operator==
QuantLib::Math::IncrementalStatistics, QuantLib::Calendar, 237
416 QuantLib::DayCounter, 293
Min and max functions, 103
ModifiedFollowing PathGenerator_old
QuantLib, 115 QuantLib::MonteCarlo::Path-
ModifiedPreceding Generator_old, 545
QuantLib, 115 percentile
MonthEndReference QuantLib::Math::GeneralStatistics, 380
QuantLib, 115 QuantLib::Math::RiskMeasures, 583
MTL performCalculations
QuantLib, 116 QuantLib::Instrument, 424
MXP QuantLib::Instruments::BarrierOption,
QuantLib, 116 183
QuantLib::Instruments::BinaryOption,
198
name
QuantLib::Instruments::Forward-
QuantLib::Calendar, 236
VanillaOption, 366
QuantLib::DayCounter, 293
QuantLib::Instruments::QuantoVanilla-
QuantLib::Index, 417
Option, 573
QuantLib::Indexes::Xibor, 676
QuantLib::Instruments::Stock, 615
next
QuantLib::Instruments::Swap, 622
QuantLib::RandomNumbers::Knuth-
QuantLib::Instruments::Swaption, 625
UniformRng, 437
QuantLib::Instruments::VanillaOption,
QuantLib::RandomNumbers::Lecuyer-
666
UniformRng, 448
QuantLib::Patterns::LazyObject, 444
QuantLib::Random-
PiecewiseFlatForward
Numbers::MersenneTwister-
QuantLib::TermStructures::Piecewise-
UniformRng, 496
FlatForward, 554
NOK
PKR
QuantLib, 116 QuantLib, 116
notifyObservers PLN
QuantLib::Patterns::Observable, 524 QuantLib, 116
NPR postAdjustValues
QuantLib, 116 QuantLib::DiscretizedAsset, 308
Numeric limits, 98 QuantLib::DiscretizedOption, 311
NZD potentialUpside
QuantLib, 116 QuantLib::Math::GenericRiskStatistics,
384
operator() QuantLib::Math::RiskMeasures, 583
QuantLib::Math::BicubicSpline- preAdjustValues
Interpolation, 191 QuantLib::DiscretizedAsset, 308
QuantLib::Math::BilinearInterpolation, Preceding
193 QuantLib, 115
QuantLib::Math::CubicSpline- pseudoSqrt
Interpolation, 284 QuantLib::Math::Matrix, 473
QuantLib::Math::Interpolation, 428
QuantLib::Math::Interpolation2D, 430 ql/argsandresults.hpp, 687
QuantLib::Math::LinearInterpolation, ql/array.hpp, 688
452 ql/blackmodel.hpp, 689
ql/RandomNumbers/mt19937uniformrng.cpp, ql/ShortRateModels/twofactormodel.cpp,
1064 1095
ql/RandomNumbers/mt19937uniformrng.hpp, ql/ShortRateModels/twofactormodel.hpp,
1065 1096
ql/RandomNumbers/randomarraygenerator.hpp, ql/ShortRateModels/TwoFactorModels/g2.cpp,
1066 1097
ql/RandomNumbers/randomsequencegenerator.hpp, ql/ShortRateModels/TwoFactorModels/g2.hpp,
1067 1098
ql/RandomNumbers/rngtypedefs.hpp, 1068 ql/solver1d.hpp, 1099
ql/RandomNumbers/sobolrsg.cpp, 1069 ql/Solvers1D/bisection.hpp, 1100
ql/RandomNumbers/sobolrsg.hpp, 1070 ql/Solvers1D/brent.hpp, 1101
ql/relinkablehandle.hpp, 1071 ql/Solvers1D/falseposition.hpp, 1102
ql/scheduler.cpp, 1072 ql/Solvers1D/newton.hpp, 1103
ql/scheduler.hpp, 1073 ql/Solvers1D/newtonsafe.hpp, 1104
ql/ShortRateModels/calibrationhelper.cpp, ql/Solvers1D/ridder.hpp, 1105
1074 ql/Solvers1D/secant.hpp, 1106
ql/ShortRateModels/calibrationhelper.hpp, ql/swaptionvolstructure.hpp, 1107
1075 ql/termstructure.hpp, 1108
ql/TermStructures/affinetermstructure.cpp,
ql/ShortRateModels/CalibrationHelpers/caphelper.cpp,
1076 1109
ql/TermStructures/affinetermstructure.hpp,
ql/ShortRateModels/CalibrationHelpers/caphelper.hpp,
1110
1077
ql/TermStructures/compoundforward.cpp,
ql/ShortRateModels/CalibrationHelpers/swaptionhelper.cpp,
1111
1078
ql/TermStructures/compoundforward.hpp,
ql/ShortRateModels/CalibrationHelpers/swaptionhelper.hpp,
1112
1079
ql/TermStructures/discountcurve.cpp, 1113
ql/ShortRateModels/model.cpp, 1080
ql/TermStructures/discountcurve.hpp, 1114
ql/ShortRateModels/model.hpp, 1081
ql/TermStructures/drifttermstructure.hpp,
ql/ShortRateModels/onefactormodel.cpp, 1115
1082 ql/TermStructures/extendeddiscountcurve.cpp,
ql/ShortRateModels/onefactormodel.hpp, 1116
1083 ql/TermStructures/extendeddiscountcurve.hpp,
ql/ShortRateModels/OneFactorModels/blackkarasinski.cpp, 1117
1084 ql/TermStructures/flatforward.hpp, 1118
ql/ShortRateModels/OneFactorModels/blackkarasinski.hpp,
ql/TermStructures/forwardspreadedtermstructure.hpp,
1085 1119
ql/ShortRateModels/OneFactorModels/coxingersollross.cpp,
ql/TermStructures/impliedtermstructure.hpp,
1086 1120
ql/ShortRateModels/OneFactorModels/coxingersollross.hpp,
ql/TermStructures/piecewiseflatforward.cpp,
1087 1121
ql/ShortRateModels/OneFactorModels/extendedcoxingersollross.cpp,
ql/TermStructures/piecewiseflatforward.hpp,
1088 1122
ql/ShortRateModels/OneFactorModels/extendedcoxingersollross.hpp,
ql/TermStructures/quantotermstructure.hpp,
1089 1123
ql/ShortRateModels/OneFactorModels/hullwhite.cpp,ql/TermStructures/ratehelpers.cpp, 1124
1090 ql/TermStructures/ratehelpers.hpp, 1125
ql/ShortRateModels/OneFactorModels/hullwhite.hpp,ql/TermStructures/zerocurve.cpp, 1126
1091 ql/TermStructures/zerocurve.hpp, 1127
ql/ShortRateModels/OneFactorModels/vasicek.cpp, ql/TermStructures/zerospreadedtermstructure.hpp,
1092 1128
ql/ShortRateModels/OneFactorModels/vasicek.hpp, ql/types.hpp, 1129
1093 ql/Utilities/combiningiterator.hpp, 1130
ql/ShortRateModels/parameter.hpp, 1094 ql/Utilities/couplingiterator.hpp, 1131
setupArguments, 183
QuantLib::FiniteDifferences::TridiagonalOperator::TimeSetter,
653 setupExpired, 183
QuantLib::ForwardRateStructure, 361 QuantLib::Instruments::BarrierOption::arguments,
QuantLib::ForwardRateStructure 185
compoundForwardImpl, 361 QuantLib::Instruments::BarrierOption::results,
discountImpl, 361 186
zeroYieldImpl, 361 QuantLib::Instruments::BinaryOption, 197
QuantLib::Greeks, 388 QuantLib::Instruments::BinaryOption
QuantLib::Handle, 390 performCalculations, 198
QuantLib::Handle setupArguments, 198
Handle, 391 setupExpired, 198
QuantLib::History, 394 QuantLib::Instruments::BinaryOption::arguments,
QuantLib::History 200
History, 395 QuantLib::Instruments::BinaryOption::results,
QuantLib::History::const_iterator, 397 201
QuantLib::History::Entry, 399 QuantLib::Instruments::Cap, 243
QuantLib::IllegalArgumentError, 406 QuantLib::Instruments::CapFloor, 247
QuantLib::IllegalResultError, 407 QuantLib::Instruments::CapFloor
QuantLib::Index, 417 setupArguments, 248
QuantLib::Index QuantLib::Instruments::CapFloor::arguments,
fixing, 417 249
name, 417 QuantLib::Instruments::CapFloor::results,
QuantLib::IndexError, 421 250
QuantLib::Indexes, 127 QuantLib::Instruments::CliquetOption, 258
QuantLib::Indexes::AUDLibor, 179 QuantLib::Instruments::CliquetOption::arguments,
QuantLib::Indexes::CADLibor, 234 260
QuantLib::Indexes::CHFLibor, 255 QuantLib::Instruments::Collar, 263
QuantLib::Indexes::Euribor, 327 QuantLib::Instruments::Floor, 357
QuantLib::Indexes::GBPLibor, 377 QuantLib::Instruments::ForwardOptionArguments,
QuantLib::Indexes::JPYLibor, 436 359
QuantLib::Indexes::USDLibor, 661 QuantLib::Instruments::ForwardVanillaOption,
QuantLib::Indexes::Xibor, 675 365
QuantLib::Indexes::Xibor QuantLib::Instruments::ForwardVanilla-
fixing, 676 Option
name, 676 performCalculations, 366
update, 676 setupArguments, 366
QuantLib::Indexes::XiborManager, 677 QuantLib::Instruments::QuantoForwardVanillaOption,
QuantLib::Indexes::ZARLibor, 678 566
QuantLib::Instrument, 422 QuantLib::Instruments::QuantoForward-
QuantLib::Instrument VanillaOption
calculate, 423 setupArguments, 567
performCalculations, 424 QuantLib::Instruments::QuantoOptionArguments,
setPricingEngine, 423 568
setupArguments, 423 QuantLib::Instruments::QuantoOptionResults,
setupExpired, 423 569
QuantLib::Instruments, 128 QuantLib::Instruments::QuantoVanillaOption,
QuantLib::Instruments 572
VanillaCap, 130 QuantLib::Instruments::QuantoVanilla-
VanillaCapFloor, 130 Option
VanillaCollar, 130 performCalculations, 573
VanillaFloor, 130 setupArguments, 573
QuantLib::Instruments::BarrierOption, 182 setupExpired, 573
QuantLib::Instruments::BarrierOption QuantLib::Instruments::SimpleSwap, 599
performCalculations, 183 QuantLib::Instruments::SimpleSwap
QuantLib::RandomNumbers::RandomArrayGenerator, QuantLib::ShortRateModels::NullParameter,
574 521
QuantLib::RandomNumbers::RandomSequenceGenerator,QuantLib::ShortRateModels::OneFactorAffineModel,
575 528
QuantLib::RandomNumbers::SobolRsg, 607 QuantLib::ShortRateModels::OneFactorModel,
QuantLib::RateFormatter, 576 529
QuantLib::RelinkableHandle, 579 QuantLib::ShortRateModels::OneFactorModel::ShortRateDynam
QuantLib::RelinkableHandle 530
linkTo, 579 QuantLib::ShortRateModels::OneFactorModel::ShortRateTree,
RelinkableHandle, 579 531
QuantLib::Results, 581 QuantLib::ShortRateModels::Parameter, 539
QuantLib::RiskStatistics_old, 585 QuantLib::ShortRateModels::ParameterImpl,
QuantLib::RiskStatistics_old 540
add, 586 QuantLib::ShortRateModels::PiecewiseConstantParameter,
QuantLib::Schedule, 588 552
QuantLib::ShortRateModels, 144 QuantLib::ShortRateModels::TermStructureConsistentModel,
QuantLib::ShortRateModels::AffineModel, 637
158 QuantLib::ShortRateModels::TermStructureFittingParameter,
QuantLib::ShortRateModels::BlackKarasinski, 638
209 QuantLib::ShortRateModels::TwoFactorModel,
QuantLib::ShortRateModels::BlackKarasinski::Dynamics, 657
210 QuantLib::ShortRateModels::TwoFactorModel::ShortRateDynam
QuantLib::ShortRateModels::CalibrationHelper, 658
240 QuantLib::ShortRateModels::TwoFactorModel::ShortRateTree,
QuantLib::ShortRateModels::Calibration- 659
Helper QuantLib::ShortRateModels::Vasicek, 669
update, 241 QuantLib::ShortRateModels::Vasicek::Dynamics,
QuantLib::ShortRateModels::CalibrationSet, 671
242 QuantLib::SimpleMarketElement, 598
QuantLib::ShortRateModels::ConstantParameter,
QuantLib::Solver1D, 608
269
QuantLib::Solver1D
QuantLib::ShortRateModels::CoxIngersollRoss,
setMaxEvaluations, 609
278
solve, 609
QuantLib::ShortRateModels::CoxIngersollRoss::Dynamics,
QuantLib::Solvers1D, 147
280
QuantLib::Solvers1D::Bisection, 205
QuantLib::ShortRateModels::ExtendedCoxIngersollRoss,
336 QuantLib::Solvers1D::Brent, 229
QuantLib::Solvers1D::FalsePosition, 342
QuantLib::ShortRateModels::ExtendedCoxIngersollRoss::Dynamics,
338 QuantLib::Solvers1D::Newton, 512
QuantLib::Solvers1D::NewtonSafe, 513
QuantLib::ShortRateModels::ExtendedCoxIngersollRoss::FittingParameter,
339 QuantLib::Solvers1D::Ridder, 582
QuantLib::ShortRateModels::G2, 371 QuantLib::Solvers1D::Secant, 589
QuantLib::ShortRateModels::G2::FittingParameter, QuantLib::SquareRootProcess, 610
373 QuantLib::StrikedTypePayoff, 617
QuantLib::ShortRateModels::HullWhite, QuantLib::StringFormatter, 618
400 QuantLib::SupersharePayoff, 619
QuantLib::ShortRateModels::HullWhite::Dynamics, QuantLib::SwaptionVolatilityStructure, 630
402 QuantLib::TermStructure, 634
QuantLib::TermStructures, 148
QuantLib::ShortRateModels::HullWhite::FittingParameter,
403 QuantLib::TermStructures::AffineTermStructure,
QuantLib::ShortRateModels::Model, 502 159
QuantLib::ShortRateModels::Model QuantLib::TermStructures::AffineTerm-
calibrate, 503 Structure
update, 503 update, 160
unfreeze valueAtRisk
QuantLib::Patterns::LazyObject, 444 QuantLib::Math::GenericRiskStatistics,
update 384
QuantLib::BlackModel, 211 QuantLib::Math::RiskMeasures, 583
QuantLib::CashFlows::Indexed- VanillaCap
Coupon, 420 QuantLib::Instruments, 130
VanillaCapFloor
QuantLib::Instruments, 130
VanillaCollar
QuantLib::Instruments, 130
VanillaFloor
QuantLib::Instruments, 130
variance
QuantLib::DiffusionProcess, 298
QuantLib::Math::GeneralStatistics, 379
QuantLib::Math::IncrementalStatistics,
415
QuantLib::OrnsteinUhlenbeckProcess,
534
VEB
QuantLib, 116
Weekday
QuantLib, 116
ZAR
QuantLib, 116
zeroYieldImpl
QuantLib::DiscountStructure, 303
QuantLib::ForwardRateStructure, 361
QuantLib::TermStructures::Forward-
SpreadedTermStructure, 364