CapeTools Query IR Risk




Welcome | Documentation format | QuantTools Groups | QuantTools Categories | Licence

Key TAGs | Excel Index | API Index


http://www.QuantTools.com

In total there are 22 functions present within the CapeTools Query IR Risk category of functions.


General Description

Functions to query risk reports produced by functions within the CapeTools IR Risk category of functions. There are four types of query functions within this category of functions.

The first are functions to query the report itself (Report functions). The types of legs, the list of legs and if one were to execute the QueryVCRiskReport() and QueryVCRiskReport() functions, which legs will be selected for the report.

The second category of functions are those that go out and actually produce the risk numbers (Query functions). These functions employ a kind of database SQL method in order to retrieve and aggregate the interest rate reports.

The third type of functions are those that act upon the YieldCurve or VolCurve that are to be manipulated (Curve functions). These functions simply returns a sensitivity curve/matrix of the instruments underlying the curves.

Finally the fourth type of functions are those that do not act upon the report itself, but rather the structure object (Structure functions). These functions simply report which legs within the structure object are sensitive to which curves (Yieldcurve or/and VolCurves).


Report functions are functions that help in determining the types of legs, leg types that are present within the report.


The following (Structure) functions provide a type of heat-map of the points that are to be manipulated during the construction of a riskreport (functions wihin the CapeTools IR Risk category of functions) :



Basically these functions take your structure object (generated via the CreateStructure() function) and the curve that is to be bumped and counts how many times each point within the curve (YieldCurve or VolCurve) are accessed. Thus you can see the points on the curve that have the largest concentration of activity given a structure.

The following (Structure) functions will display the list of legs within a structure object that are sensitive to the given curve (YieldCurve or VolCurve) :



The RiskGetYCVCSenLegs() function is quite interesting as it will return the list of legs that are sensitive to both the given VolCurve and YieldCurve.

The following (Curve) functions will display the sensitivity curve (in the case of a YieldCurve) or sensitivity matrix (in the case of a VolCurve) of the instruments underlying the curve. Thus for the 10Y Tenor within the YieldCurve, this will be the sensitivity (delta) of the 10 year swap rate from spot. For the 5Y into 10Y Volatility point on a SABR VolCurve, this will be the sensitivity (vega) of an At-The-Money 5Y into 10Y Swaption instrument :



The risk reports also store these sensitivity values and they can be extracted via the following functions (given a report object) :



These value are needed in order to output different risk report numbers (notional of the hedge instrument for example.)
The following (Report) functions list the leg names that are stored within the report :



These legs should correspond to the list of legs passed to the CreateStructure() function.
Each leg within a report is assigned a leg type. For example all legs created via functions contained within the 'CapeTools FLOAT Legs' category of functions are given a type of 'FLOAT'. When querying the risk reports you can supply a list of leg names, leg types or both.

Thus it is important to remember that a Leg-Name is an identifier for a single deal.

A Leg-Type however is a group of Leg-Names and thus is an identifier for a group of deals.


The following list provides the leg type assigned to the functions stored within the given function categories or functions :



The following (Report) functions will display the leg types given a risk report :



The following (Report) functions go further and display a two column range of LegName and the type associated with it :



The following (Report) functions will display a list of Leg-Name, given a Leg-Type. Thus if you pass in the type 'FLOAT', all objects created from the CapeTools FLOAT Legs category of functions and that have been processed by the risk report will be displayed :



From a combination of using the following functions above, you may have decided on a list of Leg-Names and/or Leg-Types that you wish to view a report from. You may also wish to see the whole list, but exclude certain Leg-Names and/or Leg-Types. Which legs will actually be selected given all the possible combinations?

The following list of (Report) functions allows you to view the resulting legs given Leg-Names and/or Leg-Types combinations with an exclusion criteria :



A powerful parameter to note is the 'Operation' parameter. Basically These functions take three lists :



How does the function, given this list, decide which legs to accept from the report and which legs to exclude?

This is where the 'Operation' parameter comes into play and takes on the following values, "And", "Or" and "Diff".

If the 'Operation' parameter is set to "And" then all the legs present in **BOTH** the Leg-Names (LimitToLegs parameter) **AND** Leg-Types (LimitToTypes parameter) are taken. Then the legs that are not wanted are excluded (ExcludeLegs parameter).

If the 'Operation' parameter is set to "Or" then all the legs present in **EITHER** the Leg-Names (LimitToLegs parameter) **OR** Leg-Types (LimitToTypes parameter) are taken. Then the legs that are not wanted are excluded (ExcludeLegs parameter).

If the 'Operation' parameter is set to "Diff" then basically we select all the legs within the report, apply the **AND** operator to generate a sub-list, throw away this sub-list and select whatever is left. Then the legs that are not wanted are excluded (ExcludeLegs parameter).


Executing the QueryLegsYCRiskReport or QueryLegsVCRiskReport will help you to ensure that you are using the correct logic when trying to compose a list of legs to base your report on.


Finally the following (Query) functions will apply a selection criteria to the generated report and list the risk numbers that you are requesting :



The parameters are similar to that of the QueryLegsYCRiskReport and QueryLegsVCRiskReport functions except that you also provide how you would like to see your risk numbers.
In the case of a Gamma or Volga Report, you can also request for Delta and Vega results as these are computed as well.




Function list.

Copyright (c) 2003-2007 CapeTools - All Rights Reserved.