Blended Rate Engine
Download PDF - Blended Rate Engine
This document describes the Calypso Blended Rate Engine.
1. Introduction
The Calypso Blended Rate Engine brings in market quotes (rates), either from a single or multiple sources, and based on pre-defined rules, cleanses and blends various rates to produce a single output. This single rate, for example, EUR/USD, can then be considered as the "market rate." This configuration is done in the Blended Rate Engine Configuration window (menu action startup.RateEngineConfigWindow
).
In summary, the Blended Rate Engine provides the following functionality:
• | Add, delete and save various rate configurations under a rule name |
• | Configure various rate sources or feeds as well as select the feed quotes that are to be used |
• | Select the validation rules that are to be applied to the quotes coming from the selected rate sources |
• | Configure rate blending rules |
The first step in using the Blended Rate Engine is to set up the configuration. This is done in the Rate Engine Configuration Window.
2. Required Servers
The servers that need to be started to run the Rate Engine are:
1. Auth Server, Discovery Server, Gateway Server, Event Server, Data Server
2. Rate Engine Server
The Rate Engine server is started using <calypso home>\deploy-local\<Environment>\rateengineServer.bat\.sh
or from the Calypso DevOps Center.
3. Instrument Definition
Step 1 - You may have multiple rate engine feed configurations. To load an existing feed configuration or to designate a new one, select Feed Config.
Step 2 - When creating a new rule, you must configure the rate feed source. RateEngine must be selected as the Type.
The fields to configure in this window are:
RATE_ENGINE_FEED_SOURCE_NAMES - Specify the rate feed source or sources
Step 3 - Instrument definition allows for the selection of instruments that are to be used as part of the configuration rule. In this example, the rule name is NYConfig. The instruments (products) that are selected are the instruments for which rates will be observed.
It is possible to select various instrument types from the Type drop-down list or to search for an instrument. The instrument types come from those configured in Calypso.
Then click the middle arrow to add the instruments.
Step 4 - Once the instruments have been added, you may wish to group them in order to apply rules to certain groups. For example, you could create a group of all G10 currencies or government bonds. You may enter and edit group names under Manage Groups. In the Instrument Definition window, you can then select all the instrument quotes that you wish to group, then in the Group Name column, right-click and select the group to which you would like to assign the selected instrument quotes.
Do not forget to save your configuration.
4. Validation Rules & Rate Source Defaults
The subscribed instrument quotes pass through a series of validation rules. Based on these defined rules, the Rate Engine will blend the multiple quotes to come up with a publishable blended rate.
It is possible to apply validation and blending rules at the following levels:
• | Instrument Type - for example, FX Spot, FX Forward, Equity, Future, etc... |
• | Group - user defined groups of instruments and associated quotes |
• | Default - applies to all instruments and quotes within a Config Name |
Ⓘ [NOTE: During Rate Engine's configuration, there must be a blending rule for your feeds for all instruments. The rule will be SingleSrc if you only have one rate source]
The Validation Rules & Rate Source columns are:
Column |
Description |
---|---|
MarketSrcs |
Select from the configured rate souces |
Rule Type |
Available rule types are None (no rule applied, takes rates as is), Blending and Validation |
Rule Name |
Different options are available based on the Rule Type selected. Rule Types are described below. |
Rule Parameters |
Rule Parameters are based on the Rule Type and the selected Rule Name |
Quote Type | Select the quote type for the rule |
Config Node |
The level at which the blending or validation rules are being applied, such as Default or Group, etc.... |
Is Active |
The selection of this check box indicates that the rule is active |
4.1 Validation Rules
Below is a description of the Rule Name choices when Validation is selected as the Rule Type.
Rule |
Description |
---|---|
BidAskCheck |
Ensures that the bid amount is always lower than the ask amount, passes if bid < ask |
NegativeRateValidation |
Ensures that negative rates are eliminated |
PercentDeviation |
Bid and Ask percentage deviations are calculated as shown: ![]()
If the deviation percent is greater than the max deviation percent configured in the Rule Parameters, the quote is invalid. |
PointsDeviation |
Points deviation is calculated as shown
If the Bid or Ask difference is greater than the maximum points deviation specified in the Rules Parameters, the quote is invalid. |
Repeated Rate |
Determines the number of times the same quote can be repeated from the feed source for bid, ask or bid/ask within a specified time frame. If the quote repeats itself more than the specified number of times, the quote is deemed to be invalid. |
StaleRate |
This rule throws out a rate as being stale based on the configured value, expressed in seconds. |
VolMovingAvgPercentDeviation |
The Volatility Moving Average Percentage Deviations are calculated as shown:
Where n is the Number of Quotes in Average as specified in the Rule Parameters. If the Bid % deviation or the Ask % deviation is > than the Max Pct Dev specified in the Trade Parameters, the quote is invalid. |
VolMovingAvgPointsDeviation |
The Volatility Moving Average Points Deviations are calculated as shown:
Where n is the Number of Quotes in Average as specified in the Rule Parameters. If the Bid % deviation or the Ask % deviation is > than the Max Pts Deviation (pips) as specified in the Rule Parameters, the quote is invalid. |
VolPercentDeviation |
Volatility Percent Deviation is calculated as shown:
If the Bid % deviationi or Ask deviationi is > than the Max Deviation Percent specified in the Rule Parameters, the quote is not valid.
|
VolPointsDeviation |
Volatility Points Deviation is calculated as shown:
If the Bid % Diffi or the Ask % Diffi is > than the Max Points Deviation (pips) specified in the Rule Parameters, the quote is invalid.
|
4.2 Blending Rules
Below is a description of the Rule Name choices when Blending is selected as a Rule Type.
Rule |
Description |
---|---|
HierarchySrc |
Set the Rule Parameters for the Hierarchy |
MultipleSrcAverage |
An average of the rates from the selected sources |
MultipleSrcBestBidOffer |
Takes the best bid and offer rates from the rate sources being used |
Multiple SrcWeightedAvg |
Adds a weighting to the rate sources being used. For example, each rate source can be weighted differently based on which source is considered most accurate. The weighting is applied to each source to be used for blending. The Weighted Average is equal to the average rate times the weighting. The Blended Rate is equal to the total of the weighted average for each rate source. The weighting is specified in the Rule Parameters column. See the figure below for an example on how this calculation works.
|
SingleSrc |
Specifies a single rate source |
MultipleSrcNthBidOffer |
Takes the Nth bid and offer rates from the rate sources being used, where N is a user defined number
|
Grouping |
Allows for the creation of a Group of sources to which rules can be applied |
MultipleSrcMedianBidOffer |
Takes the middle Bid or Offer when more than one source is available. For example, if there are three sources available, it takes the two best. If there are 4 sources available, rounds up and takes the second best |
Ⓘ [NOTE: A flag is added to highlight if a quote is either calculated (e.g. MultipleSrcAverage) and therefore not tradeable or non-calculated (e.g. MultipleSrcBestBidOffer) and therefore tradeable]
5. Triangulation
In the Instrument Definition window, right-click in the Group Name column to apply a Triangulation Rule Set to the selected cross instrument quotes. Note, the assumption is that you do not have a rate feed for the cross rate and therefore it will be triangulated.
The following applications and services are used for triangulation:
• | Triangulation Currency Rule Set Manager |
• | Rate Engine - The Rate Engine Test Monitor window shows the defined Triangulated Cross Pair. Only blended and validated rates are picked up from the Rate Engine for triangulation. |
5.1 Triangulation Currency Rule Set Manager
The Triangulation Currency Rule Set Manager is Calypso functionality that is used to determine which cross currency pairs should be triangulated.
A rule is created and the Primary Currency and the Quoting Currency of the cross currency pair is specified in the rule. For each cross currency pair to be triangulated, the Split Currency must be specified. The Split Currency is the currency that drives the triangulation.
For example, a cross currency pair of EUR/JPY split through USD will then use EUR/USD and USD/JPY to create EUR/JPY.
5.2 Rate Engine
For any cross instrument quote where a triangulation currency rule set name has been assigned, the Rate Engine takes the relevant configured straight pairs and triangulate them to create the cross pair quote.
» | For triangulated cross rates, such as EUR/JPY, the required straight pairs (e.g. EUR/USD and USD/JPY) must be configured and available as source rates within the Rate Engine. |
» | The cross rate EUR/JPY must also be configured within the Rate Engine and the relevant triangulation currency rule set specified. |
» | Blending and validation rules are only applied on the straight pair (e.g. EUR/USD and USD/JPY). |
» | Only if all blending and validation rules are applied successfully to the straight pairs (EUR/USD and USD/JPY) will these rates be published and used for triangulation and deriving the cross rate (EUR/JPY). |
» | The Rate Engine will either publish a direct sourced rate of EUR/JPY or a triangulated EUR/JPY. It will not switch between a direct source and a triangulated rate for publishing. |
Ⓘ [NOTE: If a cross pair is configured as a quote and the triangulation rule set is not specified, then the expectation is that the cross pair will be sourced directly from the configured rate feed, such as Bloomberg or Reuters]
In the Rate Rule Test Monitor tab, it is possible to see the configured source rates for EUR/USD, USD/JPY and the triangulated cross rate of EUR/JPY.
6. Rate Rules Test Monitor
The Rate Rules Test Monitor allows you to view the configured quotes and rules that are being applied.
The columns of this monitor are described below.
Column |
Description |
---|---|
Rule Name |
The configured rule to which each quote and associated blending and validation rule is applied |
Source |
Rate source for each quote/instrument |
Feed Quote |
Feed quote name as configured in the Feed Quotes |
Date Time |
The date time of each update |
Bid |
Bid rate from the quote |
Ask |
Ask rate from the quote |
Last |
Last rate from the quote |
Config Node |
The level at which the blending or validation rules are being applied, such as Default or Group |
Status |
Indicates if the quote passed or failed the validation and blending rules being applied |
Instr. Type |
Type of instrument/quotes to which the rate rule applies |
Details |
Indicates the number of times the quote/instrument has failed with the rule being applied. Click the displayed number to display details of the validation or blending rule failure. Ⓘ [NOTE: Only the last 10 failures are displayed. Click to see the reason for the failure] |
7. Rate Rules Definition
The Rate Rules Definition window shows the rules available for use within the Rate Engine.
8. Cross Currency Calculations
8.1 Calculating Cross Currency Rates from USD Exchange Rates
Non-USD based exchange rates can be calculated from USD based exchange rates. All cross currency calculations must be done at the spot and forward point market feed level to minimize calculation adjustments. In any exchange rate calculation, you are buying one currency and selling another currency. If you are trying to determine the exchange rate for two non-USD currencies, you can determine the exchange rate to buy one of the non-USD currencies against USD and compare it. For example,
EUR/USD Exchange Rate = 1.0900 = USD 1.0900 for every 1 EUR or EUR .917431193 for every 1 USD
GBP/USD Exchange Rate = 1.5200 = USD 1.5200 for every 1 GBP or GBP .657894737 for every 1 USD
EUR/GBP Exchange Rate = GBP .657894737 ÷ EUR .917431193 = .717105263
8.2 Spot Cross Currency Calculation
C1C2 Bid Exchange Rate = C2$SM(Offer) ÷ C1$SM(Bid)
C1C2 Offer Exchange Rate = C2$SM(Bid) ÷ C1$SM(Offer)
Where,
C1 = currency 1
C2 = currency 2
C2$SM = is the European (USD Terms) market feed spot foreign exchange rate for C2 (B=Bid Price, O = Offer Price)
Example:
EUR/USD = C1$SM(Bid) = .917431193
GBP/USD = C2$SM(Offer) = .657894737
C1C2 Bid Exchange Rate = .717105263
8.3 Forward Point Cross Currency Calculation
C1C2 Bid Forward Points = ((C2$SM(Offer)+C2$FPM(Offer))/(C1$SM(Bid)+C2$FPM(Bid))–(C2$SM(Offer)/C1$SM(Bid))
C1C2 Offer Forward Points = ((C2$SM(Bid)por+C2$FPM(Bid))/(C1$SM(Offer)+C2$FPM(Offer)))–(C2$SM(Bid)/C1$SM(Offer))
Where,
C1 = currency 1
C2 = currency 2
C2$SM = Is the European (USD Terms) market feed spot foreign exchange rate for C2 (B = Bid Price, O= Offer Price)
C2$FPM = Is the European (USD Terms) market feed forward points for C2 (B = Bid Price, O= Offer Price)
C1$SM = Is the European (USD Terms) market feed spot foreign exchange rate for C1 (B = Bid Price, O= Offer Price)
C1$FPM = Is the European (USD Terms) market feed forward points for C1 (B = Bid Price, O= Offer Price)
Example:
EURUSD = C1$SM(Bid) = .917431193
GBPUSD = C2$SM(Offer) = .657894737
EURUSD FP = C1$FPM = -.0002
GBPUSD FP = C2$FPM = .0007
C1C2 Forward Exchange Rate = .718024793
C1C2 Spot Exchange Rate = .717105263C1C2 Forward Points = .718024793 - .717105263 = .00091953
8.4 Spot Rate Adjustment
Adjustment of the spot rate is required for one of the split currency pairs when the spot days of one pair of the triangle is not the same as the spot days of the other pairs.
Given a EUR/CAD spot date (Jan 15th), the EUR/USD spot date (Jan 15th) and USD/CAD spot date (Jan 14th). Cross rates need to be on the same date (it does not make sense to use the rate from the 15th to cross with rate from 14th), it is necessary to do the calculation on Jan 15th.
Therefore, the following triangulation is needed:
EUR/CAD spot = EUR/USD spot * (USD/CAD spot + 1 Day adjusted points)
In the calculation above, USD/CAD spot + 1 Day adjusted points = rate on 15th, which can be used to cross. The table below explains the adjustment & triangulation calculation.