On Premises or in the Cloud?
Rix— Distributed Aggregation Engine
Develop XVA, FRBT, SA-CCR aggregations with zero technical details — in days.
Aggregation engine built with modern regulatory frameworks in mind
Ready for XVA, FRTB, SA-CCR, IRRBB, IM and other
Fast implementation
Complex aggregation implementation in days, not months, with comprehensive tools.
Expressive language
Finance-oriented aggregation definition language (ADL) without technical hassle.
High performance
Fast distributed in-memory calculations and smart memory management.
How it works
User defines aggregation
Aggregation Definition Language (Rix ADL) allows the user to define aggregation in financial terms without any knowledge of distributed or parallel execution, memory management and other advanced topics
Aggregation is compiled on-the-fly
Newly created or modified aggregation file is uploaded to the system. It is the compiled on-the-fly into effective byte-code: no recompilation/redeployment is needed.
Engine runs aggregation in the Cloud
The newly arrived aggregation is automatically distributed on the Cloud and executed effectively without any additional actions.
Technological choices
Distributed, cross-platform, cloud-ready
We chose the best available technology to make the distributed solution fast, reliable and truly cross-platform.
It is cloud-ready and not vendor-locked to the concrete provider. Be it public cloud or on-premises cluster, automatic deployment with Ansible and ability to ship as Docker containers will make deployment easy and repeatable on different environments.
What makes it special?
Technical and function details separation
Aggregation definition is expressed in financial terms and doesn’t involve instructions about execution.
Automatic distribution
The aggregation execution is distributed automatically using to the fullest the problem structure and taking into account the nature of the calculations.
Smart memory management
Large amounts of data are processed in a streamed fashion allowing keep memory at bay even for calculations involving terabytes of prices and curves.
Pluggable distribution backend
Standard implementation with Apache Ignite™ can be replaced with other distribution middleware using a powerful set of abstractions and interfaces.
Aggregation Definition Language
Rix aggregation definition language gives you the power to define complex aggregations in short time without any knowledge of technical aspects. Just define your hierarchies, metrics, formulas, and you are ready to go
- Hierarchy
- Metrix
- Bindings
- Conditions
- Multipass
*Click on the code to stop/start the animation
*Click on the code to stop/start the animation
*Click on the code to stop/start the animation
...
...
...
*Click on the code to stop/start the animation
...
*Click on the code to stop/start the animation
...
...
...
Clean API
A set of APIs allows you to implement custom user and aggregation functions. Streaming API gives you the power to inject aggregation data as soon as it arrives.
- Custom Functions
- Aggregation functions
- Streaming api
*Click on the code to stop/start the animation
[RixFunc("CVA-DVA")]
public sealed class ComputeCvaDva
{
[RixCall]
public double Call(
ICurve exposure, ICurve dps, double rr, CurrencyIso currency,
[RixTechnical] IAggregationGlobalContext ctx)
{
var dsc = gCtx.Market.Get(index).DiscountCurve;
var axis = exposure.Axis;
double cvaDva = 0d;
for (int j = 1; j < axis.Count; j++)
{
var dp = dps[j] - dps[j - 1] > 0 ? dps[j] - dps[j - 1] : 0.0;
cvaDva += (exposure[axis[j]]* dsc[j] + dsc[j - 1]*exposure[axis[j-1]]) * 0.5d * dp;
}
cvaDva *= (1 - rr);
return cvaDva;
}
*Click on the code to stop/start the animation
[RixFunc("Avg", RixFunctionType.Aggregator, OptimizeCalls = true)] // Mark the class as aggregator
public sealed class DoubleAvgAggregate :
IAggregate // Define the type of accumulator and result
{
public class AvgDoubleMutableAcc { // Define accumulator class
public double Sum;
public int Count;
public AvgDoubleMutableAcc(double sum, int count)
{
if (count < 0) throw new ArgumentOutOfRangeException(nameof(count));
Sum = sum;
Count = count;
}
}
// Accumulator creation method
public AvgDoubleMutableAcc CreateAccumulator(IAggregateContext ctx) => new AvgDoubleMutableAcc(0, 0);
// Updating accumulator on new metrics
public void Update(AvgDoubleMutableAcc acc, double metric, IAggregateContext ctx) {
acc.Sum += metric;
acc.Count++;
}
// Merges two accumulators
public void Merge(AvgDoubleMutableAcc target, AvgDoubleMutableAcc source, IAggregateContext ctx) {
target.Sum += source.Sum;
target.Count += source.Count;
}
// Computes final metrics
public double Evaluate(AvgDoubleMutableAcc acc, IAggregateContext ctx) => acc.Sum / acc.Count;
}
*Click on the code to stop/start the animation
var structure = RixApi // We use RIX API to aggregate
.LoadFromFile("aggregation.xml") // Load aggregation file
.Compile(functions) // Compile with user-defined functions
.BuildStructure(trades); // Build tree structure using trades
var dataStore = structure.CreateDataStore(); // Create data store (for metrics)
var aggregationScope = structure.CreateScope() // Create scope
.WithGlobalVariable("PFE_Confidence", 95); // with global variables
var slice = aggregationScope.CreateSlice("CS"); // Create slice for collateral set level
using (var stream = slice.CreateStream( // Create aggregation stream
collateralSetId, // for certain collateral set
dataStore)) // and data store
{
stream.Start(); // Start the stream
parallel foreach (var tradeId in tradeIds) // iterate over trade IDs in parallel
{
var trade = FetchTrade(tradeId); // get trade from DB, cache, file etc.
var pricingGrid = MonteCarlo(trade); // simulate Monte-Carlo prices
stream.PushData( // push data to the stream
tradeId, // for the particular trade
Fact.WithField("PG", pricingGrid); // with "PG" field
}
stream.CompleteStreaming(); // Complete stream (all data is in)
}
await stream.WaitTask; // Wait for the stream to finish
Whitepaper
We’ve prepared a whitepaper describing Rix in greater detail. It includes:
- Quick Information
- Technical Details
- Performance Analysis
- Aggregation Definition Language Example
- Streaming Code Example
Get ready to see it in action!
Describe what you need and we will arrange a demo