Defining Trade Filters

 

Download PDF - Trade Filter

 

Trade Filters allow defining dynamic collections of trades based on user-defined criteria. They are used in reports and processes throughout the system to load the trades that satisfy the criteria.

 

From the Calypso Navigator, navigate to Configuration > Filters > Trade Filter (menu action refdata.TradeFilterWindow) to define trade filters.

Sample Trade Filter window

The Ranges panel is selected by default. Select the other panels as applicable.

» Enter selection criteria in the various panels - They are described below.
» Then click Save to save the trade filter. You will be prompted to enter a trade filter name.

A trade filter is identified by its name throughout the system.

 


Contents

- Creating a Trade Filter

- Ranges Panel

- Date / Time Panel

- Product Criteria Panel

- Trade Criteria Panel

- Underlying Security Panel

- Post Processing Panel

- Position Spec Panel

- Counterparty Panel

- Portfolio Hierarchy Panel

- Diary Criteria Panel

- Defining a Trade Filter using SQL

- Viewing a Trade Filter Usage

- Modifying a Trade Filter

- Deleting a Trade Filter

- Note on Environment Properties


 

1. Creating a Trade Filter

Click New to create a trade filter, and enter selection criteria into the fields of the various panels as applicable. The fields of the various panels are described below.

New trade filter

Time Zone - Select a timezone as needed – It is used for date-related criteria.
Comment – Enter a free form comment.
Holidays – Click ... to select holidays – Holidays are used to determine business days if the “Check Holidays” checkbox is checked.

See Date / Time Panel for usage details.

Use SQL – Check the “Use SQL” checkbox to define the trade filter using an SQL query.

See "Defining a Trade Filter using SQL" for details.

Parent – You can select a parent trade filter to build a hierarchy of trade filters. A child trade filter combines its criteria with the criteria of its parents through an AND logical expression.

[NOTE: For a given parent, the child filters can either be SQL filters OR non-SQL filters - Calypso does not support having mixed child filters. Also, when using SQL in a child filter, Calypso does not validate the SQL code]

Cache trades on load – Check the “Cache trades on load” checkbox to store the trades in cache when the trade filter is loaded from the database.

[NOTE: The "Cache trades on load" checkbox cannot be checked if any date-related fields are set]

Set as default parent - If you check “Set as default parent” on a given trade filter named TF for example, all new trade filters created by the same user will have TF as a parent.
Groups - You can click ... next to the Groups fields to associate the trade filter with a group or multiple groups.

Available groups need to be defined in the "groupTradeFilter" domain.

This is only used to define access rights for trade filters based on groups.

Please refer to Calypso Permissions and Authorization documentation for details.

Click Save to save your changes, you will be prompted to enter a name. A trade filter is identified by its name throughout the system.

You can also click Save As to save the trade filter as a new trade filter. You will be prompted to enter a name.

 

2. Ranges Panel

Select the Ranges panel to select trade ranges.

Sample Ranges panel

» Select the range criteria described below as needed.

 

Fields

Description

Trade Id Min

Trade Id Max

Enter a minimum / maximum trade id.

Quantity Min

Quantity Max

Enter a minimum / maximum quantity.

Trade Price Min

Trade Price Max

Enter a minimum / maximum price.

Filter IN

Click ... to select a nested trade filter. The system will combine the criteria of the trade filter with the criteria of the nested trade filter using an OR logical expression.

If you uncheck IN, it works as NOT IN – It will load all trades except the trades of the nested trade filters.

Trade Id List

Enter a list of comma-separated trade ids.

 

3. Date / Time Panel

Select the Date / Time panel to select date and time criteria.

Sample Date / Time panel

» To add a date / time criteria, click New Rule, then define the rule as needed.

Select a date (TradeDate for example) and a rule. Multiple types of rules are available:

"is before", "is on or before", "is on", "is on or after", "is after" - For these rules, you can select "now", "today", a specific date and time, or a tenor and time.

When you select a tenor, the corresponding date will be generated as business days if “Check Holidays” is checked based on the selected holiday calendars. For example, "is before 3 business days ago".

"within today", "within the current hour", "within the current month", "within the current year", "within the last", "within the next" - For "within the last" and "within the next", you can select a number of hours, days, months, or years. The corresponding date will be generated as business days if “Check Holidays” is checked based on the selected holiday calendars.
"between (absolute)" - You can select from and to dates and times. All trades (that satisfy the other criteria) between the from and to dates will be loaded.
"between (relative)" - You can select from and to tenors and times. For example, between 2 weeks ago and a week ago.

