QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
SwapForwardMappings Class Reference

#include <swapforwardmappings.hpp>

+ Collaboration diagram for SwapForwardMappings:

Static Public Member Functions

static Real annuity (const CurveState &cs, Size startIndex, Size endIndex, Size numeraireIndex)
 compute annuity of arbitrary swap-rate More...
 
static Real swapDerivative (const CurveState &cs, Size startIndex, Size endIndex, Size forwardIndex)
 compute derivative of swap-rate to underlying forward rate More...
 
static Matrix coterminalSwapForwardJacobian (const CurveState &cs)
 
static Matrix coterminalSwapZedMatrix (const CurveState &cs, Spread displacement)
 
static Matrix coinitialSwapForwardJacobian (const CurveState &cs)
 
static Matrix coinitialSwapZedMatrix (const CurveState &cs, Spread displacement)
 
static Matrix cmSwapForwardJacobian (const CurveState &cs, Size spanningForwards)
 
static Matrix cmSwapZedMatrix (const CurveState &cs, Size spanningForwards, Spread displacement)
 
static Real swaptionImpliedVolatility (const MarketModel &volStructure, Size startIndex, Size endIndex)
 

Detailed Description

Definition at line 35 of file swapforwardmappings.hpp.

Member Function Documentation

◆ annuity()

Real annuity ( const CurveState cs,
Size  startIndex,
Size  endIndex,
Size  numeraireIndex 
)
static

compute annuity of arbitrary swap-rate

Definition at line 33 of file swapforwardmappings.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ swapDerivative()

Real swapDerivative ( const CurveState cs,
Size  startIndex,
Size  endIndex,
Size  forwardIndex 
)
static

compute derivative of swap-rate to underlying forward rate

Definition at line 45 of file swapforwardmappings.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ coterminalSwapForwardJacobian()

Matrix coterminalSwapForwardJacobian ( const CurveState cs)
static

Returns the dsr[i]/df[j] jacobian between coterminal swap rates and forward rates

Definition at line 72 of file swapforwardmappings.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ coterminalSwapZedMatrix()

Matrix coterminalSwapZedMatrix ( const CurveState cs,
Spread  displacement 
)
static

Returns the Z matrix to switch base from forward to coterminal swap rates

Definition at line 102 of file swapforwardmappings.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ coinitialSwapForwardJacobian()

Matrix coinitialSwapForwardJacobian ( const CurveState cs)
static

Returns the dsr[i]/df[j] jacobian between coinitial swap rates and forward rates

Definition at line 115 of file swapforwardmappings.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ coinitialSwapZedMatrix()

Matrix coinitialSwapZedMatrix ( const CurveState cs,
Spread  displacement 
)
static

Returns the Z matrix to switch base from forward to coinitial swap rates

Definition at line 140 of file swapforwardmappings.cpp.

+ Here is the call graph for this function:

◆ cmSwapForwardJacobian()

Matrix cmSwapForwardJacobian ( const CurveState cs,
Size  spanningForwards 
)
static

Returns the dsr[i]/df[j] jacobian between constant maturity swap rates and forward rates

Definition at line 127 of file swapforwardmappings.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cmSwapZedMatrix()

Matrix cmSwapZedMatrix ( const CurveState cs,
Size  spanningForwards,
Spread  displacement 
)
static

Returns the Z matrix to switch base from forward to constant maturity swap rates

Definition at line 157 of file swapforwardmappings.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ swaptionImpliedVolatility()

Real swaptionImpliedVolatility ( const MarketModel volStructure,
Size  startIndex,
Size  endIndex 
)
static

computes the implied vol of a swaption specified by two indices using the freezing coefficients methdodology. This routine is easy to use but not very efficient and if you want to do a lot of cases, then a different approach should be used.

Tested in SwapForwardMappingsTest::testSwaptionImpliedVolatility() in swapforwardmappings.cpp

Definition at line 175 of file swapforwardmappings.cpp.

+ Here is the call graph for this function: