Architecture Guide

Kernel Lifecycle and Trade Management

The practical guide to achieving Live Risk with kernel-oriented design. Learn how MatLogica kernels support daily trading—from generation to workflows—enabling real-time risk and portfolio management.

Sub-millisecond RFQ pricing after initial kernel creation
Kernel reuse eliminates redundant recomputation
Scaling factors enable trade amendments without rebuild
Live Risk achievable through modular kernel design

Everyone Wants Live Risk

Real-time risk calculation has become the holy grail of modern trading operations. Traders want instant Greeks, risk managers need continuous portfolio monitoring, and regulators expect timely reporting. But achieving true Live Risk requires more than just fast computations—it demands a fundamentally different architecture.

The Challenge

Traditional approaches recompute everything from scratch on each update—impossibly slow for real-time use.

The Solution

Kernel-oriented design with modular, reusable computational graphs that update incrementally.

This page explains how to achieve Live Risk using MatLogica's kernel lifecycle approach—the practical architecture that makes real-time risk a reality, not just an aspiration.

Introduction to Kernel Lifecycle and Trade Management

At the heart of MatLogica's approach is the creation of reusable kernels—pre-recorded computational graphs that capture the essence of your quant workflows. These kernels are designed for repeated execution, enabling ultra-fast calculations by avoiding redundant recomputations each time market data or parameters change. To achieve optimal performance, kernel reuse must be maximized: a one-time recording phase (which incurs a modest upfront time cost) pays off exponentially through thousands of subsequent runs.

Strategic planning is key when dividing your quant library into kernels. Consider granularity—such as separate kernels for curve calibration, portfolio pricing, and risk sensitivities—to balance creation overhead with execution efficiency. This modular design allows targeted updates (e.g., recalibrating only affected kernels during trade amendments), ensuring smooth integration into daily trading activities while minimizing overall compute demands.

Daily Trading Activities

Kernels support a typical trading day by handling model calibration, portfolio pricing, risk calculations, and RFQ responses. The process begins with intraday updates and extends to custom trade executions.

Kernel Generation and Usage

Kernels are organized in a modular structure to allow flexibility. For example, separate kernels for curve engines, pricing, and risk ensure targeted updates without full recomputation.

Intraday Pricing & Risk Kernels

Model Calibration (Curve Engine) Kernel

Generated once per day or on market changes, this kernel handles curve-building functionality for various instruments.

Portfolio Pricing Kernel

Records the pricing workflow for the entire portfolio, enabling repeated executions with updated market data.

Portfolio Risk Kernel

Computes sensitivities via the adjoint pass, integrated with pricing.

RFQ Pricing and Execution

RFQ Pricing for Standard Trades - Kernel

Uses pre-recorded kernels for quick responses to standard requests.

RFQ Pricing for Custom Trades - Kernel

Allows on-the-fly generation for bespoke trades, balancing speed and customization.

This approach ensures kernels are generated efficiently and reused throughout the day.

Typical Business Workflows

Trade Amendments

Adding Trades

Append new trades to existing kernels without full regeneration, updating the portfolio structure dynamically.

Removing Trades

Remove specific trades from the kernel setup, by scaling factor to zero (for complete removal) or to a proportion (for partial removal).

Modifying Trade Parameters

Adjust parameters in-place, triggering minimal kernel updates for efficiency.

Portfolio Hierarchy Structure

Each trade has a scaling factor (0 to 1) for efficient amendments without kernel recreation

Bank Portfolio
Sub-Portfolio 1
Sub-Portfolio 2
Sub-Portfolio N
Kernel 1
Trades 1-5
Kernel 2
Trades 6-10
Kernel 3
Trades 11-15
Kernel N
Trades...

"What-If" Scenario Analysis

Run hypothetical market scenarios by applying changes to kernel inputs, enabling quick evaluation of potential impacts.

"What-If" Trade Amendments

Combine trade modifications with scenarios to assess amended portfolios under various conditions.

Key Benefits of Kernel-Oriented Design

Ultra-Low Latency

Sub-millisecond pricing for standard trades

Memory Efficient

Scaling factors avoid kernel rebuilds

AAD Sensitivities

Direct computation of all Greeks

Flexible Structure

Hierarchical portfolio organization

Market Agility

Quick recalibration on market changes

Live Risk

Real-time risk calculation enabled

Solution Features

Modular kernel design for targeted updates
Support for complex portfolios including curve-building and non-linear products
Integration with cloud for scalable, secure execution

This ensures agile risk management without operational disruptions.

Related Resources

Ready to Achieve Live Risk?

Learn how MatLogica's kernel lifecycle approach can transform your trading operations with real-time risk capabilities