The corresponding dates will be generated as business days if “Check Holidays” is checked based on the selected holiday calendars.

"is null" or "is not null".

You can check "Include null" to include trades where the selected date is not set. When you choose “Include Null” for MaturityDate and FinalValuationDate, the system will check the settlement date if the maturity date / final valuation date is not set.

For TerminationDate, TerminationEffectiveDate, LastNovationDate, LastNovationTD, since those dates are stored as trade attributes (keywords), you can filter trades where the keyword is actually set or not set.

For example, if you have a rule on "TerminationDate / Has keyword", the rule will only be applied to trades for which the termination date is set. If you have a rule on "Termination Date / Has not keyword", the trade filter will only load trades for which the termination is not set.

 

4. Product Criteria Panel

Select the Product Criteria panel to select criteria on the product associated with the trade.

Sample Product Criteria panel

» Select the product criteria described below as needed.

 

Fields

Description

Currency IN

Click ... to select product currencies ("Product Currency" column in Trade Browser).

You can uncheck IN to load trades for which the product currency is not in the selected list.

In the case of trades with underlying products, the system checks the currency of the underlying product.

In the case of trades with multiple legs (cross currency swap for example), the system checks each leg's currency.

Product Type IN

Click ... to select product types.

You can uncheck IN to load trades for which the product type is not in the selected list.

Product Family IN

Click ... to select product families.

You can uncheck IN to load trades for which the product family is not in the selected list.

Rate Index IN

Click ... to select rate indices.

You can uncheck IN to load trades for which the rate index is not in the selected list.

Ccy Pair IN

Click ... to select currency pairs.

You can uncheck IN to load trades for which the currency pair is not in the selected list.

Sub Type IN

Click ... to select product subtypes.

You can uncheck IN to load trades for which the subtype is not in the selected list.

Extended Type IN

Click ... to select extended types.

You can uncheck IN to load trades for which the extended type is not in the selected list.

Product Id IN

Enter a list of comma-separated products ids.

You can uncheck IN to load trades for which the product id is not in the selected list.

Sec Code

Click ... to view all security codes defined in the system. Security codes are created from the Calypso Navigator using Configuration > Product > Code.

» For each security code, select “In” or “Not In” and enter a value as needed.

Example:

The trade filter will load trades for which the product has the security code DebtSeniority set to SENIOR_SECURED.

Description

Select an operator from the adjacent field, and enter a value.

Example:

The trade filter will load trades for which the product’s description is “BondCPIInflation/5Y/03/01/2010/5.15%”.

Market Place IN

Check "Check"to display the market places selected in the Trade Criteria panel is any.

You can uncheck IN to load trades for which the market place is not in the selected list.

Has Leg Type IN

Click ... to select an exotic type. Exotic types are created from the Calypso Navigator using Configuration > Product > Exotic Type Creator.

You can uncheck IN to load trades for which the exotic type is not in the selected list.

Reference Entity IN

Click Add to select reference entities. A reference entity is a legal entity of type Issuer and only applies to CDS products.

You can uncheck IN to load trades for which the reference entity is not in the selected list.

 

5. Trade Criteria Panel

Select the Trade Criteria panel to select trade criteria.

Sample Trade Criteria panel

» Select the trade criteria described below as needed.

 

Fields

Description

BUY

Check to select Buy trades. The direction of the trade is from the processing organization’s perspective.

SELL

Check to select Sell trades. The direction of the trade is from the processing organization’s perspective.

Internal

Checked by default to select internal trades. You can clear to filter out internal trades.

External

Checked by default to select external trades. You can clear to filter out external trades.

Internal Reference IN

Enter an internal reference.

You can uncheck IN to load trades for which the internal reference is not in the selected list.

Bundle

Click ... next to the Bundle field to select a bundle type.

You can then select "Id" or "Name" from the adjacent field, and click ... to select an individual trade bundle of specified type.

Bundle Attribute

Click ... to select bundle attributes. Bundle attributes are specified in the Trade Bundle window.

» For each attribute, select “Like” or “Not Like”, and enter a value as needed.

Example:

The trade filter will load trades that belong to a bundle for which the bundle attribute "Business Reason" is set to "Short Term Hedge".

Book IN

Click ... to select trading books.

You can uncheck IN to load trades for which the book is not in the selected list.

Trader IN

Click ... to select traders.

You can uncheck IN to load trades for which the trader is not in the selected list.

Status IN

Click ... to select status codes.

You can uncheck IN to load trades for which the status code is not in the selected list.

Sales IN

Click ... to select sales representatives.

You can uncheck IN to load trades for which the sales representative is not in the selected list.

Book Attribute

Click ... to view all book attributes defined in the system. Book attributes are created from the Calypso Navigator using Configuration > Books & Bundles > Trading Book, Attributes button.

» For each attribute, select “In” or “Not In”, and enter a value as needed.

Example:

The trade filter will load trades for which the book attribute Activity is set to TRADING.

Keyword Value

Click ... to add a filter on trade keywords.

» Click to add a filter on a trade keyword. You can select as many trade keywords as needed.
» For each trade keyword, select an operator and select or enter a value.

For the "is in" operator, enter each value on a new row.

» Click OK.

In this example, the trade filter will load trades for which the trade keyword Broker is set to BROKER A or BROKER B..

Keyword Has

Select an operator Has or Not Has. Then click ... to select one or multiple keywords.

The trade filter will load trades for which the selected keywords are set (Has) or not (Not Has) regardless of their value.

Market Type

Click ... to select market types. Market types only apply to bonds trades.

You can uncheck IN to load trades for which the market type is not in the selected list.

Market Place IN

Click ... to select market places (legal entities of role MarketPlace).

You can uncheck IN to load trades for which the market place is not in the selected list.

Currency IN

Click ... to select trade currencies (“Trade Currency” column in Trade Browser).

You can uncheck IN to load trades for which the currency is not in the selected list.

In the case of trades with multiple legs (cross currency swap for example), the system checks the currency of the first leg.

 

6. Underlying Security Panel

The Underlying Security panel only applies to trades with underlying security products (Futures, Future Options, Bond Options).

Sample Underlying Security panel

» Select the underlying product criteria described below as needed.

 

Fields

Description

Sec Code

Click ... to view all security codes defined in the system. Security codes are created from the Calypso Navigator using Configuration > Product > Code.

» For each security code, select “In” or “Not In” and enter a value as needed.

Example:

The trade filter will load trades for which the product has the security code DebtSeniority set to SENIOR_SECURED.

Rate Index IN

Click ... to select rate indices.

You can uncheck IN to load trades for which the underlying product’s rate index is not in the selected list.

Product Type IN

Click ... to select product types.

You can uncheck IN to load trades for which the underlying product’s product type is not in the selected list.

Product Id IN

Enter a list of comma-separated products ids.

You can uncheck IN to load trades for which the underlying product’s product id is not in the selected list.

Market Place IN

Click ... to select market places (legal entities of role MarketPlace).

You can uncheck IN to load trades for which the underlying product’s market place is not in the selected list.

Issuer IN

Click Add to select issuers (legal entities of role Issuer)

You can uncheck IN to load trades for which the underlying product’s issuer is not in the selected list.

 

7. Post Processing Panel

This panel only applies if trade audit is enabled.

Sample Post Processing panel

» Click ... to select status codes. The trade filter will load the trades that satisfy the criteria of the other panels, and return the versions of the trades for the selected status codes if any.

 

8. Position Spec Panel

This panel only applies if you want to load positions and trades, rather than just trades.

Sample Position Spec panel

» Select a position specification, or click ... to define a position specification. The trade filter will load the positions corresponding to the selected position specification.

Such a trade filter can be used to compute risk analyses on positions and trades rather than trades only.

A position specification defines which positions you want to load. The position specification is comprised of the aggregation criteria (Liquidation/Position Key), and which process you want to use it for:

Risk and PL - To load positions and trades for the Official PL report and other risk reports.
Liquidity - To load positions and trades for the Forward Ladder.
Spot Blotter - Not used.

Recommended setup is provided in the documentation of the corresponding risk reports.

Aggregation criteria are defined from the Calypso Navigator using Configuration > Books & Bundles > Position Aggregation.

Refer to Calypso Positions Management Documentation for details.

» You can click ... next to the Securities Selection field to select a bond report template to filter bonds. Only bonds for which there is a corresponding position will be loaded.
» You can check "Exclude Inactive Positions" to exclude all flat positions that are also considered inactive. A position may be flat but still active in P&L or other applications for some period of time. A position is considered inactive and excluded only when all of the following are true:
The position is flat
It is not a fee position (fee positions cannot be filtered independently of related security positions)
All trades settle before the valuation date (-1 business day)
The last liquidation date is before the valuation date (-1 business day)
» You can check "Only Cross Book Positions" to only load positions related to cross books. A cross book allows grouping multiple books to compute the positions across the books.
» The PositionCash Flow Type flag is used to filter by cashflow type. Use this flag in conjunction with selecting PositionCash in the Product Type field in the Product Criteria panel.

Refer to Calypso Positions Management Documentation for details.

 

9. Counterparty Panel

Select the Counterparty panel to select trade counterparty criteria.

Sample Counterparty panel

» Select the trade counterparty criteria described below as needed.

 

Fields Description

Counterparty IN

Click Add to select trade counterparties of selected Cpty Role. If Cpty Role is not set, the default role is CounterParty.

You can uncheck IN to load trades for which the trade counterparty is not in the selected list.

Cpty Role IN

Click ... to select trade counterparty's role if different from CounterParty.

You can uncheck IN to load trades for which the trade counterparty role is not in the selected list.

Cpty Attribute

Click ... to view all legal entity attributes defined in the system. Legal entity attributes are created from the Calypso Navigator using Configuration > Legal Data > Entities, Attributes button.

For each attribute, select “Like” or “Not Like” and enter a value as needed.

Example:

The trade filter will load trades for which the trade counterparty’s attribute DestinationBook is set to TRADINGA.

Cpty Status IN

Click ... to select trade counterparty’s status codes.

You can uncheck IN to load trades for which the trade counterparty’s status code is not in the selected list.

 

10. Portfolio Hierarchy Panel

This panel allows you to load trades from portfolio hierarchies.

Sample Portfolio Hierarchy panel

» Select a portfolio as needed.
» You can specify a valuation date if needed.

 

11. Diary Criteria Panel

This panel only applies to scheduled tasks RATE_RESET, FX_RATE_RESET, and PRICE_FIXING if you want to load trades that have diary entries. This requires the Diary engine to be running.

Sample Diary Criteria panel

» Select the type of diary entries you want to load.
» Enter diary From and To dates or tenors to limit the selection.

 Ⓘ   [NOTE: Diary criteria are only applicable in the scheduled tasks RATE_RESET, FX_RATE_RESET, and PRICE_FIXING - They are not taken into account otherwise]

 

12. TR / PO Role Panel

This panel allows loading trades based on specific trade keywords related to jurisdiction identifiers.

Sample TR / PO Role panel

Please refer to Calypso Matching documentation for details on these trade keywords.

 

13. Defining a Trade Filter using SQL

Important Notes on SQL Trade Filters

SQL Trade Filters are not supported in multiple components in the platform. Specifically they will not work in the real-time features of the risk infrastructure (Calculation Server / Presentation Server / Calypso Workstation).
The undo functionality in the reports will not work with SQL Trade Filters.
SQL Trade Filters are not supported in ERS for certain cases. Specifically they will not work for real time features of the following components: ERS Risk Calculator, OTC Margin Engine.

It is recommended to implement custom criteria instead of using SQL Trade Filters.

Please refer to the Calypso Developer's Guide for details on implementing custom criteria for Trade Filters.

 

You can enter basic criteria for the trade filter as needed and click Generate SQL to generate the corresponding SQL query - You can then modify it as needed. The “Use SQL” checkbox will appear checked, and all the panels will be disabled. Only the SQL query form will appear.

You can also check the “Use SQL” checkbox (blue arrow) directly, and enter your own SQL query.

Selecting “Exclude Future Trades by Trade Date” (red arrow) allows you to exclude trades whose Trade Date is greater than their Valuation Date Time.

Sample trade filter using SQL

» Edit the SQL query as needed and click Save.

The SQL From field can contain a list of comma-separated table names to be used in the SQL Where clause.

 

14. Viewing a Trade Filter Usage

Load a trade filter and click Usage to view where the trade filter is referenced. has been referenced, for example in Workflow, Advice Config, TaskStation config, SDI etc. When a trade filter includes another filter (filter in, etc.), the referencing filters are also listed.

Sample trade filter usage

 

15. Modifying a Trade Filter

 Ⓘ   [NOTE: If you modify a trade filter, it will impact configurations and reports based on this trade filter]

Load a trade filter and modify as needed.

Then click Save to save your changes.

 

16. Deleting a Trade Filter

 Ⓘ   [NOTE: A trade filter in use cannot be deleted]

Click Delete. You will be prompted to select a trade filter.

 

17. Note on Environment Properties

The following environment property applies to trade filters (portfolios):

DEFAULT_PARENT_FILTER - Name of a Trade Filter used as default parent filter.
LARGE_LIST_WARNING - If true, and the trade filter is loading a number of trades superior to the maximum number of trades (user attribute "Max.Trade"), a warning message is displayed and the user is prompted to proceed with the load. If false, and the trade filter is loading a number of trades superior to the maximum number of trades, an error message is displayed and the load is suspended.