You are on page 1of 5

Basis Spread Curve Derivation

A step-by-step guide to BAdI Implementation

Consider the following example to clarify how to work with the derivation BAdIs.

Question: I would like to create a derivation rule with the name ZCCY which does the following: If
ZCCY is set in the evaluation type as derivation ID (eval), then a cross-currency spread curve is added
to the non-EUR discount curve when pricing a cross-currency interest rate swap. How can I do this?

Answer: You will need a user with development authorization and perform the following steps.
Heres where the relevant IMG activities can be found:

1. IMG activity Define Basis Spread Curve Derivation IDs

Click on New Entries, enter ZCCY with a suitable descriptive text, and save. Choose a suitable
transport request.
2. IMG activity BAdI: Derive Basis Spread Curves for Evaluation Purposes

Enter a name and short text for the enhancement implementation. When prompted for a package,
specify the package that your company usually uses for Treasury enhancement implementations, or
choose local object if there is no need to transport.

Enter a name for your BAdI Implementation and Implementation Class. As you want to derive spread
curves for discounting (not for forward calculation), choose the BAdI Definition _EVAL.

Copy the sample Class CL_FTBBYC_EX_BSPRD_DER_EVAL_001 so you dont have to start from
scratch. Again, choose a suitable package or local object.
Expand the tree to the left, double-click on Filter Val., choose Create Combination , double-click on
the new filter combination and enter the filter condition as shown in the picture. This makes sure
that your BAdI implementation is only called when derivation ID ZCCY is specified in the evaluation
type.
Activate all the objects that you have created.

Thats all, as the example implementation does what you were asking for.

Question: OK, but now I would like the basis spread to be added to the non-USD leg rather than the
non-EUR leg, and I want the derivation to work for a different product type than 62B.

Answer: To achieve this, you will need to change the coding that you copied from the example
implementation.

Double-Click on Implementing Class , then on the name of the Method that is shown to the right.
Read the grey coding comments to understand what the coding does. Go to edit mode in order to
change the coding. Replace EUR by USD and 62B by the product type you want the derivation rule to
work for. (Further adaptations to the code might be necessary depending on the product type. You
can also change the implementation further to better suit your needs.) Activate your changes.

You might also like